我有一个 1+1 配置的 Kubernetes 集群。
我使用以下步骤安装 Calico
curl https://docs.projectcalico.org/manifests/calico-typha.yaml -o calico.yaml
kubectl apply -f calico.yaml
但 Pod 并未运行
an001@mastercal:~$ kubectl get pods -A
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-flannel kube-flannel-ds-dz5xb 1/1 Running 0 2d21h
kube-flannel kube-flannel-ds-x9zjt 1/1 Running 0 2d21h
kube-system calico-kube-controllers-5bb7768754-m8pbj 0/1 Running 0 25s
kube-system calico-node-kkb4k 0/1 Init:Error 1 25s
kube-system calico-node-qfvwg 0/1 Init:Error 1 25s
kube-system calico-typha-69c485b8c4-4lvzt 0/1 Running 0 25s
kube-system coredns-f9fd979d6-2wtzb 1/1 Running 0 2d21h
kube-system coredns-f9fd979d6-qhqp4 1/1 Running 0 2d21h
kube-system etcd-mastercal 1/1 Running 0 2d21h
kube-system kube-apiserver-mastercal 1/1 Running 0 2d21h
kube-system kube-controller-manager-mastercal 1/1 Running 0 2d21h
kube-system kube-proxy-4qrbq 1/1 Running 0 2d21h
kube-system kube-proxy-xhkg6 1/1 Running 0 2d21h
kube-system kube-scheduler-mastercal 1/1 Running 0 2d21h
an001@mastercal:~$ kubectl get events -n kube-system
LAST SEEN TYPE REASON OBJECT MESSAGE
53s Normal Scheduled pod/calico-kube-controllers-5bb7768754-m8pbj Successfully assigned kube-system/calico-kube-controllers-5bb7768754-m8pbj to workercal
51s Normal Pulled pod/calico-kube-controllers-5bb7768754-m8pbj Container image "docker.io/calico/kube-controllers:v3.25.0" already present on machine
50s Normal Created pod/calico-kube-controllers-5bb7768754-m8pbj Created container calico-kube-controllers
50s Normal Started pod/calico-kube-controllers-5bb7768754-m8pbj Started container calico-kube-controllers
1s Warning Unhealthy pod/calico-kube-controllers-5bb7768754-m8pbj Readiness probe failed: Error initializing datastore: Get "https://10.96.0.1:443/apis/crd.projectcalico.org/v1/clusterinformations/default": dial tcp 10.96.0.1:443: connect: no route to host
5s Warning Unhealthy pod/calico-kube-controllers-5bb7768754-m8pbj Liveness probe failed: Error initializing datastore: Get "https://10.96.0.1:443/apis/crd.projectcalico.org/v1/clusterinformations/default": dial tcp 10.96.0.1:443: connect: no route to host
53s Normal SuccessfulCreate replicaset/calico-kube-controllers-5bb7768754 Created pod: calico-kube-controllers-5bb7768754-m8pbj
53s Normal ScalingReplicaSet deployment/calico-kube-controllers Scaled up replica set calico-kube-controllers-5bb7768754 to 1
52s Normal Scheduled pod/calico-node-kkb4k Successfully assigned kube-system/calico-node-kkb4k to mastercal
52s Normal Pulled pod/calico-node-kkb4k Container image "docker.io/calico/cni:v3.25.0" already present on machine
52s Normal Created pod/calico-node-kkb4k Created container upgrade-ipam
51s Normal Started pod/calico-node-kkb4k Started container upgrade-ipam
26s Normal Pulled pod/calico-node-kkb4k Container image "docker.io/calico/cni:v3.25.0" already present on machine
26s Normal Created pod/calico-node-kkb4k Created container install-cni
26s Normal Started pod/calico-node-kkb4k Started container install-cni
7s Warning BackOff pod/calico-node-kkb4k Back-off restarting failed container
52s Normal Scheduled pod/calico-node-qfvwg Successfully assigned kube-system/calico-node-qfvwg to workercal
51s Normal Pulled pod/calico-node-qfvwg Container image "docker.io/calico/cni:v3.25.0" already present on machine
51s Normal Created pod/calico-node-qfvwg Created container upgrade-ipam
51s Normal Started pod/calico-node-qfvwg Started container upgrade-ipam
27s Normal Pulled pod/calico-node-qfvwg Container image "docker.io/calico/cni:v3.25.0" already present on machine
27s Normal Created pod/calico-node-qfvwg Created container install-cni
27s Normal Started pod/calico-node-qfvwg Started container install-cni
12s Warning BackOff pod/calico-node-qfvwg Back-off restarting failed container
53s Normal SuccessfulCreate daemonset/calico-node Created pod: calico-node-kkb4k
52s Normal SuccessfulCreate daemonset/calico-node Created pod: calico-node-qfvwg
52s Normal Scheduled pod/calico-typha-69c485b8c4-4lvzt Successfully assigned kube-system/calico-typha-69c485b8c4-4lvzt to workercal
51s Normal Pulling pod/calico-typha-69c485b8c4-4lvzt Pulling image "docker.io/calico/typha:v3.25.0"
46s Normal Pulled pod/calico-typha-69c485b8c4-4lvzt Successfully pulled image "docker.io/calico/typha:v3.25.0" in 5.877965128s
45s Normal Created pod/calico-typha-69c485b8c4-4lvzt Created container calico-typha
45s Normal Started pod/calico-typha-69c485b8c4-4lvzt Started container calico-typha
8s Warning Unhealthy pod/calico-typha-69c485b8c4-4lvzt Readiness probe failed: Get "http://localhost:9098/readiness": dial tcp 127.0.0.1:9098: connect: connection refused
9s Warning Unhealthy pod/calico-typha-69c485b8c4-4lvzt Liveness probe failed: Get "http://localhost:9098/liveness": dial tcp 127.0.0.1:9098: connect: connection refused
52s Normal SuccessfulCreate replicaset/calico-typha-69c485b8c4 Created pod: calico-typha-69c485b8c4-4lvzt
53s Normal ScalingReplicaSet deployment/calico-typha Scaled up replica set calico-typha-69c485b8c4 to 1
我该如何解决 ???
an001@mastercal:~$ kubectl cluster-info
Kubernetes master is running at https://10.128.0.7:6443
KubeDNS is running at https://10.128.0.7:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy