Kubernetes Cheatsheet

Kubernetes CheatsheetKapitel 09 von 11

Kubernetes-Diagnose

Stand Kubernetes 1.37 · Edition 2026.11 · Release-Daten geprüft am 30. Oktober 2026

kubectl debug

kubectl debug -it pod/api-xxx --image=busybox --target=api, ephemeral Container im Pod-Namespace (Process+Network).

--copy-to=api-debug --set-image=api=busybox: Pod-Kopie mit getauschtem Image, ohne Probes und Labels.

node/n1: Host-PID/-Net/-IPC, Node-Root unter /host, privilegiert erst mit --profile=sysadmin. Default-Profil seit 1.36 general, legacy soll in 1.39 entfallen.

Häufige Fehlerbilder

CrashLoopBackOff: App stürzt direkt nach Start, logs --previous + describe.

ImagePullBackOff: Registry, Tag, imagePullSecret.

OOMKilled: Memory-Limit zu tief, Reason in lastState.

Pending (Scheduling): describe sagt warum (Insufficient cpu/memory, no nodes match selector, taints).

Init:0/1: InitContainer hängt, logs -c <init>.

ContainerCreating (lange): CSI-mount, image-pull, CNI.

kubectl get pod api-xxx -o json \
  | jq '.status.containerStatuses[].state'
kubectl describe node n1 | grep -A5 Allocatable
kubectl events -A | tail -40