Outils pour utilisateurs

Outils du site


tech:notes_kubernetes_k8s_-_diag

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
tech:notes_kubernetes_k8s_-_diag [2025/09/11 15:42] Jean-Baptistetech:notes_kubernetes_k8s_-_diag [2026/06/07 19:12] (Version actuelle) – modification externe 127.0.0.1
Ligne 1: Ligne 1:
 +<!DOCTYPE markdown>
 +{{tag>Brouillon K8S}}
 +
 +# Notes Kubernetes k8s - Diag
 +
 +Voir :
 +* [[Notes VIO VMware Integrated OpenStack k8s]]
 +* [[Notes Kubernetes k8s - Utilisation]]
 +
 +~~~bash
 +sudo journalctl -f -u kubelet.service
 +sudo journalctl -u containerd
 +~~~
 +
 +
 +
 +~~~bash
 +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é
 +~~~bash
 +kubectl top node
 +kubectl top pod --sort-by=memory -A
 +~~~
 +
 +
 +~~~
 +        - '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
 +~~~
 +
 +Ulimits / Process ID limits and reservations
 +~~~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'
 +~~~
 +
 +FIXME
 +
  

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki