Here are some useful kubernetes commands for future to me to look back on and remember. Maybe you find them useful too.

get pods
kubectl get po
and
kubectl get po -w
-w is for watch so you can watch your pods die and come back to life

create deploy
kubectl create -f myawesomeconfig.yml

delete deploy
kubectl delete my-not-so-awesome-deployment

exec into pod
ssh into pod to do terminal stuff like working with your interactive Python, PHP or node shells
kubectl exec -ti my-awesome-app-1234 bash

get services
kubectl get sv
and
kubectl get services

read logs
kubectl logs my-awesome-app

decribe pods, get detailed information about the pods status
kubectl describe po my-awesome-app

Categories: Devops