kubectl CLI Command Reference

kubectl is the primary interface to a Kubernetes cluster. Beyond get and apply, interviews test knowledge of the inspection trio (describe/logs/exec), local access patterns (port-forward/proxy), node management (cordon/uncordon/taint), resource usage (top), and the imperative workflow (create/expose/run/set image).

Overview

Overview

kubectl is the Swiss Army knife of Kubernetes operations. Knowing only kubectl get and kubectl apply is not enough for interviews, and the CKA and CKAD exams are entirely kubectl-based with no GUI.

Key concepts

  • kubectl describe Events section
  • kubectl logs --previous
  • kubectl port-forward vs kubectl proxy
  • cordon vs drain
  • Taint effects: NoSchedule vs NoExecute

Sign up free to read the full topic

More DevOps topics

Start free on Cariara · Coding problems · System design studio