KubeSphere-1:安装使用

安装请参考官网:面向云原生应用的容器混合云,支持 Kubernetes 多集群管理的 PaaS 容器云平台解决方案 | KubeSphere

安装

此处可参考官网的安装,我是在 Kubernetes 上最小化安装 KubeSphere,版本:3.2.1,此处和官网差不多,就是多了点挂载

官网地址 :在 Kubernetes 上最小化安装 KubeSphere

一、部署 KubeSphere

1.执行以下命令开始安装:

(此处没开启组件)

wget https://github.com/kubesphere/ks-installer/releases/download/v3.2.1/kubesphere-installer.yaml



wget -f https://github.com/kubesphere/ks-installer/releases/download/v3.2.1/cluster-configuration.yaml

开启组件:启用可插拔组件

此处只在我需要的如:日志,监控,devops,istio 这些

执行

kubectl apply -f kubesphere-installer.yaml



kubectl apply -f cluster-configuration.yaml

2.检查安装日志:

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

3.使用 kubectl get pod --all-namespaces 查看所有 Pod 是否在 KubeSphere 的相关命名空间中正常运行。如果是,请通过以下命令检查控制台的端口(默认为 30880):

kubectl get svc/ks-console -n kubesphere-system

4.确保在安全组中打开了端口 30880,并通过 NodePort (IP:30880) 使用默认帐户和密码 (admin/P@88w0rd) 访问 Web 控制台。

5.配置挂载

装好后可以看到,kubesphere-system 下的pod 启动 ,目前均是没有挂载的

 a.ldap-pv-pvc.yaml

---
apiVersion: v1
kind: PersistentVolume
metadata:
  name: kubesphere-system-ladp
  namespace: kubesphere-system
  labels:
    pv: kubesphere-system-ldap
spec:
  capacity:
    storage: 10Gi
  accessModes:
    - ReadWriteMany
  persistentVolumeReclaimPolicy: Retain
  nfs:
    # FIXME: use the right IP
    server: 192.168.50.93
    path: "/data/nfsboot/kubesphere-system/redis-ldap"

---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: kubesphere-system-ldap
  namespace: kubesphere-system
spec:
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 10Gi
  selector:
    matchLabels:
      pv: kubesphere-system-ldap

b.minio-pv-pvc.yaml

---
apiVersion: v1
kind: PersistentVolume
metadata:
  name: kubesphere-system-minio
  namespace: kubesphere-system
  labels:
    pv: kubesphere-system-minio
spec:
  capacity:
    storage: 100Gi
  accessModes:
    - ReadWriteMany
  persistentVolumeReclaimPolicy: Retain
  nfs:
    # FIXME: use the right IP
    server: 192.168.50.93
    path: "/data/nfsboot/kubesphere-system/minio-pvc"

---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: kubesphere-system-minio
  namespace: kubesphere-system
spec:
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 100Gi
  selector:
    matchLabels:
      pv: kubesphere-system-minio

C.redis-pv-pvc.yaml
 

---
apiVersion: v1
kind: PersistentVolume
metadata:
  name: kubesphere-system-redis
  namespace: kubesphere-system
  labels:
    pv: kubesphere-system-redis
spec:
  capacity:
    storage: 10Gi
  accessModes:
    - ReadWriteMany
  persistentVolumeReclaimPolicy: Retain
  nfs:
    # FIXME: use the right IP
    server: 192.168.50.93
    path: "/data/nfsboot/kubesphere-system/redis-pvc"

---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: kubesphere-system-redis
  namespace: kubesphere-system
spec:
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 10Gi
  selector:
    matchLabels:
      pv: kubesphere-system-redis

对应的deployment.yaml 和statefulset.yaml  增加挂载

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值