Step 1:

We prepare there nodes of Proxmox ve 5.4

download Proxmox ve 5.4

URL: https://www.proxmox.com/en/downloads

youtube

Step 2:

when we finished the three nodes of Proxmox

We need git clone https://github.com/kubernetes-sigs/kubespray.git for establish k8s cluster.

Reference URL https://kubespray.io/#/

Step 3 :

$ git clone https://github.com/rook/rook.git for install rook ceph
$ cd rook/cluster/examples/kubernetes/ceph/

$ kubectl create -f common.yaml

$ kubectl create -f  operator.yaml

$ kubectl create  -f cluster.yaml

eg: modified cluster.yaml

 apiVersion: ceph.rook.io/v1
kind: CephCluster
metadata:
  name: rook-ceph
  namespace: rook-ceph
spec:
  cephVersion:
    allowUnsupported: false
   mon:
    count: 3
    allowMultiplePerNode: true
 dashboard:
    enabled: true
     ssl: true
   monitoring:
  enabled: false
     rulesNamespace: rook-ceph
  network:
     hostNetwork: false
  rbdMirroring:
       workers: 0
   removeOSDsIfOutAndSafeToRemove: false
  storage: 
    useAllNodes: false
    useAllDevices: false
    topologyAware: false
    deviceFilter:
    location:
    config:
       storeType: bluestore
        nodes:
    - name: "node1"
      devices:
      - name: "sdb"
    - name: "node2"
      devices:
      - name: "sdb"
    - name: "node3"
      devices:
    - name: "sdb"   

Step 4:

cd rook/cluster/examples/kubernetes/ceph/csi/rbd/ for creating StorageClass
and the patch to local default storage

$ kubectl create -f storageclass.yaml
$ kubectl patch storageclass  rook-ceph-block -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'

Step 5:

Now we can deploy KubeSphere v2.1

 $ kubectl apply -f https://raw.githubusercontent.com/kubesphere/ks-installer/master/kubesphere-minimal.yaml

Done installed KubeSphere v2.1, nice work!

Feynman 更改标题为「rook-ceph + KubeSphere Installation
2 年 后