kubete init初始化 爬坑记录


//解决报错问题:[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10255/healthz' failed with error: Get http://localhost:10255/healthz: dial tcp [::1]:10255: getsockopt: connection refused.

vi /etc/systemd/system/kubelet.service.d/10-kubeadm.conf

Environment="KUBELET_CGROUP_ARGS=--cgroup-driver=cgroupfs"
Environment="KUBELET_EXTRA_ARGS=--fail-swap-on=false"


//双机秘钥认证访问
ssh-keygen
ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected]

ssh-copy-id -i ~/.ssh/id_rsa.pub  [email protected]
ssh-copy-id -i ~/.ssh/id_rsa.pub "-p 20022 [email protected]"
cat ~/.ssh/id_rsa.pub | ssh user@IP "cat - >> ~/.ssh/authorized_keys"


//安装前筛选 特定版本的 Docker

yum list docker-ce --showduplicates | sort -r
yum list containerd.io --showduplicates | sort -r    
yum list kubelet --showduplicates | sort -r    

//完整移除特定版本 docker
yum remove docker-ce docker-ce-cli containerd.io
yum remove docker-selinux



配置各节点阿里K8S YUM源

cat <<EOF > /etc/yum.repos.d/kubernetes.repo

[kubernetes]
name=Kubernetes
baseurl=https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=0

EOF

yum -y install epel-release

yum clean all

yum makecache


猜你喜欢

转载自www.cnblogs.com/walkersss/p/11738838.html