Command Reference

Kubectl

Read Operations

Check cluster nodes

kubectl get nodes

Diagnose nodes

kubectl describe nodes

Check cluster pods

kuebctl get pods

Diagnose pods

kubectl describe pods

Check service

kubectl -n <NAMESPACE> get service <SERVICE NAME>
E.g: kubectl -n kubernetes-dashboard get svc

Check Auth permissions

# Check allowed permissions
kubectl auth can-i --list

# Check attributes (self)
kubectl auth whoami

Check cluster config

kubectl config view

Write Operations

Execute commands in pod

# kubectl exec -it <POD_NAME> -- sh
kubectl exec -it metadata-db-bd6bd7d97-jjsqh -- sh

Last updated

Was this helpful?