How to get kube-dns working in Vagrant cluster using kubeadm and Weave

匿名 (未验证) 提交于 2019-12-03 01:25:01

问题:

I deployed a few VMs using Vagrant to test kubernetes:
master: 4 CPUs, 4GB RAM
node-1: 4 CPUs, 8GB RAM
Base image: Centos/7.
Networking: Bridged.
Host OS: Centos 7.2

Deployed kubernetes using kubeadm by following kubeadm getting started guide. After adding the node to the cluster and installing Weave Net, I'm unfortunately not able to get kube-dns up and running as it stays in a ContainerCreating state:

[vagrant@master ~]$ kubectl get pods --all-namespaces NAMESPACE     NAME                             READY     STATUS              RESTARTS   AGE kube-system   etcd-master                      1/1       Running             0          1h kube-system   kube-apiserver-master            1/1       Running             0          1h kube-system   kube-controller-manager-master   1/1       Running             0          1h kube-system   kube-discovery-982812725-0tiiy   1/1       Running             0          1h kube-system   kube-dns-2247936740-46rcz        0/3       ContainerCreating   0          1h kube-system   kube-proxy-amd64-4d8s7           1/1       Running             0          1h kube-system   kube-proxy-amd64-sqea1           1/1       Running             0          1h kube-system   kube-scheduler-master            1/1       Running             0          1h kube-system   weave-net-h1om2                  2/2       Running             0          1h kube-system   weave-net-khebq                  1/2       CrashLoopBackOff    17         1h

I assume the problem is somehow related to the weave-net pod in CrashloopBackoff state which resides on node-1:

[vagrant@master ~]$ kubectl describe pods --namespace=kube-system weave-net-khebq Name:       weave-net-khebq Namespace:  kube-system Node:       node-1/10.0.2.15 Start Time: Wed, 05 Oct 2016 07:10:39 +0000 Labels:     name=weave-net Status:     Running IP:     10.0.2.15 Controllers:    DaemonSet/weave-net Containers:   weave:     Container ID:   docker://4976cd0ec6f971397aaf7fbfd746ca559322ab3d8f4ee217dd6c8bd3f6ed4f76     Image:      weaveworks/weave-kube:1.7.0     Image ID:       docker://sha256:1ac5304168bd9dd35c0ecaeb85d77d26c13a7d077aa8629b2a1b4e354cdffa1a     Port:            Command:       /home/weave/launch.sh     Requests:       cpu:      10m     State:      Waiting       Reason:       CrashLoopBackOff     Last State:     Terminated       Reason:       Error       Exit Code:    1       Started:      Wed, 05 Oct 2016 08:18:51 +0000       Finished:     Wed, 05 Oct 2016 08:18:51 +0000     Ready:      False     Restart Count:  18     Liveness:       http-get http://127.0.0.1:6784/status delay=30s timeout=1s period=10s #success=1 #failure=3     Volume Mounts:       /etc from cni-conf (rw)       /
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!