- 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 )
General
Content
Integrations