Ubuntu 搭建Kubernetes 1.28版本集群
一、环境依赖(所有节点执行)
安装 SSH 服务
sudo apt-get install openssh-server
vim /etc/ssh/sshd_config # 修改 PermitRootLogin yes
systemctl restart sshd
SSH 免密登录
ssh-keygen -t rsa
ssh-copy-id user@remote_host
设置主机名
hostnamectl set-hostname xxx # 确保节点名称唯一
时间同步
sudo apt-get install ntpdate
crontab -e # 添加: 0 */1 * * * ntpdate time1.aliyun.com
关闭防火墙
systemctl stop firewalld && systemctl disable firewalld
# 或
ufw disable