fix: wait for kube-vip on primary node during bootstrap
The kube-vip DaemonSet is applied before the secondary control planes join, so waiting for a full DaemonSet rollout blocks bootstrap on nodes that do not exist in the cluster yet. Wait only for the primary node's kube-vip pod and then verify the VIP is reachable on 6443.
This commit is contained in:
@@ -9,9 +9,17 @@
|
||||
command: kubectl apply -f /tmp/kube-vip-control-plane.yaml
|
||||
changed_when: true
|
||||
|
||||
- name: Wait for kube-vip DaemonSet rollout
|
||||
command: kubectl -n kube-system rollout status daemonset/kube-vip --timeout=180s
|
||||
- name: Wait for local kube-vip pod to be ready
|
||||
command: >-
|
||||
kubectl -n kube-system get pods
|
||||
-l app.kubernetes.io/name=kube-vip
|
||||
--field-selector spec.nodeName={{ inventory_hostname }}
|
||||
-o jsonpath={.items[0].status.conditions[?(@.type=="Ready")].status}
|
||||
register: kube_vip_pod_ready
|
||||
changed_when: false
|
||||
until: kube_vip_pod_ready.stdout == "True"
|
||||
retries: 18
|
||||
delay: 10
|
||||
|
||||
- name: Wait for API VIP on 6443
|
||||
wait_for:
|
||||
|
||||
Reference in New Issue
Block a user