From 7b90faf082b677f835cab8a1cc7216bda50947d3 Mon Sep 17 00:00:00 2001 From: Cedric Verstraeten Date: Sun, 11 Aug 2024 15:57:39 +0200 Subject: [PATCH] update readme --- README.microk8s.md | 69 ++++++++++++++++++++++++++++++++++++----- minio-storageclass.yaml | 6 ---- 2 files changed, 61 insertions(+), 14 deletions(-) delete mode 100644 minio-storageclass.yaml diff --git a/README.microk8s.md b/README.microk8s.md index 0aad2b7..7a1fd54 100644 --- a/README.microk8s.md +++ b/README.microk8s.md @@ -91,16 +91,49 @@ MinIO is a high-performance, distributed object storage system that is compatibl In the context of the Kerberos.io stack, MinIO will be used to store recordings from the Kerberos Agents. These recordings are crucial for surveillance and monitoring purposes, and having a reliable storage solution like MinIO ensures that the data is stored securely and can be accessed efficiently. -To enable MinIO in your MicroK8s cluster, you can use the following command: - -```sh -microk8s enable minio +```bash +kubectl create namespace minio-tenant ``` -This command will set up MinIO with default configurations, allowing you to start using it immediately. You can verify the status of the MinIO deployment by checking the pods: +```bash +kubectl apply -k github.com/minio/operator\?ref=v6.0.1 +``` -```sh -kubectl get po -w -A +Next we'll create a tenant + +```bash +sed -i 's/openebs-hostpath/microk8s-hostpath/g' ./minio-tenant-base.yaml +kubectl apply -f minio-tenant-base.yaml +``` + +We create a bucket in the minio tenant + +```bash +kubectl port-forward svc/myminio-hl 9000 -n minio-tenant +``` + +You might need to install the minio client if not yet available. + +```bash +curl https://dl.min.io/client/mc/release/linux-amd64/mc \ + --create-dirs \ + -o $HOME/minio-binaries/mc + +chmod +x $HOME/minio-binaries/mc +export PATH=$PATH:$HOME/minio-binaries/ +``` + +```bash +mc alias set myminio https://localhost:9000 minio minio123 --insecure +mc mb myminio/mybucket --insecure + +``` + +or if not possible we will access the minio console using a reverse tunnel. + +```bash +kubectl port-forward svc/myminio-console -n minio-tenant 8080:9090 +ssh -L 8080:localhost:8080 youruser@x.x.x.x ``` ### Database: MongoDB @@ -116,9 +149,29 @@ Next to that you might also consider a SaaS MongoDB deployment using MongoDB Atl Note: If you are installing a self-hosted Kubernetes cluster, we recommend using `openebs`. Therefore make sure to uncomment the `global`.`storageClass` attribute, and make sure it's using `microk8s-hostpath` instead. - sed -i '' 's/openebs-hostpath/microk8s-hostpath/g' ./mongodb-values.yaml + sed -i 's/openebs-hostpath/microk8s-hostpath/g' ./mongodb-values.yaml microk8s helm install mongodb -n mongodb bitnami/mongodb --values ./mongodb-values.yaml Or after updating the `./mongodb-values.yaml` file again microk8s helm upgrade mongodb -n mongodb bitnami/mongodb --values ./mongodb-values.yaml + +### Message broker: RabbitMQ + +```bash + kubectl create namespace rabbitmq +``` + +```bash +sed -i 's/openebs-hostpath/microk8s-hostpath/g' ./rabbitmq-values.yaml +microk8s helm install rabbitmq bitnami/rabbitmq -n rabbitmq -f rabbitmq-values.yaml +kubectl get po -A -w +``` + +```bash +microk8s helm upgrade rabbitmq bitnami/rabbitmq -n rabbitmq -f rabbitmq-values.yaml +``` + +```bash +microk8s helm del rabbitmq -n rabbitmq +``` diff --git a/minio-storageclass.yaml b/minio-storageclass.yaml deleted file mode 100644 index 41c6e8a..0000000 --- a/minio-storageclass.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: storage.k8s.io/v1 -kind: StorageClass -metadata: - name: directpv-min-io -provisioner: kubernetes.io/no-provisioner -volumeBindingMode: WaitForFirstConsumer \ No newline at end of file