Describe node conditions

Check node conditions: Ready, MemoryPressure, DiskPressure

kubectl describe node my-node | grep -A5 'Conditions:'

tool
k8s-debug27 commands
tags
k8s-debugkubectl

More k8s-debug commands

  • kubectl top pods -A --sort-by=memory | head -20

    Top 20 pods sorted by memory consumption

  • kubectl get events -n mynamespace --field-selector involvedObject.name=mypod --watch

    Stream events for a specific pod

  • kubectl cp mynamespace/mypod:/var/log/app.log ./app.log

    Download a file from a running container

  • kubectl get po -A --sort-by='.status.containerStatuses[0].restartCount' | tail -20

    Rank pods cluster-wide by restart count to spot crash loops fast

  • kubectl get po -A -o jsonpath='{range .items[*]}{.metadata.namespace}{" "}{.metadata.name}{" "}{.status.containerStatuses[*].lastState.terminated.reason}{"\n"}{end}' | grep OOMKilled

    List pods whose last container exit was OOMKilled across all namespaces

all 27 k8s-debug commands