Node metrics from metrics.k8s.io API

Raw node usage from metrics API; bypasses kubectl top formatting

kubectl get --raw '/apis/metrics.k8s.io/v1beta1/nodes' | jq '.items[] | {name:.metadata.name, cpu:.usage.cpu, mem:.usage.memory}'

tool
kubectl73 commands
tags
kubectlmetricsmonitoringperformance

More kubectl commands

  • kubectl debug <pod> -n <ns> --copy-to=<pod>-dbg --share-processes --image=nicolaka/netshoot -- sleep infinity

    Clone pod with a debug container sharing the PID namespace; original stays untouched

  • kubectl explain deploy.spec --recursive | less

    Dump the full nested field tree of a resource spec; great for hunting valid fields

  • kubectl rollout pause deploy/<name> -n <ns>; kubectl rollout resume deploy/<name> -n <ns>

    Batch multiple edits without triggering rollouts, then resume to apply once

  • kubectl apply view-last-applied deploy/<name> -n <ns> -o yaml

    Show the last-applied-configuration annotation; diff intent vs live state

  • kubectl get events -A --field-selector type=Warning --sort-by=.lastTimestamp

    Cluster-wide Warning events newest last; fast triage of failing workloads

all 73 kubectl commands