Image Image Image Image Image
Scroll to Top

To Top

Devops

17

Apr
2018

No Comments

In Devops

By Manny

kubernetes cheatsheet, commands to remember

On 17, Apr 2018 | No Comments | In Devops | By Manny

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

Tags |