Kubernetes Cookbok

Quick command snippets to interact with Kubernetes.

  • kubectl get pods selector app=somesystem
  • kubectl get jobs
  • kubectl exec -it podname -- bash
  • kubectl proxy -p 8123
  • kubectl replace -f blah
  • kubectl scale deployment appname replicas=3
  • kubectl describe podname
  • kubectl port-forward
  • kubectl get configmaps
  • kubectl get configmaps blah-config -o yml
  • kubectl delete pods --selector app=card
  • kubectl apply -f kube/deployment.yml
  • kubectl apply -f kube/test/config/configmap.yml
  • kubectl