From b1eb8522075e8be91f7810bffb75f10d1ca3e3f2 Mon Sep 17 00:00:00 2001 From: Matthew Mosesohn Date: Tue, 20 Dec 2016 18:44:39 +0300 Subject: [PATCH] Add wait for kube-apiserver to kubernetes-apps Fixes #777 --- roles/kubernetes-apps/ansible/tasks/main.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/roles/kubernetes-apps/ansible/tasks/main.yaml b/roles/kubernetes-apps/ansible/tasks/main.yaml index 1b4c77eff..d9a548949 100644 --- a/roles/kubernetes-apps/ansible/tasks/main.yaml +++ b/roles/kubernetes-apps/ansible/tasks/main.yaml @@ -1,4 +1,11 @@ --- +- name: Kubernetes Apps | Wait for kube-apiserver + uri: url=http://localhost:8080/healthz + register: result + until: result.status == 200 + retries: 10 + delay: 6 + - name: Kubernetes Apps | Lay Down KubeDNS Template template: src={{item.file}} dest={{kube_config_dir}}/{{item.file}} with_items: