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