Skip to content

CLI Synopsis

Kubernetes CLI Synopsis#

Command Line Instruction Description
kubectl config get-contexts To get the Kubernetes Cluster Name
kubectl get ns To get Kubernetes namespace
kubectl get svc -n <name space> To get the External IP address
kubectl cluster-info To get Kubernetes master.
kubectl get pods -n <your namespace> To get list of running pods
kubectl delete namespaces <insert-some-namespace-name>  To delete namespace
kubectl describe namespaces To describe namespace
kubectl get storageclass To get storage class
kubectl delete storageclass <storage-class> To delete storage class
kubectl -n $NS delete pods --field-selector=status.phase=Failed  To delete all evicted kubernetes pods
gcloud container clusters get-credentials pm-testing --zone us-central1-c --project forward-camera-186122  To authenticate VM instance with Kubernetes Engine