k3s server
设置hostname:
hostnamectl set-hostname server.cluster.k3s
curl -sfL https://rancher-mirror.rancher.cn/k3s/k3s-install.sh | INSTALL_K3S_MIRROR=cn INSTALL_K3S_EXEC="--docker --node-ip=118.24.183.17" sh -
设置kubectl:
cp /etc/rancher/k3s/k3s.yaml ~/.kube/config
查看token:
cat /var/lib/rancher/k3s/server/token
k3s agent
设置hostname
hostnamectl set-hostname agent1.cluster.k3s
curl -sfL https://rancher-mirror.rancher.cn/k3s/k3s-install.sh | INSTALL_K3S_MIRROR=cn K3S_URL=https://118.24.183.17:6443 K3S_TOKEN=847ff8c715ec742da8300bdfa40156a7 INSTALL_K3S_EXEC="--docker --node-ip=124.222.56.34" sh -
网友评论