How to install MinIO Operator - cniackz/public GitHub Wiki
Objective: Install MinIO Operator and one tenant
- Delete any previous cluster
kind delete cluster
You should see:
$ kind delete cluster
Deleting cluster "kind" ...
- Create a new cluster:
kind-config.yaml
# four node (two workers) cluster config
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
- role: worker
- role: worker
- role: worker
- role: worker
kind create cluster --config ~/kind-config.yaml
You should see:
$ kind create cluster --config ~/kind-config.yaml
Creating cluster "kind" ...
â Ensuring node image (kindest/node:v1.24.0) đŧ
â Preparing nodes đĻ đĻ đĻ đĻ đĻ
â Writing configuration đ
â Starting control-plane đšī¸
â Installing CNI đ
â Installing StorageClass đž
â Joining worker nodes đ
Set kubectl context to "kind-kind"
You can now use your cluster with:
kubectl cluster-info --context kind-kind
Not sure what to do next? đ
Check out https://kind.sigs.k8s.io/docs/user/quick-start/
- Install Operator on Top of the cluster:
kubectl apply -k github.com/minio/operator/resources
You should see:
$ kubectl apply -k github.com/minio/operator/resources
namespace/minio-operator created
customresourcedefinition.apiextensions.k8s.io/tenants.minio.min.io created
serviceaccount/console-sa created
serviceaccount/minio-operator created
clusterrole.rbac.authorization.k8s.io/console-sa-role created
clusterrole.rbac.authorization.k8s.io/minio-operator-role created
clusterrolebinding.rbac.authorization.k8s.io/console-sa-binding created
clusterrolebinding.rbac.authorization.k8s.io/minio-operator-binding created
configmap/console-env created
secret/console-sa-secret created
service/console created
service/operator created
deployment.apps/console created
deployment.apps/minio-operator created
- Verify pods are running:
kubectl get pods -n minio-operator
You should see:
$ kubectl get pods -n minio-operator
NAME READY STATUS RESTARTS AGE
console-7956df67c6-rbq7n 1/1 Running 0 65s
minio-operator-f8f874647-hnbjn 1/1 Running 0 65s
minio-operator-f8f874647-ntkcw 1/1 Running 0 65s
- Look for the logs:
kubectl logs minio-operator-f8f874647-ntkcw -n minio-operator
You should see:
$ kubectl logs minio-operator-f8f874647-ntkcw -n minio-operator
I0711 14:23:28.844217 1 main.go:70] Starting MinIO Operator
I0711 14:23:29.100255 1 main.go:169] caBundle on CRD updated
I0711 14:23:29.101716 1 main-controller.go:240] Setting up event handlers
I0711 14:23:29.101870 1 leaderelection.go:243] attempting to acquire leader lease minio-operator/minio-operator-lock...
I0711 14:23:29.134963 1 leaderelection.go:253] successfully acquired lease minio-operator/minio-operator-lock
I0711 14:23:29.135212 1 main-controller.go:466] minio-operator-f8f874647-ntkcw: I've become the leader
I0711 14:23:29.135411 1 main-controller.go:378] Waiting for API to start
I0711 14:23:29.135455 1 main-controller.go:370] Starting HTTP Upgrade Tenant Image server
I0711 14:23:29.174167 1 main-controller.go:347] Using Kubernetes CSR Version: v1
I0711 14:23:29.182170 1 operator.go:90] operator TLS secret not found: secrets "operator-tls" not found
I0711 14:23:29.216151 1 csr.go:183] Start polling for certificate of csr/operator-minio-operator-csr, every 5s, timeout after 20m0s
I0711 14:23:34.262462 1 csr.go:209] Certificate successfully fetched, creating secret with Private key and Certificate
I0711 14:23:34.264658 1 operator.go:92] Waiting for the operator certificates to be issued waiting for Operator cert
I0711 14:23:44.268782 1 main-controller.go:351] Starting HTTPS API server
I0711 14:23:44.268908 1 main-controller.go:381] Waiting for Upgrade Server to start
I0711 14:23:44.268911 1 main-controller.go:385] Starting Tenant controller
I0711 14:23:44.268913 1 main-controller.go:388] Waiting for informer caches to sync
I0711 14:23:44.268917 1 main-controller.go:393] Starting workers
- Now, proceed to install the tenant:
kubectl apply -k github.com/minio/operator/examples/kustomization/tenant-lite
You should see:
$ kubectl apply -k github.com/minio/operator/examples/kustomization/tenant-lite
namespace/tenant-lite created
secret/storage-configuration created
secret/storage-creds-secret created
secret/storage-user created
tenant.minio.min.io/storage-lite created
- Wait for pods to be ready:
kubectl get pods -n tenant-lite
You should see:
$ kubectl get pods -n tenant-lite
NAME READY STATUS RESTARTS AGE
storage-lite-log-0 1/1 Running 0 3m42s
storage-lite-log-search-api-d6576b4bc-rktjv 1/1 Running 4 (2m17s ago) 3m41s
storage-lite-pool-0-0 1/1 Running 0 3m44s
storage-lite-pool-0-1 1/1 Running 0 3m44s
storage-lite-pool-0-2 1/1 Running 0 3m44s
storage-lite-pool-0-3 1/1 Running 0 3m44s
storage-lite-prometheus-0 2/2 Running 0 43s
- Now, let's access to Console for you to add a bucket and a file on it.
kubectl port-forward storage-lite-pool-0-0 9443 -n tenant-lite
You should see:
$ kubectl port-forward storage-lite-pool-0-0 9443 -n tenant-lite
Forwarding from 127.0.0.1:9443 -> 9443
Forwarding from [::1]:9443 -> 9443
Handling connection for 9443
-
Now open the web page: https://localhost:9443/ if using Chrome click
Advanced
thenProceed to localhost
-
Now put user and password and log-in:
- User: minio
- Password: minio123
- Click
Create Bucket
- Once Bucket is created upload one file:
- That's it, you are ready to go and do more things with this amazing tool that is MinIO!!! đĨŗ