K8S
安装docker
1 | sudo yum remove docker \ |
kubaadm 引导初始化K8S集群
1 | kubeadm init --pod-network-cidr 10.244.0.0/16 --control-plane-endpoint k8s-control-plane-endpoint-vip:6443 --upload-certs --kubernetes-version=v1.22.1 |
1 | 加入控制平面 |
K8S客户端
1 | export KUBECONFIG=/etc/kubernetes/admin.conf |
K8S资源负载情况
1 | curl -L https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.3.6/components.yaml \ |
1 | # echo "serverTLSBootstrap: true" >> /var/lib/kubelet/config.yaml |
K8S 资源限制
1 | echo "===prepare workspace===" |
K8S重启失败
1 | systemctl status kubelet -n 1000 |
重装
1 | kubeadm reset |
simple Java Project
1 | echo -e "===prepare workspace===" |
k8s强制重启pod
1 | kubectl replace --force -f xxx.yaml |