1.1.操作系统版本
银河麒麟V10SP3
[root@localhost ~]# cat /etc/os-release NAME="Kylin Linux Advanced Server" VERSION="V10 (Lance)" ID="kylin" VERSION_ID="V10" PRETTY_NAME="Kylin Linux Advanced Server V10 (Lance)" ANSI_COLOR="0;31"
1.2.sealos版本
sealos version Version: 3.3.9-rc.11 Last Commit: 49e79d2 Build Date: 2022-02-17T06:17:34Z
1.3.k8s版本
kubectl version
Client Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.8", GitCommit:"7061dbbf75f9f82e8ab21f9be7e8ffcaae8e0d44", GitTreeState:"clean", BuildDate:"2022-03-16T14:10:06Z", GoVersion:"go1.16.15", Compiler:"gc", Platform:"linux/arm64"} Server Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.8", GitCommit:"7061dbbf75f9f82e8ab21f9be7e8ffcaae8e0d44", GitTreeState:"clean", BuildDate:"2022-03-16T14:04:34Z", GoVersion:"go1.16.15", Compiler:"gc", Platform:"linux/arm64"}
1.4.containerd版本
crictl version
Version: 0.1.0 RuntimeName: containerd RuntimeVersion: v1.4.4 RuntimeApiVersion: v1alpha2
1.5.主机安排
master3台,node2台,全部CPU为arm64,地址从10.0.0.221-10.0.0.225
2.1.配置yum源
vi /etc/yum.repos.d/kylin_aarch64.repo [ks10-adv-czt] name = Kylin Linux Advanced Server 10 - czt baseurl = http://10.0.0.241:8090/mirror/kylinv10/ gpgcheck = 0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-kylin enabled = 1 其他源都珊瑚
2.2.安装nfs服务
yum install -y nfs-utils.aarch64
2.3.下载文件
mount 10.0.10.205:/home/software /mnt cd /mnt/sealos/sealos-arm cp kube1.22.8.tar.gz sealos /root
2.4.主机名配置
hostnamectl set-hostname [主机名] #ky-k8s-1至ky-k8s-5共5台主机名 vi /etc/hosts 10.0.0.221 ky-k8s-1 10.0.0.222 ky-k8s-2 10.0.0.223 ky-k8s-3 10.0.0.224 ky-k8s-4 10.0.0.225 ky-k8s-5
2.5.时间同步(麒麟系统自带了chronyd)
五台主机时间保持一致,如果没有时间同步服务器,就都与第一台保持一致即可。
vi /etc/chrony.conf server 10.0.0.221 iburst systemctl start chronyd //开启时间同步 systemctl enable chronyd //设置时间同步开机自启
2.6.禁用iptables和firewalld
systemctl stop firewalld systemctl disable firewalld systemctl stop iptables systemctl disable iptables
2.7.禁用selinux(linux下的一个安全服务,必须禁用)
setenforce 0 vi /etc/selinux/config SELINUX=disabled
2.8.禁用swap分区(主要是注释最后一行)
vi /etc/fstab # /dev/mapper/centos-swap swap swap defaults 0 0 //注释这条
2.9.修改系统的内核参数
vi /etc/sysctl.d/kubernetes.conf 添加以下内容: net.bridge.bridge-nf-call-ip6tables = 1 net.bridge.bridge-nf-call-iptables = 1 net.ipv4.ip_forward = 1
重新加载配置:
sysctl -p net.ipv4.ip_forward = 0 net.ipv4.conf.all.send_redirects = 0 net.ipv4.conf.default.send_redirects = 0 net.ipv4.conf.all.accept_source_route = 0 net.ipv4.conf.default.accept_source_route = 0 net.ipv4.conf.all.accept_redirects = 0 net.ipv4.conf.default.accept_redirects