Skip to content

Instantly share code, notes, and snippets.

@judavi
Last active May 2, 2020 09:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save judavi/c780aa5fa34a8fe82eb0274f395ace08 to your computer and use it in GitHub Desktop.
Save judavi/c780aa5fa34a8fe82eb0274f395ace08 to your computer and use it in GitHub Desktop.
CKAD

Links

Tips

  • kubectl completion bash
  • alias k=kubectl
  • create the file ~/.vimrc with the following content: set tabstop=2 set expandtab set shiftwidth=2
  • k delete pod x --grace-period 0 --force

Utils

  • byrnedo/alpine-curl (k run tmp --restart=Never --rm --image=byrnedo/alpine-curl -i curl 10.12.2.15)

  • watch -n 0.5 "kubectl config current-context; echo ''; kubectl config view | grep namespace; echo ''; kubectl get namespace,node,ingress,pod,svc,job,cronjob,deployment,rs,pv,pvc,secret,ep -o wide"

  • Busybox image kubectl run busybox --image=busybox --rm -it --restart=Never -- wget -O- 10.1.1.131:80

Preview questions

Generators

  • --generator=deployment/apps.v1

Allowed links

Jobs

  • kubectl create job pi --image=perl -- perl -Mbignum=bpi -wle 'print bpi(2000)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment