From 343b767e68a07e99015082eca98448eb7da5b575 Mon Sep 17 00:00:00 2001 From: Simon Larsen Date: Sat, 27 Jan 2024 19:02:34 +0000 Subject: [PATCH] Update Ceph Rook installation and MicroK8s setup --- HelmChart/Docs/CephRook.md | 35 +++++++++++++- HelmChart/Docs/{Helm.md => HelmOneUptime.md} | 0 HelmChart/Docs/MicroK8s.md | 50 ++++++++++++++++++-- HelmChart/Docs/ceph-cluster.yaml | 0 HelmChart/Docs/ceph-operator.yaml | 0 5 files changed, 79 insertions(+), 6 deletions(-) rename HelmChart/Docs/{Helm.md => HelmOneUptime.md} (100%) delete mode 100644 HelmChart/Docs/ceph-cluster.yaml delete mode 100644 HelmChart/Docs/ceph-operator.yaml diff --git a/HelmChart/Docs/CephRook.md b/HelmChart/Docs/CephRook.md index 14ebd8d0d1..25f960df28 100644 --- a/HelmChart/Docs/CephRook.md +++ b/HelmChart/Docs/CephRook.md @@ -7,7 +7,8 @@ Install Rook Ceph Operator. This documentation taken from: https://rook.io/docs/ ```bash helm repo add rook-release https://charts.rook.io/release -helm install --create-namespace --namespace rook-ceph rook-ceph rook-release/rook-ceph -f ceph-operator.yaml +# Install with default values.yaml +helm install --create-namespace --namespace rook-ceph rook-ceph rook-release/rook-ceph # wait for the pods to be ready kubectl get pods -n rook-ceph @@ -16,8 +17,16 @@ kubectl get pods -n rook-ceph Now install the Ceph Cluster. ```bash +# Install with default values.yaml helm install --create-namespace --namespace rook-ceph rook-ceph-cluster \ - --set operatorNamespace=rook-ceph rook-release/rook-ceph-cluster -f ceph-cluster.yaml + --set operatorNamespace=rook-ceph rook-release/rook-ceph-cluster + +# Check install progression by using this command. +kubectl --namespace rook-ceph get cephcluster + + +# Check the pods +kubectl get pods -n rook-ceph ``` Once you install the cluster, you can check the status of the cluster by running this command: @@ -33,3 +42,25 @@ kubectl get storageclass ``` You should see ceph created storage classes. + + +## Ceph Dashboard + +You can access the dashboard by running this command: + +Get the login credentials + +```bash +kubectl -n rook-ceph get secret rook-ceph-dashboard-password -o jsonpath="{['data']['password']}" | base64 --decode && echo +``` + +Then run this command to port forward the dashboard. + +```bash +kubectl -n rook-ceph port-forward svc/rook-ceph-mgr-dashboard 8443:8443 --address 0.0.0.0 +``` + +Then you can access the dashboard by going to: https://:8443 + + +Username is `admin` and password is the one you got from the previous command. \ No newline at end of file diff --git a/HelmChart/Docs/Helm.md b/HelmChart/Docs/HelmOneUptime.md similarity index 100% rename from HelmChart/Docs/Helm.md rename to HelmChart/Docs/HelmOneUptime.md diff --git a/HelmChart/Docs/MicroK8s.md b/HelmChart/Docs/MicroK8s.md index e796c13969..67c4ae47ed 100644 --- a/HelmChart/Docs/MicroK8s.md +++ b/HelmChart/Docs/MicroK8s.md @@ -13,15 +13,30 @@ sudo microk8s kubectl config view --raw > ~/.kube/config ``` -### Unistallation +### Bash Alias + +Edit bashrc file and add these aliases ```bash -microk8s uninstall +vi ~/.bashrc ``` -### Addons -- Hostpath Storage if you're using one node. +Add these lines to it: + + +```bash +alias kubectl='microk8s kubectl' +alias helm='microk8s helm3' +``` + +Save it and run `source ~/.bashrc` + +### Setup Addons + +- Hostpath Storage (skip if you're running on a multinode cluster) + +if you're using one node. Use Ceph if you have multiple nodes. **If you're using the miltinode k8s cluster, you can skip this step.**. Please read Ceph Installation guide at `HelmChart/Docs/CephRook.md` for more details ``` microk8s enable hostpath-storage @@ -36,12 +51,34 @@ By default, the hostpath provisioner will store all volume data under /var/snap/ To customize the default directory, please read the docs here: https://microk8s.io/docs/addon-hostpath-storage + +- Metal LB + ``` # Enable Metal LB microk8s enable metallb:192.168.0.105-192.168.0.111 ``` +- Kubernetes Dashboard + +``` +microk8s enable dashboard +``` + +and then you can run `microk8s dashboard-proxy` to access the dashboard. + +- Ingress + +``` +microk8s enable ingress +``` + +- DNS + +``` +microk8s enable dns +``` ### Common Issues @@ -57,3 +94,8 @@ microk8s status --wait-ready ``` +### Unistallation + +```bash +microk8s uninstall +``` \ No newline at end of file diff --git a/HelmChart/Docs/ceph-cluster.yaml b/HelmChart/Docs/ceph-cluster.yaml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/HelmChart/Docs/ceph-operator.yaml b/HelmChart/Docs/ceph-operator.yaml deleted file mode 100644 index e69de29bb2..0000000000