Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
  • kubectl get clusterrolebinding   clusterrolebinding (useful in giving permission super user Gives permission to Super User to access API’s and kube Kube dashboard)
  • kubectl edit svc/kubernetes-dashboard --namespace=kube-system sstem (Command to edit Edits a service yaml)
  • kubectl create clusterrolebinding serviceaccounts-cluster-admin --clusterrole=cluster-admin --group=system:serviceaccounts   (grant super-user Grants access to all service accounts cluster-wide service accounts to the Super User)
  • kubectl edit svc/kube-dns --namespace=kube-system (edit Edits yaml of a service)
  • kubectl get jobs | cut -c 1-15 | grep -v 'NAME' | xargs kubectl delete job      (delete Deletes all jobs)
  • docker rm $(docker ps -a -f status=exited -q)    (delete Deletes all exited docker containersDocker Containers)
  • kubectl get pods --show-all |grep -e "Error" -e "Completed" | cut -f1 -d ' ' | xargs kubectl delete pods (to delete error and  completed Deletes errors and completed pods )