wait for kubelet ready before kubectl taint
Change-Id: Id458991ce7110572505c503ba5901de52d4bad6c
diff --git a/kubernetes/master/controller.sls b/kubernetes/master/controller.sls
index 3e89830..f43115e 100644
--- a/kubernetes/master/controller.sls
+++ b/kubernetes/master/controller.sls
@@ -228,10 +228,16 @@
{%- endfor %}
{%- if master.get('unschedulable', 'false') %}
+kubelet_ready:
+ http.wait_for_successful_query:
+ - name: "http://localhost:10248/healthz"
+ - status: 200
+
kubernetes_taint_master_{{ master.host.name }}:
cmd.run:
- name: kubectl taint --overwrite nodes {{ master.host.name }} node-role.kubernetes.io/master=:NoSchedule
-
+ - require:
+ - http: kubelet_ready
{%- endif %}
{%- if master.registry.secret is defined %}