kubesphere
安装容器管理平台
市面上存在很多开源的容器管理平台,可以帮助用户快速管理k8s平台中的业务服务,今天学习下kubesphere
的使用。
安装
安装的版本为v3.3.1
-
前置要求
- 要求集群中存在默认的
StorageClass
,上篇中我们把nfs设置为了集群默认的存储类,因此满足要求。 - 集群安装metrics-server
https://kubesphere.com.cn/docs/v3.3/installing-on-kubernetes/introduction/prerequisites/
- 要求集群中存在默认的
-
下载初始化安装文件
wget https://github.com/kubesphere/ks-installer/releases/download/v3.3.1/kubesphere-installer.yaml
wget https://github.com/kubesphere/ks-installer/releases/download/v3.3.1/cluster-configuration.yaml
wget https://raw.githubusercontent.com/kubesphere/notification-manager/master/config/bundle.yaml或者从网盘中获取:链接: https://pan.baidu.com/s/1Cb4xT-oJiodC2g66wIy3eQ 提取码: uk4s
-
修改配置
由于我们环境中已经安装过Prometheus,因此修改kubesphere的配置,连接已有的prometheus服务
# 修改43和44行
$ vim cluster-configuration.yaml
...
41 volumeSize: 20Gi # Minio PVC size.
42 monitoring:
43 type: external # Whether to specify the external prometheus stack, and need to modify the endpoint at the next line
44 endpoint: http://prometheus.monitor.svc:9090 # Prometheus endpoint to get metrics data.
... -
安装
kubectl apply -f kubesphere-installer.yaml
kubectl apply -f cluster-configuration.yaml
kubectl apply -f bundle.yaml
# 查看安装器日志
kubectl -n kubesphere-system get pod
ks-installer-746f68548d-fc5tk 1/1 Running 0 2m4s
kubectl -n kubesphere-system logs -f ks-installer-746f68548d-fc5tk -
卸载
# 如果想卸载kubesphere
https://github.com/kubesphere/ks-installer/blob/release-3.3/scripts/kubesphere-delete.sh