k8s在部署etcd单节点报错
failed to dial fab7ddbd0aa3e803 on stream Message (dial t…out)

这里需要安装docker环境,下面是docker一键部署安装

#!/bin/bash
yum install -y yum-utils device-mapper-persistent-data lvm2
if [ $? = 0 ];then
echo "依赖包安装完成"
else
echo "依赖包安装失败,正在退出..."
exit 1
fi
yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
if [ $? = 0 ];then
echo "依赖包安装完成"
else
echo "依赖包安装失败,正在退出..."
exit 1
fi
yum install docker-ce
if [ $? = 0 ];then
echo "依赖包安装完成"
else
echo "依赖包安装失败,正在退出..."
exit 1
fi
systemctl start docker.service 
cd /etc/docker/
tee /etc/docker/daemon.json <<-'EOF'
{
  "registry-mirrors": ["https://ctzniuyu.mirror.aliyuncs.com"]
}
EOF
systemctl daemon-reload 
systemctl restart docker
sed -i '$anet.ipv4.ip_forward=1' /etc/sysctl.conf
sysctl -p
systemctl restart docker
service network restart 

Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐