我有一个Kubernetes集群,其中有一个管理员和两个工人。
$ kubectl get nodes
NAME STATUS ROLES AGE VERSION
master Ready master 54d v1.18.4
worker1 Ready <none> 2d v1.18.4
worker2 Ready <none> 45h v1.18.4
然后我用过kubectl create deployment nginx --image=nginx
然后检查
$ kubectl get deployment
NAME READY UP-TO-DATE AVAILABLE AGE
nginx 0/1 1 0 117m
$ kubectl describe deployment nginx
.
.
.
Type Status Reason
---- ------ ------
Available False MinimumReplicasUnavailable
Progressing False ProgressDeadlineExceeded
与this不同,我拥有足够的硬件资源。
$ kubectl get events
12m Warning Failed pod/nginx-f89759699-qxbwc Failed to pull image "docker.io/istio/proxyv2:1.5.2": rpc error: code = Unknown desc = Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
12m Warning Failed pod/nginx-f89759699-qxbwc Error: ErrImagePull
11m Normal BackOff pod/nginx-f89759699-qxbwc Back-off pulling image "docker.io/istio/proxyv2:1.5.2"
4m47s Warning Failed pod/nginx-f89759699-qxbwc Error: ImagePullBackOff
28m Normal SandboxChanged pod/productpage-v1-7f44c4d57c-sklfh Pod sandbox changed, it will be killed and re-created.
我有一个单节点集群,最近使用kubeadm
向集群添加了两个工作节点,这有问题吗?
我还注意到了一些事情,我的集群在工作节点加入集群后不久就失去了Internet连接。
$route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.100.1 0.0.0.0 UG 100 0 0 ens32
172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0
192.168.100.0 0.0.0.0 255.255.255.0 U 0 0 0 ens32
192.168.100.1 192.168.100.222 255.255.255.255 UGH 0 0 0 tunl0
这里192.168.100.1
是我的网络网关,192.168.100.222
是主IP。
这是我的第一个kubernetes集群作品。所以我可能做错了。任何帮助将不胜感激。