部署kubesphere

前提叙述:(配置kubesphere需本机上有pv和pvc、上篇文档中有配置openebs、请先配置openebs后在配置storageclass、安装kubesphere时候会关联storageclass、storageclass会绑定openebs、自动创建pv、pvc、实现持久化存储)

部署kubesphere需配置storageclass实现动态制备、自动创建pv、pvc

storageclass yaml文件如下:

kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: local
  namespace: kube-system
  namespace: kubesphere-monitoring-system
  annotations:
    cas.openebs.io/config: |
      - name: StorageType
        value: "hostpath"
      - name: BasePath
        value: "/var/openebs/local/"
    kubectl.kubernetes.io/last-applied-configuration: >
      {"apiVersion":"storage.k8s.io/v1","kind":"StorageClass","metadata":{"annotations":{"cas.openebs.io/config":"-
      name: StorageType\n  value: \"hostpath\"\n- name: BasePath\n  value:
      \"/var/openebs/local/\"\n","openebs.io/cas-type":"local","storageclass.beta.kubernetes.io/is-default-class":"true","storageclass.kubesphere.io/supported-access-modes":"[\"ReadWriteMany\"]"},"name":"local"},"provisioner":"openebs.io/local","reclaimPolicy":"Delete","volumeBindingMode":"Immediate"}
    openebs.io/cas-type: local
    storageclass.beta.kubernetes.io/is-default-class: 'true'
    storageclass.kubesphere.io/supported-access-modes: '["ReadWriteMany"]'
provisioner: openebs.io/local
reclaimPolicy: Delete
使用kubectl apply -f  storageclass.yaml执行

部署完成storageclass后安装kubesphere

kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.4.1/kubesphere-installer.yaml

kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.4.1/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 进行查看、会显示登录方式、以及账号密码

kubesphere官网安装教程:

在 Kubernetes 上最小化安装 KubeSphereicon-default.png?t=N7T8https://www.kubesphere.io/zh/docs/v3.4/quick-start/minimal-kubesphere-on-k8s/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值