kubectl commands
Updated 2026-02-15
kubectl for Kubernetes: get, describe, apply, logs, exec. Pods, deployments, and services.
Get and describe
kubectl get podsList pods.
kubectl get pods -AAll namespaces.
kubectl describe pod <name>Pod details.
kubectl get svc,deployServices and deployments.
Apply, logs, exec
kubectl apply -f file.yamlApply manifest.
kubectl logs <pod> -fFollow logs.
kubectl exec -it <pod> -- shShell into pod.
kubectl delete pod <name>Delete pod.