Kubernetes Shortcuts
po
: Podsrs
: ReplicaSetsdeploy
: Deploymentssvc
: Servicesns
: Namespacesnetpol
: Network policiespv
: Persistent Volumespvc
: PersistentVolumeClaimsin
: Service Accounts
Backup
root@vagrant:/home/vagrant# kubectl get all -A -o yaml > backup.yaml
Explain
root@vagrant:/home/vagrant# kubectl explain sc --recursive | less
Pods
#List Pod
root@vagrant:/home/vagrant# kubectl get pods
root@vagrant:/home/vagrant# kubectl get pods -o wide
root@vagrant:/home/vagrant# kubectl get pods -n kube-system
root@vagrant:/home/vagrant# kubectl get pods --selector app=test-application,env=develop
root@vagrant:/home/vagrant# kubectl get pods -l app=test-application,env=develop
root@vagrant:/home/vagrant# kubectl get pods --all-namespaces
root@vagrant:/home/vagrant# kubectl get pods --show-labels#Pod Status
root@vagrant:/home/vagrant# kubectl describe pod mypod#Create Pod
root@vagrant:/home/vagrant# kubectl run mypod --image nginx