alias k=kubectl kubeadm init --apiserver-advertise-address $(hostname -i) --pod-network-cidr 10.5.0.0/16 k apply -f https://raw.githubusercontent.com/cloudnativelabs/kube-router/master/daemonset/kubeadm-kuberouter.yaml complete -F __start_kubectl k export do="--dry-run=client -o yaml" export dd "--grace-period=0 --force" k get node node1 -o custom-colums=NODE:.spec.taints taint=$(k describe node node1 | grep -i taint | awk '{print $2}') k create cm foo --from-env-file=file.env $do > o.yaml k delete all --all $dd #vim :set tabstop=2 k taint node node1 $taint- # Get current ip address curl ifconfig.io ns = namespace-name k create ns $ns k config set-context --current $ns k config view | grep -i namespace k set image pod = apt install bash-completion source <(kubectl completion bash) echo "source <(kubectl completion bash)" >> $HOME/.bashrc k get nodes k describe node k taint :taint-name- k create bb --image busybox --dry-run=client -o yaml -c "while true" kubectl -A = kubectl --all-namespaces #export KUBECONFIG=path1:path2:path3 kubectl config set-context --current --namespace=NAMESPACE k get pods k get all k run tmp --restart=Never --rm --image=busybox -i -- wget -O- 10.12.2.15 k run tmp --restart=Never --rm --image=busybox -i -- wget -O- 10.12.2.15 k -n sun create deployment sunny --image=nginx:1.17.3-alpine $do > p2_sunny.yaml k -n sun expose -h # help k -n sun expose deployment sunny --name sun-srv --port 9999 --target-port 80 k run tmp --restart=Never --rm -i --image=nginx:alpine -- curl -m 5 sun-srv.sun:9999 k -n earth get all k -n earth get deploy earth-3cc-web k -n earth edit deploy earth-3cc-web k -n earth get pod -l id=earth-3cc-web k -n earth get pod -l id=earth-3cc-web k run tmp --restart=Never --rm -i --image=nginx:alpine -- curl -m 5 earth-3cc-web.earth:6363 k run frontend --image=nginx --restart=Never --port=80 k api-resources k describe k explain pods.spec k delete --grace-period=0 --force