Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

  • kubectl get clusterrolebinding   (useful in giving permission super user to access API’s and kube dashboard)
  • kubectl edit svc/kubernetes-dashboard --namespace=kube-system (Command to edit a service yaml)
  • kubectl create clusterrolebinding serviceaccounts-cluster-admin --clusterrole=cluster-admin --group=system:serviceaccounts  (grant super-user access to all service accounts cluster-wide)
  • kubectl edit svc/kube-dns --namespace=kube-system (edit yaml of a service)
  • kubectl get jobs | cut -c 1-15 | grep -v 'NAME' | xargs kubectl delete job     (delete all jobs)
  • docker rm $(docker ps -a -f status=exited -q)   (delete all exited docker containers)
  • kubectl get pods --show-all |grep -e "Error" -e "Completed" | cut -f1 -d ' ' | xargs kubectl delete pods (to delete error and  completed pods )
  • No labels