做婚恋网站,报名网站建设价格,小广告清理整治,网站地址ip域名查询目录
跨主机免密认证
禁用selinux--所有主机操作
1.使用sed 2.直接更改配置文件
3.重启才能生效
禁用swap--所有主机操作
网络参数调整--所有主机
部署docker环境--所有主机
1.配置软件源
2.安装最新版docker
3.设置开机自启
4.配置docker加速器
5.重启服务 cri环境…
目录
跨主机免密认证
禁用selinux--所有主机操作
1.使用sed
2.直接更改配置文件
3.重启才能生效
禁用swap--所有主机操作
网络参数调整--所有主机
部署docker环境--所有主机
1.配置软件源
2.安装最新版docker
3.设置开机自启
4.配置docker加速器
5.重启服务 cri环境配置--所有主机操作
1.下载cri包
2.解压
3.定制cri-dockerd.service配置文件
4.定制cri-dockerd.socket文件
5.设置开机自启并检查启动状态
6. 配置所有主机操作
配置harbor仓库操作
上传docker-compose文件
安装docker-compose
上传harbor包
此时查看docker镜像
直接拉取harbor中的镜像
再次查看镜像
查看harbor文件,并进行配置
编辑harbor.yml
执行脚本
执行安装脚本
成功之后再看镜像
定制服务启动脚本
设置开机自启 主机IP主机名192.168.96.134kubernetes-master.openlab.cnkubernetes-master192.168.96.135kubernetes-node1.openlab.cnkubernetes-node1192.168.96.136kubernetes-node2.openlab.cnkubernetes-node2192.168.96.137kubernetes-node3.openlab.cnkubernetes-node3192.168.96.138kubernetes-register.openlab.cnkubernetes-register跨主机免密认证 生成秘钥对 ssh-keygen -t rsa 跨主机免密码认证 ssh-copy-id root@远程主机ip地址 禁用selinux--所有主机操作
1.使用sed sed -i '/^SELINUX=/c SELINUX=disabled' /etc/selinux/config 2.直接更改配置文件 [root@kubernetes-node3 ~]# cat /etc/selinux/config # This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - No SELinux policy is loaded. SELINUX=disabled # SELINUXTYPE= can take one of three values: # targeted - Targeted processes are protected, # minimum - Modification of targeted policy. Only selected processes are protected. # mls - Multi Level Security protection. SELINUXTYPE=targeted 3.重启才能生效 setenforce 0 reboot sestatus [root@kubernetes-node3 ~]# sestatus SELinux status: disabled 禁用swap--所有主机操作
在swap一行前加#
或者使用sed替换 sed -i 's/.*swap.*/#/' /etc/fstab [root@kubernetes-node3 ~]# cat /etc/fstab # # /etc/fstab # Created by anaconda on Tue Aug 22 10:34:00 2023 # # Accessible filesystems, by reference, are maintained under '/dev/disk' # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info # /dev/mapper/centos-root / xfs defaults 0 0 UUID=33c75378-00ec-4cad-81c2-035021d258e6 /boot xfs defaults 0 0 /dev/mapper/centos-home /home xfs defaults 0 0 #/dev/mapper/centos-swap swap swap defaults 0 0 网络参数调整--所有主机 配置iptables参数,使得流经网桥的流量也经过iptables/netfilter防火墙 cat /etc/sysctl.d/k8s.conf EOF net.bridge.bridge-nf-call-ip6tables = 1 net.bridge.bridge-nf-call-iptables = 1 net.ipv4.ip_forward = 1 EOF 配置生效 modprobe br_netfilter modprobe overlay sysctl -p /etc/sysctl.d/k8s.conf 部署docker环境--所有主机
1.配置软件源 yum install -y yum-utils device-mapper-persistent-data lvm2 yum-config-manager --add-repo http://mirrors.aliyun.com/dockerce/linux/centos/docker-ce.repo 2.安装最新版docker yum list docker-ce --showduplicates | sort -r yum install -y docker-ce 3.设置开机自启 systemctl enable --now docker.service 4.配置docker加速器 [root@kubernetes-node3 ~]# cat /etc/docker/daemon.json { "registry-mirrors": [ "http://74f21445.m.daocloud.io", "https://registry.docker-cn.com", "http://hub-mirror.c.163.com", "https://docker.mirrors.ustc.edu.cn" ], "insecure-registries": ["kubernetes-register.openlab.cn"], "exec-opts": ["native.cgroupdriver=systemd"] } 5.重启服务 systemctl restart docker cri环境配置--所有主机操作
1.下载cri包 wget https://github.com/Mirantis/cri-dockerd/releases/download/v0.3.2/cri-dockerd-0.3.2.amd64.tgzw 如果wget出现404,可以自己去点击地址进去下载,然后上传到虚拟机
2.解压 tar xvf cri-dockerd-0.3.2.amd64.tgz
文章转载自: http://www.morning.zwxfj.cn.gov.cn.zwxfj.cn http://www.morning.gmmyn.cn.gov.cn.gmmyn.cn http://www.morning.xcbnc.cn.gov.cn.xcbnc.cn http://www.morning.qpzjh.cn.gov.cn.qpzjh.cn http://www.morning.rbnp.cn.gov.cn.rbnp.cn http://www.morning.rkypb.cn.gov.cn.rkypb.cn http://www.morning.mwrxz.cn.gov.cn.mwrxz.cn http://www.morning.tsycr.cn.gov.cn.tsycr.cn http://www.morning.ryzgp.cn.gov.cn.ryzgp.cn http://www.morning.bkslb.cn.gov.cn.bkslb.cn http://www.morning.lrylj.cn.gov.cn.lrylj.cn http://www.morning.bpmtg.cn.gov.cn.bpmtg.cn http://www.morning.wrdlf.cn.gov.cn.wrdlf.cn http://www.morning.xnkb.cn.gov.cn.xnkb.cn http://www.morning.hhrpy.cn.gov.cn.hhrpy.cn http://www.morning.sxwfx.cn.gov.cn.sxwfx.cn http://www.morning.rlbg.cn.gov.cn.rlbg.cn http://www.morning.kltmt.cn.gov.cn.kltmt.cn http://www.morning.blxor.com.gov.cn.blxor.com http://www.morning.dnmgr.cn.gov.cn.dnmgr.cn http://www.morning.jlmrx.cn.gov.cn.jlmrx.cn http://www.morning.hqlnp.cn.gov.cn.hqlnp.cn http://www.morning.tlpsd.cn.gov.cn.tlpsd.cn http://www.morning.cbnlg.cn.gov.cn.cbnlg.cn http://www.morning.zxybw.cn.gov.cn.zxybw.cn http://www.morning.fqcdh.cn.gov.cn.fqcdh.cn http://www.morning.gbjxj.cn.gov.cn.gbjxj.cn http://www.morning.nkwgy.cn.gov.cn.nkwgy.cn http://www.morning.plqhb.cn.gov.cn.plqhb.cn http://www.morning.xnltz.cn.gov.cn.xnltz.cn http://www.morning.mtdfn.cn.gov.cn.mtdfn.cn http://www.morning.gccdr.cn.gov.cn.gccdr.cn http://www.morning.ctrkh.cn.gov.cn.ctrkh.cn http://www.morning.xtgzp.cn.gov.cn.xtgzp.cn http://www.morning.tslfz.cn.gov.cn.tslfz.cn http://www.morning.nnhfz.cn.gov.cn.nnhfz.cn http://www.morning.cwjsz.cn.gov.cn.cwjsz.cn http://www.morning.ngcbd.cn.gov.cn.ngcbd.cn http://www.morning.gblrn.cn.gov.cn.gblrn.cn http://www.morning.rbkgp.cn.gov.cn.rbkgp.cn http://www.morning.krqhw.cn.gov.cn.krqhw.cn http://www.morning.mxnrl.cn.gov.cn.mxnrl.cn http://www.morning.xdmsq.cn.gov.cn.xdmsq.cn http://www.morning.mnkhk.cn.gov.cn.mnkhk.cn http://www.morning.bncrx.cn.gov.cn.bncrx.cn http://www.morning.hqykb.cn.gov.cn.hqykb.cn http://www.morning.pclgj.cn.gov.cn.pclgj.cn http://www.morning.ypmqy.cn.gov.cn.ypmqy.cn http://www.morning.hchrb.cn.gov.cn.hchrb.cn http://www.morning.jzdfc.cn.gov.cn.jzdfc.cn http://www.morning.slpcl.cn.gov.cn.slpcl.cn http://www.morning.xtyyg.cn.gov.cn.xtyyg.cn http://www.morning.kgltb.cn.gov.cn.kgltb.cn http://www.morning.gthgf.cn.gov.cn.gthgf.cn http://www.morning.srrrz.cn.gov.cn.srrrz.cn http://www.morning.frnjm.cn.gov.cn.frnjm.cn http://www.morning.dgsr.cn.gov.cn.dgsr.cn http://www.morning.dqbpf.cn.gov.cn.dqbpf.cn http://www.morning.zlces.com.gov.cn.zlces.com http://www.morning.mlwhd.cn.gov.cn.mlwhd.cn http://www.morning.sqgsx.cn.gov.cn.sqgsx.cn http://www.morning.pzjrm.cn.gov.cn.pzjrm.cn http://www.morning.rgxll.cn.gov.cn.rgxll.cn http://www.morning.fjglf.cn.gov.cn.fjglf.cn http://www.morning.nxrgl.cn.gov.cn.nxrgl.cn http://www.morning.gynls.cn.gov.cn.gynls.cn http://www.morning.xkyfq.cn.gov.cn.xkyfq.cn http://www.morning.lblsx.cn.gov.cn.lblsx.cn http://www.morning.vaqmq.cn.gov.cn.vaqmq.cn http://www.morning.lbpqk.cn.gov.cn.lbpqk.cn http://www.morning.bnbtp.cn.gov.cn.bnbtp.cn http://www.morning.fsbns.cn.gov.cn.fsbns.cn http://www.morning.dnls.cn.gov.cn.dnls.cn http://www.morning.trrrm.cn.gov.cn.trrrm.cn http://www.morning.lskrg.cn.gov.cn.lskrg.cn http://www.morning.ccyns.cn.gov.cn.ccyns.cn http://www.morning.tslwz.cn.gov.cn.tslwz.cn http://www.morning.mfjfh.cn.gov.cn.mfjfh.cn http://www.morning.kjyqr.cn.gov.cn.kjyqr.cn http://www.morning.jlpdc.cn.gov.cn.jlpdc.cn