老师,您好,问一下这两个pod 是做什么用的?分别在我的两个从服务器节点。
但是他们两个的状态都处于异常,并且我尝试删除他俩,又马上重新生成了。
以下是描述信息
kubectl describe pod kube-flannel-ds-rhvg4 -n kube-system
Name: kube-flannel-ds-rhvg4
Namespace: kube-system
Priority: 2000001000
Priority Class Name: system-node-critical
Node: mysql-02/
Labels: app=flannel
controller-revision-hash=6cf56469d7
pod-template-generation=1
tier=node
Annotations: <none>
Status: Pending
IP:
IPs: <none>
Controlled By: DaemonSet/kube-flannel-ds
Init Containers:
install-cni:
Image: registry.cn-hangzhou.aliyuncs.com/chand/flannel:v0.14.0
Port: <none>
Host Port: <none>
Command:
cp
Args:
-f
/etc/kube-flannel/cni-conf.json
/etc/cni/net.d/10-flannel.conflist
Environment: <none>
Mounts:
/etc/cni/net.d from cni (rw)
/etc/kube-flannel/ from flannel-cfg (rw)
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-h6c9s (ro)
Containers:
kube-flannel:
Image: registry.cn-hangzhou.aliyuncs.com/chand/flannel:v0.14.0
Port: <none>
Host Port: <none>
Command:
/opt/bin/flanneld
Args:
--ip-masq
--kube-subnet-mgr
Limits:
cpu: 100m
memory: 50Mi
Requests:
cpu: 100m
memory: 50Mi
Environment:
POD_NAME: kube-flannel-ds-rhvg4 (v1:metadata.name)
POD_NAMESPACE: kube-system (v1:metadata.namespace)
Mounts:
/etc/kube-flannel/ from flannel-cfg (rw)
/run/flannel from run (rw)
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-h6c9s (ro)
Conditions:
Type Status
PodScheduled True
Volumes:
run:
Type: HostPath (bare host directory volume)
Path: /run/flannel
HostPathType:
cni:
Type: HostPath (bare host directory volume)
Path: /etc/cni/net.d
HostPathType:
flannel-cfg:
Type: ConfigMap (a volume populated by a ConfigMap)
Name: kube-flannel-cfg
Optional: false
kube-api-access-h6c9s:
Type: Projected (a volume that contains injected data from multiple sources)
TokenExpirationSeconds: 3607
ConfigMapName: kube-root-ca.crt
ConfigMapOptional: <nil>
DownwardAPI: true
QoS Class: Burstable
Node-Selectors: <none>
Tolerations: :NoSchedule op=Exists
node.kubernetes.io/disk-pressure:NoSchedule op=Exists
node.kubernetes.io/memory-pressure:NoSchedule op=Exists
node.kubernetes.io/network-unavailable:NoSchedule op=Exists
node.kubernetes.io/not-ready:NoExecute op=Exists
node.kubernetes.io/pid-pressure:NoSchedule op=Exists
node.kubernetes.io/unreachable:NoExecute op=Exists
node.kubernetes.io/unschedulable:NoSchedule op=Exists
Events: <none>
[root@mysql-01 kubeimooc]# kubectl describe pod kube-flannel-ds-vf9nt -n kube-system
Name: kube-flannel-ds-vf9nt
Namespace: kube-system
Priority: 2000001000
Priority Class Name: system-node-critical
Node: mysql-04/192.168.2.110
Start Time: Tue, 29 Aug 2023 21:00:54 +0800
Labels: app=flannel
controller-revision-hash=6cf56469d7
pod-template-generation=1
tier=node
Annotations: <none>
Status: Pending
IP: 192.168.2.110
IPs:
IP: 192.168.2.110
Controlled By: DaemonSet/kube-flannel-ds
Init Containers:
install-cni:
Container ID: docker://f014b7899537b840f41ee5aaf204382ea768d17c111cb9720db91651219a447e
Image: registry.cn-hangzhou.aliyuncs.com/chand/flannel:v0.14.0
Image ID: docker-pullable://registry.cn-hangzhou.aliyuncs.com/chand/flannel@sha256:635d42b8cc6e9cb1dee3da4d5fe8bbf6a7f883c9951b660b725b0ed2c03e6bde
Port: <none>
Host Port: <none>
Command:
cp
Args:
-f
/etc/kube-flannel/cni-conf.json
/etc/cni/net.d/10-flannel.conflist
State: Waiting
Reason: CrashLoopBackOff
Last State: Terminated
Reason: Error
Exit Code: 1
Started: Tue, 29 Aug 2023 22:43:57 +0800
Finished: Tue, 29 Aug 2023 22:43:57 +0800
Ready: False
Restart Count: 25
Environment: <none>
Mounts:
/etc/cni/net.d from cni (rw)
/etc/kube-flannel/ from flannel-cfg (rw)
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-xl6dq (ro)
Containers:
kube-flannel:
Container ID:
Image: registry.cn-hangzhou.aliyuncs.com/chand/flannel:v0.14.0
Image ID:
Port: <none>
Host Port: <none>
Command:
/opt/bin/flanneld
Args:
--ip-masq
--kube-subnet-mgr
State: Waiting
Reason: PodInitializing
Ready: False
Restart Count: 0
Limits:
cpu: 100m
memory: 50Mi
Requests:
cpu: 100m
memory: 50Mi
Environment:
POD_NAME: kube-flannel-ds-vf9nt (v1:metadata.name)
POD_NAMESPACE: kube-system (v1:metadata.namespace)
Mounts:
/etc/kube-flannel/ from flannel-cfg (rw)
/run/flannel from run (rw)
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-xl6dq (ro)
Conditions:
Type Status
Initialized False
Ready False
ContainersReady False
PodScheduled True
Volumes:
run:
Type: HostPath (bare host directory volume)
Path: /run/flannel
HostPathType:
cni:
Type: HostPath (bare host directory volume)
Path: /etc/cni/net.d
HostPathType:
flannel-cfg:
Type: ConfigMap (a volume populated by a ConfigMap)
Name: kube-flannel-cfg
Optional: false
kube-api-access-xl6dq:
Type: Projected (a volume that contains injected data from multiple sources)
TokenExpirationSeconds: 3607
ConfigMapName: kube-root-ca.crt
ConfigMapOptional: <nil>
DownwardAPI: true
QoS Class: Burstable
Node-Selectors: <none>
Tolerations: :NoSchedule op=Exists
node.kubernetes.io/disk-pressure:NoSchedule op=Exists
node.kubernetes.io/memory-pressure:NoSchedule op=Exists
node.kubernetes.io/network-unavailable:NoSchedule op=Exists
node.kubernetes.io/not-ready:NoExecute op=Exists
node.kubernetes.io/pid-pressure:NoSchedule op=Exists
node.kubernetes.io/unreachable:NoExecute op=Exists
node.kubernetes.io/unschedulable:NoSchedule op=Exists
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning BackOff 110s (x486 over 106m) kubelet Back-off restarting failed container
下边是其中一个pod的日志,以及它所在的从节点上 使用的docker ps,但是我不知道哪个是这个pod 的所对应的容器
[root@mysql-01 kubeimooc]# kubectl logs kube-flannel-ds-vf9nt -n kube-system
Error from server (BadRequest): container "kube-flannel" in pod "kube-flannel-ds-vf9nt" is waiting to start: PodInitializing
[root@mysql-04 ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
0c4669b304ec registry.aliyuncs.com/google_containers/pause:3.6 "/pause" 22 hours ago Up 22 hours k8s_POD_kube-flannel-ds-vf9nt_kube-system_38d91a85-6862-4d81-b0cf-fc60f2af17c0_0
96d2e169e78b eea7b3dcba7e "/docker-entrypoin..." 10 days ago Up 10 days k8s_nginx_nginx_test_8082e6d2-3500-40f8-a5de-51336788aefc_0
79ba27372227 registry.aliyuncs.com/google_containers/pause:3.6 "/pause" 10 days ago Up 10 days k8s_POD_nginx_test_8082e6d2-3500-40f8-a5de-51336788aefc_0
2b0cdcf77d5d registry.aliyuncs.com/google_containers/kube-proxy@sha256:ec165529c811ffe51da4f85fcc76e83ddd8a70716bed464c1aae6d85f9b4915a "/usr/local/bin/ku..." 3 weeks ago Up 3 weeks k8s_kube-proxy_kube-proxy-kprv5_kube-system_3d8a364a-2101-4744-8b0e-57d975d72e94_0
74f369ff161b registry.aliyuncs.com/google_containers/pause:3.6 "/pause" 3 weeks ago Up 3 weeks k8s_POD_kube-proxy-kprv5_kube-system_3d8a364a-2101-4744-8b0e-57d975d72e94_0