pod shows:ContainerCreating, and kubectl logs xxx shows Error from server: Get “https://172.18.186.133:10352/containerLogs/default/nginx-deployment-d6798fc9c-r4mqw/nginx”: dial tcp 172.18.186.133:10352: connect: connection refused
kubectl get pods -A -owide
NAMESPACE NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
default nginx-deployment-d6798fc9c-r4mqw 0/1 ContainerCreating 0 20m <none> edge2 <none> <none>
kubectl describe pod nginx-deployment-d6798fc9c-r4mqw
Name: nginx-deployment-d6798fc9c-r4mqw
Namespace: default
Priority: 0
Node: edge2/172.18.186.133
Start Time: Thu, 30 May 2024 16:13:57 +0800
Labels: app=nginx
pod-template-hash=d6798fc9c
Annotations: <none>
Status: Pending
IP:
IPs: <none>
Controlled By: ReplicaSet/nginx-deployment-d6798fc9c
Containers:
nginx:
Container ID:
Image: nginx
Image ID:
Port: 80/TCP
Host Port: 80/TCP
State: Waiting
Reason: ContainerCreating
Ready: False
Restart Count: 0
Environment: <none>
Mounts:
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-5kfdn (ro)
Conditions:
Type Status
Initialized True
Ready False
ContainersReady False
PodScheduled True
Volumes:
kube-api-access-5kfdn:
Type: Projected (a volume that contains injected data from multiple sources)
TokenExpirationSeconds: 3607
ConfigMapName: kube-root-ca.crt
ConfigMapOptional: <nil>
DownwardAPI: true
QoS Class: BestEffort
Node-Selectors: <none>
Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 21m default-scheduler Successfully assigned default/nginx-deployment-d6798fc9c-r4mqw to edge2
edge2’s log shows :
75713 serviceaccount.go:112] query meta "default"/"default"/[]string(nil)/3607/v1.BoundObjectReference{Kind:"Pod", APIVersion:"v1", Name:"nginx-deploy
5月 30 16:40:45 edge2 edgecore[75713]: E0530 16:40:45.477215 75713 remote_runtime.go:201] "RunPodSandbox from runtime service failed" err="rpc error: code = Unknown desc = NetworkPlugin cni failed to set up pod
5月 30 16:40:45 edge2 edgecore[75713]: E0530 16:40:45.477275 75713 kuberuntime_sandbox.go:70] "Failed to create sandbox for pod" err="rpc error: code = Unknown desc = NetworkPlugin cni failed to set up pod mqtt-
5月 30 16:40:45 edge2 edgecore[75713]: E0530 16:40:45.477293 75713 kuberuntime_manager.go:803] "CreatePodSandbox for pod failed" err="rpc error: code = Unknown desc = NetworkPlugin cni failed to set up pod mqtt-
5月 30 16:40:45 edge2 edgecore[75713]: E0530 16:40:45.477336 75713 pod_workers.go:962] "Error syncing pod, skipping" err="failed to "CreatePodSandbox" for "mqtt-kubeedge_default(967fecc6-2e42-4fe4-85a1-ff5b11
5月 30 16:40:45 edge2 edgecore[75713]: E0530 16:40:45.482710 75713 remote_runtime.go:201] "RunPodSandbox from runtime service failed" err="rpc error: code = Unknown desc = NetworkPlugin cni failed to set up pod
5月 30 16:40:45 edge2 edgecore[75713]: E0530 16:40:45.482740 75713 kuberuntime_sandbox.go:70] "Failed to create sandbox for pod" err="rpc error: code = Unknown desc = NetworkPlugin cni failed to set up pod nginx
5月 30 16:40:45 edge2 edgecore[75713]: E0530 16:40:45.482759 75713 kuberuntime_manager.go:803] "CreatePodSandbox for pod failed" err="rpc error: code = Unknown desc = NetworkPlugin cni failed to set up pod nginx
5月 30 16:40:45 edge2 edgecore[75713]: E0530 16:40:45.482806 75713 pod_workers.go:962] "Error syncing pod, skipping" err="failed to "CreatePodSandbox" for "nginx-deployment-d6798fc9c-r4mqw_default(d5b10fda-e9
5月 30 16:40:49 edge2 edgecore[75713]: I0530 16:40:49.993788 75713 common.go:97] start connect to mqtt server with client id: hub-client-sub-1717058434
5月 30 16:40:49 edge2 edgecore[75713]: I0530 16:40:49.993831 75713 common.go:99] client hub-client-sub-1717058434 isconnected: false
5月 30 16:40:49 edge2 edgecore[75713]: E0530 16:40:49.994041 75713 common.go:101] connect error: Network Error : dial tcp 127.0.0.1:1883: connect: connection refused
I’ve tried ping edge2 is on, and edge2’s firewall is off. I didn’t see a solution after searching on this website. At present, my own guess may be because of the port number, but the specific way to do it is not clear, just came into contact with k8s
ping 172.18.186.133
PING 172.18.186.133 (172.18.186.133) 56(84) bytes of data.
64 bytes from 172.18.186.133: icmp_seq=1 ttl=64 time=0.197 ms
64 bytes from 172.18.186.133: icmp_seq=2 ttl=64 time=0.219 ms
64 bytes from 172.18.186.133: icmp_seq=3 ttl=64 time=0.224 ms