Skip to content

Instantly share code, notes, and snippets.

@jzaccone
Created September 6, 2017 14:45
Show Gist options
  • Save jzaccone/43d9cdfb32e49606b5ed9591fc90fbef to your computer and use it in GitHub Desktop.
Save jzaccone/43d9cdfb32e49606b5ed9591fc90fbef to your computer and use it in GitHub Desktop.
# Get the state of your cluster
$ kubectl cluster-info
# Get all the nodes of your cluster
$ kubectl get nodes -o wide
# Get info about the pods of your cluster
$ kubectl get pods -o wide
# Get info about the replication controllers of your cluster
$ kubectl get rc -o wide
# Get info about the services of your cluster
$ kubectl get services
# Get full config info about a Service
$ kubectl get service NAME_OF_SERVICE -o json
# Get the IP of a Pod
$ kubectl get pod NAME_OF_POD -template={{.status.podIP}}
# Delete a Pod
$ kubectl delete pod NAME
# Delete a Service
$ kubectl delete service NAME_OF_SERVICE 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment