Top Kubectl commands you should know.

  1. Get Contexts

    kubectl config get-contexts
  2. Get Pods

    kubectl get pods
  3. Get Pods' Performance

    kubectl top pods
  4. Get specific Pod Performance

    while true; do echo "=== $(date '+%Y-%m-%d %H:%M:%S') ===" >> pod_metrics.log; kubectl top pod  >> pod_metrics.log; sleep 10; done