-
kubectl get services # List all services in the namespace
-
kubectl get pods --all-namespaces # List all pods in all namespaces
-
kubectl get pods -o wide # List all pods in the current namespace, with details
-
kubectl get deployment my-dep # List a particular deployment
-
kubectl get pods # List all pods in the namespace
-
kubectl get pod my-pod -o yaml # Get a pod's YAML
-
kubectl scale --replicas=3 deployment/foo # Scale a deployment named 'foo' to 3
-
kubectl rollout restart deployment/frontend # Rolling restart of the "frontend" deployment
-
kubectl rollout restart statefulset/frontend # Rolling restart of the "frontend" statefulset
-
kubectl logs my-pod # Check logs of pods
-
kubectl exec -i -t my-pod --container main-app -- /bin/bash # Exec command