|NO.Z.00008|——————————|^^ 部署 ^^|——|Kubernetes&二进制部署.V04|——|部署Docker集群|

一、部署Docker:(etc-1/etc-2/etc-3均操作)
### --- 下载docker版本包:
~~~     以下在所有节点操作,这里采用二进制安装,用yum安装也一样
~~~     下载地址:https://download.docker.com/linux/static/stable/x86_64/docker-19.03.9.tgz

[root@k8s-master ~]# wget -c https://download.docker.com/linux/static/stable/x86_64/docker-19.03.9.tgz
### --- 解压二进制包:

[root@k8s-master ~]# tar -zxvf docker-19.03.9.tgz 
[root@k8s-master ~]# mv docker/* /usr/bin
### --- systemd管理docker

[root@k8s-master ~]# cat > /usr/lib/systemd/system/docker.service << EOF
> [Unit]
> Description=Docker Application Container Engine
> Documentation=https://docs.docker.com
> After=network-online.target firewalld.service
> Wants=network-online.target
> [Service]
> Type=notify
> ExecStart=/usr/bin/dockerd
> ExecReload=/bin/kill -s HUP $MAINPID
> LimitNOFILE=infinity
> LimitNPROC=infinity
> LimitCORE=infinity
> TimeoutStartSec=0
> Delegate=yes
> KillMode=process
> Restart=on-failure
> StartLimitBurst=3
> StartLimitInterval=60s
> [Install]
> WantedBy=multi-user.target
> EOF
### --- 创建配置文件
~~~     registry-mirrors阿里云镜像加速器

[root@k8s-master ~]# mkdir /etc/docker
[root@k8s-master ~]# cat > /etc/docker/daemon.json << EOF
> {
>     "registry-mirrors": ["https://b9pmyelo.mirror.aliyuncs.com"]
> }
> EOF
### --- 启动并设置开机启动

[root@k8s-master ~]# systemctl daemon-reload
[root@k8s-master ~]# systemctl start docker
[root@k8s-master ~]# systemctl enable docker
### --- 同理部署net-2/net-3节点
 
[root@k8s-master ~]# scp docker-19.03.9.tgz root@10.10.10.12:/root/                                                                                                                              100%   58MB  57.9MB/s   00:01    
[root@k8s-master ~]# scp docker-19.03.9.tgz root@10.10.10.13:/root/

 
 
 
 
 
 
 
 
 

Walter Savage Landor:strove with none,for none was worth my strife.Nature I loved and, next to Nature, Art:I warm'd both hands before the fire of life.It sinks, and I am ready to depart
                                                                                                                                                   ——W.S.Landor

 

 

posted on   yanqi_vip  阅读(5)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示