基於現有Kubernetes集羣部署KubeSphere管理平臺

一、前言

檢查當前系統資源

  • 如需在 Kubernetes 上安裝 KubeSphere 3.3.0,您的 Kubernetes 版本必須爲:v1.19.x,v1.20.x,v1.21.x,v1.22.x 或 v1.23.x(實驗性支持)。
  • 確保您的機器滿足最低硬件要求:CPU > 1 核,內存 > 2 GB。
  • 在安裝之前,需要配置 Kubernetes 集羣中的默認存儲類型

安裝Staorage

#kubecel create ns openebs
#kubectl apply -f https://openebs.github.io/charts/openebs-operator.yaml
#kubectl get pod -n openebs
設置openebs爲默認存儲
#kubectl patch storageclass openebs-hostpath -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'

 

 

 

 安裝Kubesphere

下載kubesphere相關yaml文件並進行安裝
#wget https://github.com/kubesphere/ks-installer/releases/download/v3.3.0/kubesphere-installer.yaml
#kubectl apply -f kubesphere-installer.yaml
#wget https://github.com/kubesphere/ks-installer/releases/download/v3.3.0/cluster-configuration.yaml
#kubectl apply -f cluster-configuration.yaml
檢查安裝日誌
#kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l 'app in (ks-install, ks-installer)' -o jsonpath='{.items[0].metadata.name}') -f

 確保在安全組中打開了端口 30880,並通過 NodePort (IP:30880) 使用默認帳戶和密碼 (admin/P@88w0rd) 訪問 Web 控制檯。

root@k8s-master01 ~]# kubectl get svc/ks-console -n kubesphere-system
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
ks-console NodePort 192.168.183.145 <none> 80:30880/TCP 127m

驗證

登陸控制檯後,可以在系統組件中檢查不同組件的狀態。如果需要使用相關服務,可能需要等待某些組件啓動並運行

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章