Commands cheat sheet
Get shell on node with debug pod
kubectl debug node/<node-name> -it --image=<image name>kubectl debug --image=alpine --namespace=<namespace> node/<node-name> --attach=true --stdin=true --tty -- shNode taint NoSchedule
Add
kubectl taint nodes node1 key1=value1:NoScheduleRemove
kubectl taint nodes node1 key1=value1:NoSchedule-Set editor for kubectl
export KUBE_EDITOR="nano"Example with creating admin user and getting token
Creating a admin / service account user called k8sadmin
sudo kubectl create serviceaccount k8sadmin -n kube-systemGive the user admin privileges
sudo kubectl create clusterrolebinding k8sadmin --clusterrole=cluster-admin --serviceaccount=kube-system:k8sadminGet the token
Last updated