以v1.28.14+k3s1为例 一、准备机器 master:192.168.5.200 worker:192.168.5.200 修改hostname hostnamectl set-hostname <hostname> 关闭防火墙 systemctl stop firewalld sy
需要修改ConfigMap的kubeconfig 需要修改两处(可能) kube-public / ConfigMap / cluster-info / kubeconfig default / ConfigMap / kube-config / kube-config 之中的server 字段
Contianerd作为容器 #!/bin/bash # 下面的镜像应该去除"k8s.gcr.io/"的前缀 if [ ! -n "$1" ]; then echo -e "\033[31;1m请输入版本 如 1.23.17 \033[0m" exit 1 fi version=$1
中国镜像安装 curl -sfL https://rancher-mirror.rancher.cn/k3s/k3s-install.sh | INSTALL_K3S_MIRROR=cn sh - 用docker作为容器 curl -sfL https://rancher-mirror.ranche
一键删除所有状态为Fail的Pod kubectl get pods --all-namespaces --field-selector=status.phase=Failed -o json | kubectl delete -f - 加入节点master获取命令 kubeadm token cr