Er(3) spherelet[]: msg="Failed to retrieve node" error="Get \"https://<API_SERVER_IP>:6443/api/v1/nodes/<ESXi_HOSTNAME>\": dial tcp <API_SERVER_IP>:6443: connect: connection refused"Wa(4) spherelet[]: msg="GetStatus failed" error="failed to query pod status: connection error: desc = \"transport: Error while dialing: rpc error: code = DeadlineExceeded desc = timed out connecting to vsock <VSOCK_ID>:1143\"" namespace=svc-cci-ns-cxq5n pod=cci-ns-controller-manager-<ID>-pkpbr uid=<POD_UID>Er(3) spherelet[]: msg="error while updating pod status in kubernetes: Patch \"https://<API_SERVER_IP>:6443/api/v1/namespaces/svc-cci-ns-cxq5n/pods/cci-ns-controller-manager-<ID>-pkpbr/status\": dial tcp <API_SERVER_IP>:6443: connect: connection refused" namespace=svc-cci-ns-cxq5n pod=cci-ns-controller-manager-<ID>-pkpbr reason=AgentUnreachable status=FailedEr(3) spherelet[]: msg="Failed to get pod" error="Get \"https://<API_SERVER_IP>:6443/api/v1/namespaces/svc-cci-ns-cxq5n/pods/cci-ns-controller-manager-b7f64f58d-pkpbr\": dial tcp <API_SERVER_IP>:6443: connect: connection refused" namespace=svc-cci-ns-cxq5n pod=cci-ns-controller-manager-<ID>-pkpbr uid=<POD_UID>VMware vSphere Kubernetes Service
VMware vCenter Server
This issue typically occurs when a PodVM is powered off manually (or via an external action) but not deleted from the inventory while the host is preparing for maintenance mode. When the host attempted to enter maintenance mode, Kubernetes (K8s) tried to drain the node. However, because the PodVM still existed in a powered-off state and the host was cordoned, the termination process could not complete correctly.
To resolve this state and allow the host to complete its transition into maintenance mode, perform the following steps:
kubectl get pods -A | grep -v Running
kubectl delete pod <pod-name> -n <namespace> --force --grace-period=0