安装文档:https://kubesphere.com.cn/docs/quick-start/minimal-kubesphere-on-k8s/

相关文档:https://v2-1.docs.kubesphere.io/docs/zh-CN/installation/intro/#%E5%AE%89%E8%A3%85%E5%9C%A8-kubernetes

1、部署

k8s在线安装:https://v2-1.docs.kubesphere.io/docs/zh-CN/installation/install-on-k8s/

  1. 安装

最小化安装

  1. kubectl apply -f https://raw.githubusercontent.com/kubesphere/ks-installer/v2.1.1/kubesphere-minimal.yaml

完整安装

  1. wget https://raw.githubusercontent.com/kubesphere/ks-installer/v2.1.1/kubesphere-complete-setup.yaml
  2. kubectl apply -f https://raw.githubusercontent.com/kubesphere/ks-installer/v2.1.1/kubesphere-complete-setup.yaml
  1. 检查安装日志:
  1. kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l app=ks-install -o jsonpath='{.items[0].metadata.name}') -f
  1. 使用 kubectl get pod —all-namespaces 查看所有 Pod 是否在 KubeSphere 的相关命名空间中正常运行。如果是,请通过以下命令检查控制台的端口(默认为 30880):
  1. kubectl -n kubesphere-system expose deployment hostnames --port=30880 --target-port=30880
  2. apiVersion: v1
  3. kind: Service
  4. metadata:
  5. name: ks-console
  6. namespace: kubesphere-system
  7. labels:
  8. app: ks-install
  9. spec:
  10. ports:
  11. - name: ks-install
  12. port: 30880
  13. targetPort: ks-install
  14. type: NodePort
  15. selector:
  16. app: ks-install
  1. kubectl get svc/ks-console -n kubesphere-system
  1. 确保在安全组中打开了端口 30880,并通过 NodePort (IP:30880) 使用默认帐户和密码 (admin/P@88w0rd) 访问 Web 控制台。
  2. 登录控制台后,您可以在系统组件中检查不同组件的状态。如果要使用相关服务,可能需要等待某些组件启动并运行。