K8s报错#!/bin/bash yum install -y yum-utils device-mapper-persistent-data lvm2 if [ $? = 0 ];then echo
k8s在部署etcd单节点报错failed to dial fab7ddbd0aa3e803 on stream Message (dial t…out)这里需要安装docker环境,下面是docker一键部署安装#!/bin/bashyum install -y yum-utils device-mapper-persistent-data lvm2if [ $? = 0 ];thenecho
·
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
更多推荐
已为社区贡献6条内容
所有评论(0)