[root@node1 kubernetes]# kubectl get pod -A
NAMESPACE NAME READY STATUS RESTARTS AGE
default busybox 1/1 Running 2 20d
default mysqldb-0 1/1 Running 8 152d
default redis-db-master-0 1/1 Running 8 152d
dev content-web-deloy-58f6465676-pd5pq 1/1 Running 15 163d
dev mall-wx-deploy-768c46897-bhq4l 0/1 CrashLoopBackOff 65 153d
kube-system coredns-7ff77c879f-8blg8 1/1 Running 9 153d
kube-system coredns-7ff77c879f-ppgqc 1/1 Running 9 153d
kube-system etcd-master 1/1 Running 38 366d
kube-system grafana-core-768b6bf79c-gwkdc 1/1 Running 20 196d
kube-system kube-apiserver-master 1/1 Running 191 366d
kube-system kube-controller-manager-master 1/1 Running 50 366d
kube-system kube-flannel-ds-amd64-pgjgh 1/1 Running 12 152d
kube-system kube-flannel-ds-amd64-xzgr9 1/1 Running 12 152d
kube-system kube-proxy-d89lh 1/1 Running 9 152d
kube-system kube-proxy-r5dk6 1/1 Running 9 152d
kube-system kube-scheduler-master 1/1 Running 50 366d
kube-system metrics-server-57bc7f4584-gc2s6 1/1 Running 29 215d
kube-system node-exporter-5kk5l 1/1 Running 20 197d
kube-system prometheus-7486bf7f4b-hgb55 1/1 Running 20 197d
nfs-pro nfs-provisioner-nfs-client-provisioner-59db6984d9-wbzb7 1/1 Running 13 161d
[root@node1 kubernetes]# kubectl describe pod busybox -n default
Name: busybox
Namespace: default
Priority: 0
Node: node1/192.168.31.138
Start Time: Tue, 29 Aug 2023 22:31:47 +0800
Labels: <none>
Annotations: Status: Running
IP: 192.168.31.138
IPs:
IP: 192.168.31.138
Containers:
busybox:
Container ID: docker://082ee78c1807e47967d8ec25fc0047808f10645b4574b9ef9d30a05dd1984176
Image: busybox:1.28
Image ID: docker-pullable://busybox@sha256:141c253bc4c3fd0a201d32dc1f493bcf3fff003b6df416dea4f41046e0f37d47
Port: <none>
Host Port: <none>
Command:
sleep
3600
State: Running
Started: Tue, 19 Sep 2023 22:17:22 +0800
Last State: Terminated
Reason: Error
Exit Code: 137
Started: Thu, 14 Sep 2023 22:19:14 +0800
Finished: Thu, 14 Sep 2023 23:06:39 +0800
Ready: True
Restart Count: 2
Environment: <none>
Mounts:
/var/run/secrets/kubernetes.io/serviceaccount from default-token-n775f (ro)
Conditions:
Type Status
Initialized True
Ready True
ContainersReady True
PodScheduled True
Volumes:
default-token-n775f:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-n775f
Optional: false
QoS Class: BestEffort
Node-Selectors: <none>
Tolerations: node.kubernetes.io/not-ready:NoExecute for 300s
node.kubernetes.io/unreachable:NoExecute for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal SandboxChanged 11m kubelet, node1 Pod sandbox changed, it will be killed and re-created.
Normal Pulled 11m kubelet, node1 Container image "busybox:1.28" already present on machine
Normal Created 11m kubelet, node1 Created container busybox
Normal Started 11m kubelet, node1 Started container busybox
[root@node1 kubernetes]# kubectl logs -f busybox -n default
^C
[root@node1 kubernetes]# journalctl -u kubelet
-- Logs begin at 二 2023-09-19 20:57:42 CST, end at 二 2023-09-19 22:29:45 CST. --
9月 19 20:57:48 node1 systemd[1]: Started kubelet: The Kubernetes Node Agent.
9月 19 20:57:52 node1 kubelet[777]: Flag --cgroup-driver has been deprecated, This parameter should be set via the config file specified by the Kubelet's --conf
9月 19 20:57:52 node1 kubelet[777]: Flag --cgroup-driver has been deprecated, This parameter should be set via the config file specified by the Kubelet's --conf
9月 19 20:57:52 node1 kubelet[777]: Flag --cgroup-driver has been deprecated, This parameter should be set via the config file specified by the Kubelet's --conf
9月 19 20:57:52 node1 kubelet[777]: Flag --cgroup-driver has been deprecated, This parameter should be set via the config file specified by the Kubelet's --conf
9月 19 20:57:52 node1 kubelet[777]: I0919 20:57:52.300712 777 server.go:417] Version: v1.18.0
9月 19 20:57:52 node1 kubelet[777]: I0919 20:57:52.301084 777 plugins.go:100] No cloud provider specified.
9月 19 20:57:52 node1 kubelet[777]: I0919 20:57:52.301234 777 server.go:837] Client rotation is on, will bootstrap in background
9月 19 20:57:52 node1 kubelet[777]: I0919 20:57:52.319352 777 certificate_store.go:130] Loading cert/key pair from "/var/lib/kubelet/pki/kubelet-client-curr
9月 19 20:57:55 node1 kubelet[777]: I0919 20:57:55.923862 777 server.go:646] --cgroups-per-qos enabled, but --cgroup-root was not specified. defaulting to
9月 19 20:57:55 node1 kubelet[777]: I0919 20:57:55.924160 777 container_manager_linux.go:266] container manager verified user specified cgroup-root exists:
9月 19 20:57:55 node1 kubelet[777]: I0919 20:57:55.924171 777 container_manager_linux.go:271] Creating Container Manager object based on Node Config: {Runti
9月 19 20:57:55 node1 kubelet[777]: I0919 20:57:55.924443 777 topology_manager.go:126] [topologymanager] Creating topology manager with none policy
9月 19 20:57:55 node1 kubelet[777]: I0919 20:57:55.924455 777 container_manager_linux.go:301] [topologymanager] Initializing Topology Manager with none poli
9月 19 20:57:55 node1 kubelet[777]: I0919 20:57:55.924458 777 container_manager_linux.go:306] Creating device plugin manager: true
9月 19 20:57:55 node1 kubelet[777]: I0919 20:57:55.924852 777 client.go:75] Connecting to docker on unix:///var/run/docker.sock
9月 19 20:57:55 node1 kubelet[777]: I0919 20:57:55.925049 777 client.go:92] Start docker client with request timeout=2m0s
9月 19 20:57:55 node1 kubelet[777]: W0919 20:57:55.934715 777 docker_service.go:561] Hairpin mode set to "promiscuous-bridge" but kubenet is not enabled, fa
9月 19 20:57:55 node1 kubelet[777]: I0919 20:57:55.934734 777 docker_service.go:238] Hairpin mode set to "hairpin-veth"
9月 19 20:57:55 node1 kubelet[777]: I0919 20:57:55.973207 777 docker_service.go:253] Docker cri networking managed by cni
9月 19 20:57:56 node1 kubelet[777]: I0919 20:57:56.004070 777 docker_service.go:258] Docker Info: &{ID:NSTL:BPGE:HFEB:2GVN:754N:AOXJ:LYVN:LN6C:6XIE:Z4UG:YWS
9月 19 20:57:56 node1 kubelet[777]: I0919 20:57:56.004140 777 docker_service.go:271] Setting cgroupDriver to systemd
9月 19 20:57:56 node1 kubelet[777]: I0919 20:57:56.043595 777 remote_runtime.go:59] parsed scheme: ""
9月 19 20:57:56 node1 kubelet[777]: I0919 20:57:56.043629 777 remote_runtime.go:59] scheme "" not registered, fallback to default scheme
9月 19 20:57:56 node1 kubelet[777]: I0919 20:57:56.043912 777 passthrough.go:48] ccResolverWrapper: sending update to cc: {[{/var/run/dockershim.sock <nil>
9月 19 20:57:56 node1 kubelet[777]: I0919 20:57:56.043936 777 clientconn.go:933] ClientConn switching balancer to "pick_first"
9月 19 20:57:56 node1 kubelet[777]: I0919 20:57:56.044064 777 remote_image.go:50] parsed scheme: ""
9月 19 20:57:56 node1 kubelet[777]: I0919 20:57:56.044071 777 remote_image.go:50] scheme "" not registered, fallback to default scheme
9月 19 20:57:56 node1 kubelet[777]: I0919 20:57:56.044080 777 passthrough.go:48] ccResolverWrapper: sending update to cc: {[{/var/run/dockershim.sock <nil>
9月 19 20:57:56 node1 kubelet[777]: I0919 20:57:56.044084 777 clientconn.go:933] ClientConn switching balancer to "pick_first"
9月 19 20:57:56 node1 kubelet[777]: I0919 20:57:56.044416 777 kubelet.go:292] Adding pod path: /etc/kubernetes/manifests
9月 19 20:57:56 node1 kubelet[777]: I0919 20:57:56.044733 777 kubelet.go:317] Watching apiserver
9月 19 20:57:56 node1 kubelet[777]: E0919 20:57:56.072921 777 reflector.go:178] k8s.io/kubernetes/pkg/kubelet/kubelet.go:526: Failed to list *v1.Node: Get h
9月 19 20:57:56 node1 kubelet[777]: E0919 20:57:56.073155 777 reflector.go:178] k8s.io/kubernetes/pkg/kubelet/kubelet.go:517: Failed to list *v1.Service: Ge
9月 19 20:57:56 node1 kubelet[777]: E0919 20:57:56.073227 777 reflector.go:178] k8s.io/kubernetes/pkg/kubelet/config/apiserver.go:46: Failed to list *v1.Pod
9月 19 20:57:56 node1 kubelet[777]: E0919 20:57:56.073273 777 reflector.go:178] k8s.io/kubernetes/pkg/kubelet/kubelet.go:526: Failed to list *v1.Node: Get h
9月 19 20:57:56 node1 kubelet[777]: E0919 20:57:56.074707 777 reflector.go:178] k8s.io/kubernetes/pkg/kubelet/kubelet.go:517: Failed to list *v1.Service: Ge
9月 19 20:57:56 node1 kubelet[777]: E0919 20:57:56.076218 777 reflector.go:178] k8s.io/kubernetes/pkg/kubelet/config/apiserver.go:46: Failed to list *v1.Pod
9月 19 20:57:56 node1 kubelet[777]: E0919 20:57:56.314303 777 aws_credentials.go:77] while getting AWS credentials NoCredentialProviders: no valid providers
9月 19 20:57:56 node1 kubelet[777]: For verbose messaging see aws.Config.CredentialsChainVerboseErrors
9月 19 20:57:56 node1 kubelet[777]: I0919 20:57:56.338432 777 kuberuntime_manager.go:211] Container runtime docker initialized, version: 20.10.18, apiVersio
9月 19 20:57:56 node1 kubelet[777]: I0919 20:57:56.349572 777 server.go:1125] Started kubelet
9月 19 20:57:56 node1 kubelet[777]: I0919 20:57:56.349946 777 server.go:145] Starting to listen on 0.0.0.0:10250
9月 19 20:57:56 node1 kubelet[777]: I0919 20:57:56.351740 777 server.go:393] Adding debug handlers to kubelet server.
9月 19 20:57:56 node1 kubelet[777]: E0919 20:57:56.353691 777 kubelet.go:1305] Image garbage collection failed once. Stats initialization may not have compl
9月 19 20:57:56 node1 kubelet[777]: E0919 20:57:56.354559 777 event.go:269] Unable to write event: 'Post https://192.168.31.119:6443/api/v1/namespaces/defau
9月 19 20:57:56 node1 kubelet[777]: I0919 20:57:56.359570 777 fs_resource_analyzer.go:64] Starting FS ResourceAnalyzer
9月 19 20:57:56 node1 kubelet[777]: I0919 20:57:56.371002 777 volume_manager.go:265] Starting Kubelet Volume Manager
9月 19 20:57:56 node1 kubelet[777]: E0919 20:57:56.379815 777 reflector.go:178] k8s.io/client-go/informers/factory.go:135: Failed to list *v1.CSIDriver: Get
9月 19 20:57:56 node1 kubelet[777]: E0919 20:57:56.388230 777 reflector.go:178] k8s.io/client-go/informers/factory.go:135: Failed to list *v1.CSIDriver: Get
9月 19 20:57:56 node1 kubelet[777]: I0919 20:57:56.391736 777 desired_state_of_world_populator.go:139] Desired state populator starts to run
9月 19 20:57:56 node1 kubelet[777]: E0919 20:57:56.392193 777 controller.go:136] failed to ensure node lease exists, will retry in 200ms, error: Get https:/
9月 19 20:57:56 node1 kubelet[777]: I0919 20:57:56.460585 777 clientconn.go:106] parsed scheme: "unix"
9月 19 20:57:56 node1 kubelet[777]: I0919 20:57:56.460599 777 clientconn.go:106] scheme "unix" not registered, fallback to default scheme
9月 19 20:57:56 node1 kubelet[777]: I0919 20:57:56.460733 777 passthrough.go:48] ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containe
9月 19 20:57:56 node1 kubelet[777]: I0919 20:57:56.460743 777 clientconn.go:933] ClientConn switching balancer to "pick_first"
9月 19 20:57:56 node1 kubelet[777]: E0919 20:57:56.475715 777 kubelet.go:2267] node "node1" not found
9月 19 20:57:56 node1 kubelet[777]: I0919 20:57:56.475756 777 kubelet_node_status.go:294] Setting node annotation to enable volume controller attach/detach
9月 19 20:57:56 node1 kubelet[777]: I0919 20:57:56.496580 777 status_manager.go:158] Starting to sync pod status with apiserver
9月 19 20:57:56 node1 kubelet[777]: I0919 20:57:56.496617 777 kubelet.go:1821] Starting kubelet main sync loop.
9月 19 20:57:56 node1 kubelet[777]: E0919 20:57:56.496652 777 kubelet.go:1845] skipping pod synchronization - [container runtime status check may not have c
9月 19 20:57:56 node1 kubelet[777]: E0919 20:57:56.503657 777 reflector.go:178] k8s.io/client-go/informers/factory.go:135: Failed to list *v1beta1.RuntimeCl
9月 19 20:57:56 node1 kubelet[777]: W0919 20:57:56.548176 777 docker_sandbox.go:400] failed to read pod IP from plugin/docker: networkPlugin cni failed on t
9月 19 20:57:56 node1 kubelet[777]: I0919 20:57:56.561743 777 kubelet_node_status.go:70] Attempting to register node node1
9月 19 20:57:56 node1 kubelet[777]: E0919 20:57:56.577020 777 kubelet.go:2267] node "node1" not found
9月 19 20:57:56 node1 kubelet[777]: I0919 20:57:56.579803 777 kubelet_node_status.go:294] Setting node annotation to enable volume controller attach/detach
9月 19 20:57:56 node1 kubelet[777]: W0919 20:57:56.581134 777 docker_sandbox.go:400] failed to read pod IP from plugin/docker: networkPlugin cni failed on t
9月 19 20:57:56 node1 kubelet[777]: W0919 20:57:56.590337 777 docker_sandbox.go:400] failed to read pod IP from plugin/docker: networkPlugin cni failed on t
9月 19 20:57:56 node1 kubelet[777]: E0919 20:57:56.592697 777 controller.go:136] failed to ensure node lease exists, will retry in 400ms, error: Get https:/
9月 19 20:57:56 node1 kubelet[777]: E0919 20:57:56.596794 777 kubelet.go:1845] skipping pod synchronization - container runtime status check may not have co
9月 19 20:57:56 node1 kubelet[777]: W0919 20:57:56.597702 777 docker_sandbox.go:400] failed to read pod IP from plugin/docker: networkPlugin cni failed on t
9月 19 20:57:56 node1 kubelet[777]: I0919 20:57:56.603749 777 cpu_manager.go:184] [cpumanager] starting with none policy
9月 19 20:57:56 node1 kubelet[777]: I0919 20:57:56.603761 777 cpu_manager.go:185] [cpumanager] reconciling every 10s
9月 19 20:57:56 node1 kubelet[777]: I0919 20:57:56.603776 777 state_mem.go:36] [cpumanager] initializing new in-memory state store
9月 19 20:57:56 node1 kubelet[777]: I0919 20:57:56.604701 777 state_mem.go:88] [cpumanager] updated default cpuset: ""
9月 19 20:57:56 node1 kubelet[777]: I0919 20:57:56.604710 777 state_mem.go:96] [cpumanager] updated cpuset assignments: "map[]"
9月 19 20:57:56 node1 kubelet[777]: I0919 20:57:56.604721 777 policy_none.go:43] [cpumanager] none policy: Start
9月 19 20:57:56 node1 kubelet[777]: W0919 20:57:56.612408 777 docker_sandbox.go:400] failed to read pod IP from plugin/docker: networkPlugin cni failed on t
9月 19 20:57:56 node1 kubelet[777]: W0919 20:57:56.629396 777 docker_sandbox.go:400] failed to read pod IP from plugin/docker: networkPlugin cni failed on t
9月 19 20:57:56 node1 kubelet[777]: I0919 20:57:56.636733 777 plugin_manager.go:114] Starting Kubelet Plugin Manager
9月 19 20:57:56 node1 kubelet[777]: W0919 20:57:56.637477 777 docker_sandbox.go:400] failed to read pod IP from plugin/docker: networkPlugin cni failed on t
9月 19 20:57:56 node1 kubelet[777]: E0919 20:57:56.637516 777 eviction_manager.go:255] eviction manager: failed to get summary stats: failed to get node inf
9月 19 20:57:56 node1 kubelet[777]: W0919 20:57:56.647459 777 docker_sandbox.go:400] failed to read pod IP from plugin/docker: networkPlugin cni failed on t
9月 19 20:57:56 node1 kubelet[777]: E0919 20:57:56.655311 777 reflector.go:178] k8s.io/client-go/informers/factory.go:135: Failed to list *v1beta1.RuntimeCl
9月 19 20:57:56 node1 kubelet[777]: W0919 20:57:56.657280 777 docker_sandbox.go:400] failed to read pod IP from plugin/docker: networkPlugin cni failed on t