vilisseranen/terraform-kubeadm

Dashboard and kube-dns not being created

syed opened this issue · 3 comments

syed commented

After creating the cluster, I see that kube-dns and kubernetes-dashboard are still in ContainerCreating state.

[kubernetes@kata-gvisor-bastion01 ~]$ kubectl get pods --all-namespaces
NAMESPACE     NAME                                           READY     STATUS              RESTARTS   AGE
kube-system   etcd-kata-gvisor-master01                      1/1       Running             0          21h
kube-system   kube-apiserver-kata-gvisor-master01            1/1       Running             0          21h
kube-system   kube-controller-manager-kata-gvisor-master01   1/1       Running             0          21h
kube-system   kube-dns-86f4d74b45-6k5lw                      0/3       ContainerCreating   0          21h
kube-system   kube-proxy-8szr2                               1/1       Running             0          21h
kube-system   kube-proxy-gv46r                               1/1       Running             0          21h
kube-system   kube-scheduler-kata-gvisor-master01            1/1       Running             0          21h
kube-system   kubernetes-dashboard-7d5dcdb6d9-k5g8z          0/1       ContainerCreating   0          21h
kube-system   weave-net-bkzqm                                2/2       Running             0          21h
kube-system   weave-net-tq7n9                                2/2       Running             0          21h
[kubernetes@kata-gvisor-bastion01 ~]$ 

Haven't debugged this but have you seen this before @vilisseranen ?

Yes, I have seen that before.

I believe that happens when the network overlay is created too early on the master. That's why there is this ugly sleep 60 in the script to bootstrap the master (https://github.com/vilisseranen/terraform-kubeadm/blob/master/templates/bootstrap_master.sh.tpl#L18).

If you know a legitimate condition on which we can wait on, I would gladly accept to change this script.

syed commented

Any workarounds to this? Can I fix my cluster after this has happened?