Voir :
sudo journalctl -f -u kubelet.service
sudo journalctl -u containerd
kubectl cluster-info
kubectl get componentstatus
kubectl get ds -n kube-system
kubectl get deploy -n kube-system
kubectl get nodes
kubectl get pods --field-selector status.phase!=Running -A
kubectl events --types=Warning -A -w
kubectl get events --all-namespaces --sort-by='.metadata.creationTimestamp'
Autre
Use kubectl describe pod … to find the node running your Pod and the container ID (docker:…)
* SSH into the node
* Run docker exec -it -u root CONTAINER_ID /bin/bash
Si Metrics-server est installé
<code bash>
kubectl top node
kubectl top pod --sort-by=memory -A
</code>
<code>
- 'systemctl status kubelet'
- 'journalctl -xeu kubelet'
Additionally, a control plane component may have crashed or exited when started by the container runtime.
To troubleshoot, list all containers using your preferred container runtimes CLI.
Here is one example how you may list all running Kubernetes containers by using crictl:
- 'crictl --runtime-endpoint unix:/var/run/containerd/containerd.sock ps -a | grep kube | grep -v pause'
Once you have found the failing container, you can inspect its logs with:
'crictl --runtime-endpoint unix:
/var/run/containerd/containerd.sock logs CONTAINERID'
error execution phase wait-control-plane: could not initialize a Kubernetes cluster
To see the stack trace of this error execute with --v=5 or higher
</code>
Ulimits / Process ID limits and reservations
<code bash>
watch 'ps -e -w -o “thcount,cgname” --no-headers | awk “{a[\$2] += \$1} END{for (i in a) print a[i], i}” | sort --numeric-sort --reverse | head --lines=8'
</code>