Posted in

Installing CSI Kubernetes Using Rook Ceph

Introduction

Untuk menghubungkan Ceph dengan Kubernetes, kita menggunakan Container Storage Interface (CSI) sebagai tempat penyimpanan. Ada beberapa tools yang direkomendasikan, yaitu Longhorn dan roo-ceph. Disini saya akan menggunakan rook-ceph sebagai CSI kubernetes cluster.

Reqruitment

  • Kubernetes Cluster
  • Helm
  • Menyiapkan masing-masing worker Disk tambahan (Saya menggunakan extra disk 100GB)

Installation

Insall Operator

Disini kita akan deploy rook-ceph operator untuk controller rook-ceph itu sendiri. Untuk deploy kita akan menggunakan helm chart.

helm repo add rook-release https://charts.rook.io/release
helm repo update
helm install --create-namespace --namespace rook-ceph rook-ceph rook-release/rook-ceph

Install Cluster

Kita akan membuat values.yaml

mkdir rook-ceph
nano rook-ceph/values-cluster.yaml
toolbox:
  enabled: true

Install menggunakan helm chart

helm install -n rook-ceph rook-ceph-cluster rook-release/rook-ceph-cluster -f rook-ceph/values-cluster.yaml 

Create service untuk dashboard ceph menggunakan LoadBalancer

cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Service
metadata:
  name: rook-ceph-mgr-dashboard-external-https
  namespace: rook-ceph
  labels:
    app: rook-ceph-mgr
    rook_cluster: rook-ceph
spec:
  ports:
  - name: dashboard
    port: 443
    protocol: TCP
    targetPort: 8443
  selector:
    app: rook-ceph-mgr
    rook_cluster: rook-ceph
    mgr_role: active
  sessionAffinity: None
  type: LoadBalancer
  loadBalancerIP: 10.100.19.92
EOF

Kita check default password untuk admin dashboard ceph

kubectl -n rook-ceph get secret rook-ceph-dashboard-password -o jsonpath='{.data.password}' | base64 -d && echo

Setelah kita membuat service, akses ke dashboard menggunakan ip loadbalancer

Check storage class yang sudah dibuat

kubectl get sc

Untuk CSI sudah kita buat

Leave a Reply

Your email address will not be published. Required fields are marked *