教程参考
https://www.kubesphere.io/zh/docs/v3.3/installing-on-linux/public-cloud/install-kubesphere-on-ali-ecs/
环境配置
- 关闭防火墙
- 关闭selinux
- 关闭swap分区
- 时间同步
- hosts解析
- 内核参数设置
- 检查DNS
- 安装ipvs
- 安装依赖组件
- 安装、设置docker
每台机器都需要操作
#安装工具
yum -y install net-tools# 如果下载不行,设置一个repo
# sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
# sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*##关闭防火墙
systemctl stop firewalld.service
systemctl disable firewalld.service##时间同步
yum install ntpdate -y
ntpdate pool.ntp.org
timedatectl set-timezone Asia/Shanghai# 将 SELinux 设置为 permissive 模式(相当于将其禁用)
sudo setenforce 0
sudo sed -i 's/^SELINUX=enforcing$/SELINUX=permissive/' /etc/selinux/config#关闭swap
swapoff -a
sed -ri 's/.*swap.*/#&/' /etc/fstab#允许 iptables 检查桥接流量
cat <<EOF | sudo tee /etc/modules-load.d/k8s.conf
br_netfilter
EOFcat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
EOF
sudo sysctl --system
安装Docker
sudo yum remove docker*
sudo yum install -y yum-utils#配置docker的yum地址
sudo yum-config-manage