You are on page 1of 1

Kubernetes Cheat Sheet

by afarghaly (afarghaly) via cheatography.com/144771/cs/31092/

Basics ReplicaSet

kubectl run <ku​‐ Deploy an app on the kubectl get replicaset Show replica
be> cluster sets in a
kubectl cluste​r- view info about the cluster

info cluster kubectl edit replic​ase​‐ Edit replica


kubectl get node list all the nodes ts.apps <re​pli​caset name> set inline

kubectl create -f Create a resource from kubectl scale --repl​icas=6 scale replica
<fi​len​ame.ya​ml> a file -f replic​ase​t-d​efi​nit​ion.yml set and
update file
kubectl apply -f Apply a config​uration to
<fi​len​ame.ya​ml> a resource by filename kubectl scale --repl​icas=6 scale replica
-f replicaset myapp-​rep​‐ set by type
kubectl replace - Replace a config​uration
licaset
f <fi​len​ame.ya​‐ to a resource by
ml> filename
Deployment

Pods

kubectl run <po​‐ creates a pod and set


dna​me> --image an image
<image name>
kubectl get pods shows pods in a cluster
kubectl describe gives more details
pod <po​dna​me> about specific pods
kube get pods -o shows pods details .. its
wide > get pods and <
describe pod
commands
kubectl delete deletes a specific pod
pod <po​dna​me>

By afarghaly (afarghaly) Not published yet. Sponsored by Readable.com


cheatography.com/afarghaly/ Last updated 9th March, 2022. Measure your website readability!
Page 1 of 1. https://readable.com

You might also like