We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
安装、使用等
The text was updated successfully, but these errors were encountered:
官方文档: https://docs.k3s.io/quick-start
Server 节点执行命令:curl -sfL https://get.k3s.io | sh - Agent 节点执行命令:curl -sfL https://get.k3s.io | K3S_URL=https://myserver:6443 K3S_TOKEN=mynodetoken sh -
curl -sfL https://get.k3s.io | sh -
curl -sfL https://get.k3s.io | K3S_URL=https://myserver:6443 K3S_TOKEN=mynodetoken sh -
设置 K3S_URL 参数会使 K3s 以 Worker 模式运行。K3s Agent 将注册到在 URL 上监听的 K3s Server。K3S_TOKEN 使用的值存储在 Server 节点上的 /var/lib/rancher/k3s/server/node-token 中。
K3S_URL
K3S_TOKEN
/var/lib/rancher/k3s/server/node-token
因为安装脚本会访问 github 等网站下载资源,所以如果有网络不通的问题,则需要转为使用离线安装,直接看官方文档即可: https://docs.k3s.io/installation/airgap
Sorry, something went wrong.
我这里使用的 K3s 版本为 v1.25.4+k3s1 (0dc63334), 自带了 Traefik Ingress Controller,并且会默认使用主机的 80, 443 端口,所以安装前先注意是否存在端口冲突。
v1.25.4+k3s1 (0dc63334)
如果想要修改默认端口号,可以编辑此文件: /var/lib/rancher/k3s/server/manifests/traefik-config.yaml
/var/lib/rancher/k3s/server/manifests/traefik-config.yaml
apiVersion: helm.cattle.io/v1 kind: HelmChartConfig metadata: name: traefik namespace: kube-system spec: valuesContent: |- ports: web: exposedPort: 6060 websecure: exposedPort: 6443
其中 6060, 6443 就是 http, https 对应的端口号了,然后重启 k3s 服务或者 kubectl apply -f /var/lib/rancher/k3s/server/manifests/traefik-config.yaml。
kubectl apply -f /var/lib/rancher/k3s/server/manifests/traefik-config.yaml
如果需要查看 Traefik Dashboard,则需要做端口转发:
kubectl -n kube-system port-forward $(kubectl -n kube-system get pods --selector "app.kubernetes.io/name=traefik" --output=name) 9000:9000
No branches or pull requests
安装、使用等
The text was updated successfully, but these errors were encountered: