8. 考试小技巧
Using an alias for kubectl
$ alias k=kubectl
$ k versionSetting the namespace per context
$ kubectl config set-context <context-of-question> --namespace=<namespace-of-question>Deleting Kubernetes objects quickly
$ kubectl delete pod nginx --grace-period=0 --forceBash Commands
if [ ! -d ~/tmp ]; then mkdir -p ~/tmp; fi; while true; do echo $(date) >> ~/tmp/date.txt; sleep 5; done;counter=0; while true; do counter=$((counter+1)); echo "$counter"; sleep 1; done;while true; do random=$(((RANDOM % 100) + 1)); if [ $random -le 50 ]; then echo "$random"; else echo "END: $random"; break; fi; sleep 1; done;Kubernetes Object Information
Finding specific annotations
Finding all labels
最后更新于