Kubernetes one line commands

These are the commands which can be used as kubernetes cheatsheet in our daily life as a DevOps. This is helpful for me, rather than searching on the internet I will keep this cheatsheet for me in my own website. These are the one liner kubectl command

Run a deployment using nginx image

kubectl create deployment nginx --image=nginx

Expose a port using service

kubectl create service nodeport nginx --tcp=80:80

Scale a deployment

kubectl scale --replicas 5 deployment nginx

That’s all for now

Leave a Reply

Your email address will not be published. Required fields are marked *