Justin's Developer Notes logo Justin's Developer Notes

Commands for Kubernetes

Here are the commands that I’ve used for Kubernetes before.

List all Pods

kubectl get pods

List all Services

kubectl get services

Create a new Deployment

kubectl create -f games.yaml

Delete a Deployment

kubectl delete -f games.yaml

Wait for the Status of a Service

kubectl get service dont-starve --watch

Useful for the IP address of the service.

Get the STDOUT STDERR of a pod that is running a Service

kubectl logs dont-starve-403593606-zqb6w