In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Kubernetes Command Summary set
Turn off virtual memory
Swapoff-avim / etc/fstabl#/dev/mapper/centos-swap swap
View docker environment variabl
Systemctl show-property=Environment docker
Set up agent to cancel agent
Export http_proxy= "http://127.0.0.1:8123/"unset http_proxy
View token
Kubeadm token list
Get the token command in SA
Kubectl-n kube-system get secret admin-token-nwphb-o jsonpath= {.data.token} | base64-dkubectl-n kube-system describe secret `data.token} | grep admin-token | cut-d ""-f1` | grep "token:" | tr-s "" | cut-d ""-f2
Generate token
Head-c 16 / dev/urandom | od-An-t x | tr-d''
Regenerate token that joins node
Kubeadm token create-print-join-command
View node noready reason
Journalctl-f-u kubelet
View the software version
Yum search-showduplicates xxx
Install a specific version of the software
Apt-get install-y kubelet=1.11.3-00 kubeadm=1.11.3-00 kubectl=1.11.3-00yum install-y kubelet-1.11.3 kubeadm-1.11.3 kubectl-1.11.3
Kubernetes cluster initialization
Kubeadm reset
View the images required for a specific version of kubernetes
Kubeadm-kubernetes-version=1.11.0 config images list
Force deletion of pod that has always belonged to terminating
Kubectl delete pod $POD_ID-force-grace-period=0
Deploy pod,deployment,daemonset, etc.
Kubectl create-f xxxkubectl apply-f xx
Deploy pod,deployment,daemonset, etc.
Kubectl set image deployment/nginx-deployment nginx=nginx:1.91-- recordkubectl apply-f xx (must be created through xx)
Taint the node
Kubectl taint nodes =: NoSchedule
Restore the node from the taint
Kubectl taint nodes =: NoSchedule-
Quarantine node | expel
Kubectl cordon kubectl drain
Restore node from quarantined state
Kubectl uncordon
Add node tags
Kubectl label pod redis role=backend
Delete node tags
Kubectl label pod redis role-
Summary of the record, continue to add!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.