安装helm3(不推荐使用helm2)

前提k8s集群已经搭建好

先下载get_helm.sh(https://github.com/helm/helm/blob/master/scripts/get-helm-3)

chmod 700 get_helm-3.sh
./get_helm-3.sh

Centos7.7下KubeSphere最小化安装和定制化配置安装

确认安装:

helm version

Centos7.7下KubeSphere最小化安装和定制化配置安装

确认master是否有污点

kubectl describe node k8s-node1 | grep Taint

Centos7.7下KubeSphere最小化安装和定制化配置安装

去除污点

kubectl taint nodes k8s-node1 node-role.kubernetes.io/master:NoSchedule-

Centos7.7下KubeSphere最小化安装和定制化配置安装

安装OpenEBS(安装过程来自官网)

Create OpenEBS namespace:

kubectl create ns openebs

Install openebs with chart name as openebs

helm repo add openebs https://openebs.github.io/charts
helm repo update
helm install openebs openebs/openebs

等待几分钟,创建完毕,验证安装

helm ls

Centos7.7下KubeSphere最小化安装和定制化配置安装

集群已有存储类型(StorageClass),执行 kubectl get sc看下当前是否设置了默认的 storageclass

Centos7.7下KubeSphere最小化安装和定制化配置安装

将openebs-hostpath设置为默认的storageClass

kubectl patch storageclass openebs-hostpath -p '{"metadata":{"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'

修改完成后,我们就可以看到openebs-hostpath被设置为默认storageClass

Centos7.7下KubeSphere最小化安装和定制化配置安装

最小化安装

kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.0.0/kubesphere-installer.yaml
kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.0.0/cluster-configuration.yaml
kubectl get pods --all-namespaces
## 等待ks-installer安装完毕

Centos7.7下KubeSphere最小化安装和定制化配置安装

kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l app=ks-install -o jsonpath='{.items[0].metadata.name}') -f

等待一段时间,一直在打印日志(网速慢的话可能要十来分钟),直到出现kubesphere控制台:

Centos7.7下KubeSphere最小化安装和定制化配置安装

访问console,输入出现的account和password,进入首页,至此安装成功。

Centos7.7下KubeSphere最小化安装和定制化配置安装

页面还是蛮炫酷的。

Centos7.7下KubeSphere最小化安装和定制化配置安装

定制化安装

点击自定义资源CRD

Centos7.7下KubeSphere最小化安装和定制化配置安装

搜索clusterconfiguration 并点击

Centos7.7下KubeSphere最小化安装和定制化配置安装

点击这三个点,就可以编辑了。

Centos7.7下KubeSphere最小化安装和定制化配置安装

这里我开启devops,openpitrix,alerting,notification,相对应的只需要把false改成true就行了

Centos7.7下KubeSphere最小化安装和定制化配置安装

然后点击更新,大概等待二十分钟(跟网速和硬件配置有关)

Centos7.7下KubeSphere最小化安装和定制化配置安装

相关文章:

  • 2022-01-07
  • 2021-09-18
  • 2022-01-15
  • 2021-10-27
  • 2021-04-16
  • 2022-01-07
  • 2021-11-10
  • 2021-07-05
猜你喜欢
  • 2022-12-23
  • 2021-11-14
  • 2021-08-20
  • 2022-01-07
  • 2022-01-07
  • 2022-01-07
相关资源
相似解决方案