...
Command | Description |
---|---|
kubectl cluster-info | Display Cluster Info |
kubectl config view | Display Config |
kubectl get pods | List all running pods |
kubectl get services | List all services |
kubectl get nodes | List all nodes |
kubectl get deployments | Deployments view |
kubectl get rc | List replication controllers |
kubectl get pods -o wide | List all pods in ps output format with more information (such as node name). |
kubectl get pods --all-namespaces | List all pods in all namespaces |
kubectl logs <pod> | Display the logs for a service |
kubectl logs -f <pod> | Display the logs for a service |
kubectl delete pod <pod instance> | Delete a pod |
kubectl delete deployment <pod> | Delete a pod (Don't include the instance number) ie. kubectl delete deployment redis |
kubectl exec -it <pod> bash | log into a pod ex. kubectl exec -it cloudservice-bcc6c69ff-bnzcv bash |
kubectl expose deployment cloudservice --type=LoadBalancer --name=cloud | Expose pod |
...