小白安装K8S Kubernetes集群 一起学
准备工作 安装系统 wget --no-check-certificate -qO InstallNET.sh 'https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh' && chmod a+x InstallNET.sh bash InstallNET.sh -alpine reboot 22 root LeitboGi0ro 挂载模式配置 mount --make-rshared / 修改主机名,主机解析 hostname_use= k8s-master ipv4_address=$(curl -s ipv4.ip.sb) echo "$hostname_use" > /etc/hostname hostname "$hostname_use" cat > /etc/hosts << EOF 127.0.0.1 localhost $ipv4_address $hostname_use EOF 调整内核网桥参数加载生效 cat <<EOF > /etc/sysctl.d/k8s.conf net.bridge.bridge-nf-call-ip6tables = 1 net.bridge.bridge-nf-call-iptables = 1 net.ipv4.ip_forward=1 vm.max_map_count=262144 EOF modprobe br_netfilter sysctl -p /etc/sysctl.d/k8s.conf alpine 安装docker和安装k8s部署工具 apk update && apk upgrade apk add docker docker-compose kubelet kubeadm kubectl rc-update add docker default service docker start rc-update add kubelet default service kubelet start KBS使用 初...