### Build and Start React UI for MinIO Console Source: https://github.com/minio/operator/wiki/How-to-test-Operator-Login Installs dependencies, builds the React UI for the MinIO Console, and starts the development server. This is for front-end development and debugging. ```sh cd ~/console/portal-ui yarn install yarn build yarn run start ``` -------------------------------- ### Install Sample Application Source: https://github.com/minio/operator/blob/master/examples/kustomization/sts-example/README.md Apply the kustomization to install the sample application that uses the Go SDK. ```shell kubectl apply -k examples/kustomization/sts-example/ ``` -------------------------------- ### Apply KES Encryption Tenant Example Source: https://github.com/minio/operator/blob/master/docs/kes.md Installs an example MinIO Tenant with KES encryption enabled. Ensure prerequisites like MinIO Operator and a KMS backend are set up beforehand. ```shell kubectl apply -k github.com/minio/operator/examples/kustomization/tenant-kes-encryption ``` -------------------------------- ### Build Docker Image for Go STS Example Source: https://github.com/minio/operator/blob/master/examples/kustomization/sts-example/sample-clients/minio-sdk/go/README.md Use this command to build the Docker image for the Minio STS Go example. Ensure Docker is installed and running. ```shell docker build -t minio-sts-go-example . ``` -------------------------------- ### Example: Get StatefulSet Names of Pools Source: https://github.com/minio/operator/blob/master/docs/DECOMISSION.md A practical example demonstrating how to retrieve the statefulset names for pools in a specific namespace and tenant. ```bash ~ kubectl get tenants -n ns-1 all-nodes -o json | jq '.status.pools[].ssName' ``` -------------------------------- ### Install Sample Application with .NET SDK Source: https://github.com/minio/operator/blob/master/examples/kustomization/sts-example/README.md Apply the kustomization to install the sample application using the .NET SDK. ```shell kubectl apply -k examples/kustomization/sts-example/sample-clients/minio-sdk/dotnet ``` -------------------------------- ### Install Sample Application with Go SDK Source: https://github.com/minio/operator/blob/master/examples/kustomization/sts-example/README.md Apply the kustomization to install the sample application using the Go SDK. ```shell kubectl apply -k examples/kustomization/sts-example/sample-clients/minio-sdk/go ``` -------------------------------- ### Install Sample Application with Javascript SDK Source: https://github.com/minio/operator/blob/master/examples/kustomization/sts-example/README.md Apply the kustomization to install the sample application using the Javascript SDK. ```shell kubectl apply -k examples/kustomization/sts-example/sample-clients/minio-sdk/javascript ``` -------------------------------- ### Install Sample Application with Java SDK Source: https://github.com/minio/operator/blob/master/examples/kustomization/sts-example/README.md Apply the kustomization to install the sample application using the Java SDK. ```shell kubectl apply -k examples/kustomization/sts-example/sample-clients/minio-sdk/java ``` -------------------------------- ### Install MinIO Tenant Lite Source: https://github.com/minio/operator/wiki/decommission Deploy a MinIO tenant with a 'lite' configuration using nodeport. This is a common starting point for testing. ```bash installtenant nodeport ``` -------------------------------- ### Install Sample Application with Python SDK Source: https://github.com/minio/operator/blob/master/examples/kustomization/sts-example/README.md Apply the kustomization to install the sample application using the Python SDK. ```shell kubectl apply -k examples/kustomization/sts-example/sample-clients/minio-sdk/python ``` -------------------------------- ### Start Minikube Cluster Source: https://github.com/minio/operator/wiki/MinIO-and-Koperator Starts a Minikube cluster with specified memory. Ensure sufficient resources are allocated before starting. ```bash minikube stop minikube delete minikube start --memory=10240 ``` -------------------------------- ### Install MinIO Operator with Helm (Custom) Source: https://context7.com/minio/operator/llms.txt Installs the MinIO Operator with custom configurations using Helm. This example sets replica count, enables STS, and specifies resource requests. ```bash # Install with custom configuration helm install minio-operator minio-operator/operator \ --namespace minio-operator \ --create-namespace \ --set operator.replicaCount=2 \ --set operator.env[0].name=OPERATOR_STS_ENABLED \ --set operator.env[0].value="on" \ --set operator.resources.requests.cpu=200m \ --set operator.resources.requests.memory=256Mi ``` -------------------------------- ### Start OpenShift Cluster with CodeReady Containers Source: https://github.com/minio/operator/wiki/MinIO-and-Koperator Commands to delete, cleanup, setup, and start a CodeReady Containers (CRC) instance for OpenShift. Ensure your system meets the requirements before starting. ```sh crc delete crc cleanup crc setup crc start ``` -------------------------------- ### Install Sample Application with Python AWS Boto3 SDK Source: https://github.com/minio/operator/blob/master/examples/kustomization/sts-example/README.md Apply the kustomization to install the sample application using the Python AWS Boto3 SDK. ```shell kubectl apply -k examples/kustomization/sts-example/sample-clients/aws-sdk/python ``` -------------------------------- ### Create Policy Binding Source: https://github.com/minio/operator/blob/master/examples/kustomization/sts-example/README.md Example PolicyBinding resource to grant access to a MinIO tenant. Ensure the namespace and service account match your application's setup. ```yaml apiVersion: sts.min.io/v1beta1 kind: PolicyBinding metadata: name: binding-1 namespace: minio-tenant-1 spec: application: namespace: sts-client serviceaccount: stsclient-sa policies: - test-bucket-rw ``` -------------------------------- ### Install Tenant Source: https://github.com/minio/operator/blob/master/examples/kustomization/sts-example/README.md Apply the kustomization for the tenant. ```shell kubectl apply -k examples/kustomization/sts-example/tenant ``` -------------------------------- ### Install and Configure MinIO Client (mc) Source: https://github.com/minio/operator/wiki/How-to-Test-MinIO-in-AKS-(Azure-Kubernetes-Service) Executes commands inside an Ubuntu pod to update package lists, install wget, download the MinIO client (mc), make it executable, and move it to the system's PATH. It then sets up an alias for the MinIO tenant. ```shell kubectl exec -it ubuntu-pod -n tenant-lite -- /bin/bash root@ubuntu-pod:/# ap t-get update -y && apt-get install -y wget ... root@ubuntu-pod:/# wget https://dl.min.io/client/mc/release/linux-amd64/mc ... root@ubuntu-pod:/# chmod +x mc root@ubuntu-pod:/# mv mc /usr/local/bin/ root@ubuntu-pod:/# mc alias set myminio https://minio.tenant-lite.svc.cluster.local minio minio123 mc: Configuration written to `/root/.mc/config.json`. Please update your access credentials. mc: Successfully created `/root/.mc/share`. mc: Initialized share uploads `/root/.mc/share/uploads.json` file. mc: Initialized share downloads `/root/.mc/share/downloads.json` file. Added `myminio` successfully. ``` -------------------------------- ### Create MinIO Bucket using MinIOJob CRD Source: https://github.com/minio/operator/blob/master/docs/notes/v6.0.0.md Deploy a MinIOJob CRD to create a bucket imperatively. Ensure the Operator is installed and up-to-date. This example requires a ServiceAccount and PolicyBinding. ```yaml apiVersion: v1 kind: ServiceAccount metadata: name: mc-job-sa namespace: minio-tenant-1 --- apiVersion: sts.min.io/v1alpha1 kind: PolicyBinding metadata: name: mc-job-binding namespace: minio-tenant-1 spec: application: serviceaccount: mc-job-sa namespace: minio-tenant-1 policies: - consoleAdmin --- apiVersion: job.min.io/v1alpha1 kind: MinIOJob metadata: name: minio-test-job namespace: minio-tenant-1 spec: serviceAccountName: mc-job-sa tenant: name: myminio namespace: minio-tenant-1 commands: - op: make-bucket args: name: memes ``` -------------------------------- ### Install MinIO Tenant using Helm Source: https://github.com/minio/operator/wiki/Deploy-Prometheus-and-MinIO-using-Helm Installs a MinIO tenant using Helm, applying the specified values file and creating the necessary namespace. This command should be executed from the `~/operator/helm` directory. ```sh cd ~/operator/helm helm install --debug --namespace tenant-ns \ --create-namespace tenant ./tenant \ -f ~/operator/helm/tenant/values.yaml ``` -------------------------------- ### Install cert-manager Source: https://github.com/minio/operator/wiki/cert‐manager Applies the cert-manager installation manifest from a release URL. It then waits for the cert-manager, cainjector, and webhook pods to become ready. ```sh kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.13.2/cert-manager.yaml echo "Wait until cert-manager pods are running:" kubectl wait -n cert-manager --for=condition=ready pod -l app=cert-manager --timeout=120s kubectl wait -n cert-manager --for=condition=ready pod -l app=cainjector --timeout=120s kubectl wait -n cert-manager --for=condition=ready pod -l app=webhook --timeout=120s ``` -------------------------------- ### Full Release Process Example Source: https://github.com/minio/operator/wiki/How-to-make-Operator-Release This sequence demonstrates the complete process of creating a pull request, generating a release, committing, and pushing changes. ```shell createPR operator operator-release RELEASE=5.0.15 make release git add . git commit -m 'Release 5.0.15' git push git push --set-upstream origin operator-release ``` -------------------------------- ### Install Tenant with Cert Manager Source: https://github.com/minio/operator/blob/master/examples/kustomization/sts-example/README.md Apply the kustomization for the tenant when using Cert Manager. ```shell kubectl apply -k examples/kustomization/sts-example/tenant-certmanager ``` -------------------------------- ### Install MinIO Operator with Helm (Default) Source: https://context7.com/minio/operator/llms.txt Installs the MinIO Operator using Helm charts with default settings. Ensure the 'minio-operator' namespace is created. ```bash # Install the Operator with default settings helm install minio-operator minio-operator/operator \ --namespace minio-operator \ --create-namespace ``` -------------------------------- ### OpenShift Cluster Startup Logs Source: https://github.com/minio/operator/wiki/MinIO-and-Koperator Example output from the CodeReady Containers startup process, indicating system checks, VM status, and operator progression. ```sh INFO Checking if running as non-root INFO Checking if crc-admin-helper executable is cached INFO Checking for obsolete admin-helper executable INFO Checking if running on a supported CPU architecture INFO Checking minimum RAM requirements INFO Checking if running emulated on a M1 CPU INFO Checking if HyperKit is installed INFO Checking if qcow-tool is installed INFO Checking if crc-driver-hyperkit is installed INFO Starting CodeReady Containers VM for OpenShift 4.7.18... INFO CodeReady Containers instance is running with IP 127.0.0.1 INFO CodeReady Containers VM is running INFO Check internal and public DNS query... INFO Check DNS query from host... INFO Verifying validity of the kubelet certificates... INFO Starting OpenShift kubelet service INFO Waiting for kube-apiserver availability... [takes around 2min] INFO Starting OpenShift cluster... [waiting for the cluster to stabilize] INFO 2 operators are progressing: authentication, operator-lifecycle-manager-packageserver INFO 4 operators are progressing: authentication, marketplace, network, operator-lifecycle-manager-packageserver INFO Operator authentication is progressing INFO 2 operators are progressing: authentication, network INFO Operator console is progressing INFO 2 operators are progressing: kube-scheduler, network INFO 2 operators are progressing: kube-scheduler, network INFO Operator kube-scheduler is progressing INFO Operator kube-scheduler is progressing INFO All operators are available. Ensuring stability... INFO Operators are stable (2/3)... INFO Operators are stable (3/3)... INFO Adding crc-admin and crc-developer contexts to kubeconfig... Started the OpenShift cluster. ``` -------------------------------- ### Example Output of Operator Status Source: https://github.com/minio/operator/blob/master/README.md Example output indicating the MinIO Operator pod is running. ```text NAME READY STATUS RESTARTS AGE minio-operator-69fd675557-lsrqg 1/1 Running 0 99s ``` -------------------------------- ### Install MinIO Tenant with Helm Source: https://github.com/minio/operator/wiki/Deploy-Operator-with-Helm Installs a MinIO tenant using a Helm chart. This command requires the tenant chart to be downloaded and specifies a namespace for the tenant resources. It also creates the namespace if it does not exist. ```shell helm install \ --namespace tenant-ns \ --create-namespace \ tenant-ns ./tenant-5.0.14.tgz ``` -------------------------------- ### Install Nginx Ingress Controller Source: https://github.com/minio/operator/blob/master/docs/lets-encrypt.md Installs the Nginx ingress controller using Helm. Configures it to use LoadBalancer and enable proxy protocol. ```bash helm repo add nginx-stable https://helm.nginx.com/stable helm repo update helm install nginx-ingress nginx-stable/nginx-ingress \ --set rbac.create=true \ --set controller.service.type=LoadBalancer \ --set controller.service.externalTrafficPolicy=Local \ --set controller.service.annotations."service.beta.kubernetes.io/aws-load-balancer-proxy-protocol"="*" \ --set controller.config.use-proxy-protocol="true" ``` -------------------------------- ### nelm Installation Progress and Logs Source: https://github.com/minio/operator/blob/master/NELM.md This output shows the real-time progress of the MinIO operator installation, including resource states and container logs. It helps in monitoring the deployment and troubleshooting any issues. ```bash Starting release "operator" (namespace: "minio") ┌ Progress status │ RESOURCE (→READY) STATE INFO │ Deployment/minio-operator WAITING Ready:0/2 │ • Pod/minio-operator-84867f7cd-67fhk UNKNOWN Status:ContainerCreating │ • Pod/minio-operator-84867f7cd-jqhxc UNKNOWN Status:ContainerCreating │ ClusterRole/minio-operator-role READY │ ClusterRoleBinding/minio-operator-binding READY │ Service/operator READY │ Service/sts READY │ ServiceAccount/minio-operator READY └ Progress status ┌ Logs for Pod/minio-operator-84867f7cd-67fhk, container/operator │ I0602 13:57:56.451191 1 controller.go:81] Starting MinIO Operator │ I0602 13:57:56.452231 1 main-controller.go:293] Setting up event handlers │ I0602 13:57:56.459735 1 main-controller.go:514] Using Kubernetes CSR Version: v1 │ I0602 13:57:56.459758 1 main-controller.go:534] Waiting for STS API to start │ I0602 13:57:56.459776 1 leaderelection.go:257] attempting to acquire leader lease minio/minio-operator-lock... │ I0602 13:57:56.459829 1 main-controller.go:399] Starting STS API server │ I0602 13:57:56.461263 1 tls.go:54] Waiting for the sts certificates secret to be issued │ I0602 13:57:56.468473 1 leaderelection.go:271] successfully acquired lease minio/minio-operator-lock │ I0602 13:57:56.468564 1 main-controller.go:577] minio-operator-84867f7cd-67fhk: I am the leader, applying leader labels on myself │ I0602 13:57:56.468645 1 main-controller.go:428] Waiting for Upgrade Server to start │ I0602 13:57:56.468674 1 main-controller.go:432] Starting Tenant controller │ I0602 13:57:56.468679 1 main-controller.go:435] Waiting for informer caches to sync │ I0602 13:57:56.468703 1 main-controller.go:388] Starting HTTP Upgrade Tenant Image server │ I0602 13:57:56.569827 1 main-controller.go:456] STS Autocert is enabled, starting API certificate setup. │ I0602 13:57:56.573769 1 tls.go:127] sts-tls TLS secret not found: secrets "sts-tls" not found │ I0602 13:57:56.591452 1 csr.go:183] Start polling for certificate of csr/sts-minio-csr, every 5s, timeout after 20m0s └ Logs for Pod/minio-operator-84867f7cd-67fhk, container/operator ┌ Logs for Pod/minio-operator-84867f7cd-jqhxc, container/operator │ I0602 13:57:57.107739 1 controller.go:81] Starting MinIO Operator │ I0602 13:57:57.108397 1 main-controller.go:293] Setting up event handlers │ I0602 13:57:57.115257 1 main-controller.go:514] Using Kubernetes CSR Version: v1 │ I0602 13:57:57.115285 1 main-controller.go:534] Waiting for STS API to start │ I0602 13:57:57.115306 1 leaderelection.go:257] attempting to acquire leader lease minio/minio-operator-lock... │ I0602 13:57:57.115368 1 main-controller.go:399] Starting STS API server │ I0602 13:57:57.116599 1 tls.go:54] Waiting for the sts certificates secret to be issued │ I0602 13:57:57.116653 1 main-controller.go:595] minio-operator-84867f7cd-67fhk: is the leader, removing any leader labels that I 'minio-operator-84867f7cd-jqhxc' might have └ Logs for Pod/minio-operator-84867f7cd-jqhxc, container/operator ┌ Progress status │ RESOURCE (→READY) STATE INFO │ Deployment/minio-operator READY Ready:2/2 │ • Pod/minio-operator-84867f7cd-67fhk READY Status:Running │ • Pod/minio-operator-84867f7cd-jqhxc READY Status:Running └ Progress status ┌ Completed operations │ Create resource: ClusterRole/minio-operator-role │ Create resource: ClusterRoleBinding/minio-operator-binding │ Create resource: CustomResourceDefinition/policybindings.sts.min.io │ Create resource: CustomResourceDefinition/tenants.min.io │ Create resource: Deployment/minio-operator │ Create resource: Service/operator │ Create resource: Service/sts │ Create resource: ServiceAccount/minio-operator └ Completed operations Succeeded release "operator" (namespace: "minio") ``` -------------------------------- ### Install Tenant with Helm Source: https://context7.com/minio/operator/llms.txt Use the Tenant Helm chart for templated deployments. Ensure the namespace is created if it doesn't exist. ```bash helm install myminio minio-operator/tenant \ --namespace minio-tenant \ --create-namespace \ --set tenant.name=myminio \ --set tenant.pools[0].servers=4 \ --set tenant.pools[0].volumesPerServer=4 \ --set tenant.pools[0].size=100Gi \ --set tenant.certificate.requestAutoCert=true \ --set tenant.configSecret.name=myminio-env-configuration \ --set tenant.configSecret.accessKey=minio \ --set tenant.configSecret.secretKey=minio123 ``` -------------------------------- ### Example Output of Token Retrieval Source: https://github.com/minio/operator/wiki/Deploy-MinIO-Operator-with-Helm This is an example of the JWT token that will be outputted after successfully creating the secret and retrieving the token. ```sh eyJhbGciOiJSUzI1NiIsImtpZCI6Ik1kLS1RU1JLenZ2Mm9FWnhlM0ZTQXAtdXJzQS1ZM2EzdWlFX2doTFpqaVkifQ.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJtaW5pby1vcGVyYXRvciIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJjb25zb2xlLXNhLXNlY3JldCIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZS1hY2NvdW50Lm5hbWUiOiJjb25zb2xlLXNhIiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZXJ2aWNlLWFjY291bnQudWlkIjoiMjk1ZDk0Y2YtMTRiMS00NTMwLTk0ZjMtOTdlN2M1NzJhMzQ4Iiwic3ViIjoic3lzdGVtOnNlcnZpY2VhY2NvdW50Om1pbmlvLW9wZXJhdG9yOmNvbnNvbGUtc2EifQ.meEgvlEtnHGrpgGoAyblJEs3a8L3TZkVnGddW7SrhhCRyCF141azniOZc57LJiiacuw9-DOLyfsHrNlBHG5tCZipu3ONUIfqzTSDBeCnepuo8fKlc023M9AnpYtCVyYQKHMay7ug-IRX3WRHIHzfwnOydly9ZA9pUAfKQqZ5BhT3nliNmJ786wgX9RHcbbzHUWsGiDzRQ59p56nvRRQ3uu_tnActMb3rGwS3xwB8xGq-pNJdtaNeAtfYmt2Zj0KVGXURzcWMvp7E6l7FW_WezhJJd0I5MmjUj3zqmCyPjgKzOieVVNg_PiUyDy2KCzGynMK4r34nIxeUju7qI83uZw ``` -------------------------------- ### Install MinIO Operator via Kustomize Source: https://context7.com/minio/operator/llms.txt Installs MinIO Operator CRDs and controller deployment using kubectl's kustomize support. Verify the Operator's running status afterwards. ```bash # Install MinIO Operator v7.1.1 kubectl kustomize github.com/minio/operator?ref=v7.1.1 | kubectl apply -f - # Verify the Operator is running kubectl get pods -n minio-operator # Expected output: # NAME READY STATUS RESTARTS AGE # minio-operator-69fd675557-lsrqg 1/1 Running 0 99s ``` -------------------------------- ### Install MinIO Tenant with Helm Chart Source: https://github.com/minio/operator/blob/master/helm/tenant/README.md Deploy a MinIO Tenant to a Kubernetes cluster using the MinIO Operator Helm chart. This command creates a tenant in the specified namespace and installs a default 4-node cluster. Custom values can be applied by referencing a values.yaml file. ```bash helm install --namespace tenant-ns \ --create-namespace tenant minio/tenant ``` -------------------------------- ### Install MinIO Operator using Kustomize Source: https://github.com/minio/operator/blob/master/README.md Installs the MinIO Operator using kubectl and Kustomize. Ensure you have Kustomize support enabled in your kubectl version. ```sh kubectl kustomize github.com/minio/operator\?ref=v7.1.1 | kubectl apply -f - ``` -------------------------------- ### MinIO Job CRD Example Source: https://github.com/minio/operator/blob/master/docs/notes/v6.0.0.md Example of deploying a MinIOJob CRD to create a bucket. This demonstrates the new MinIO Job feature for imperative task management. ```APIDOC ## MinIO Job CRD Example ### Description This example shows how to deploy a `MinIOJob` Custom Resource Definition (CRD) along with its associated policy to create a bucket named 'memes'. This illustrates the new MinIO Job functionality for managing MinIO tasks imperatively. ### Method `kubectl apply -f ` ### Endpoint N/A (Kubernetes CRD Deployment) ### Parameters N/A ### Request Example ```yaml apiVersion: v1 kind: ServiceAccount metadata: name: mc-job-sa namespace: minio-tenant-1 --- apiVersion: sts.min.io/v1alpha1 kind: PolicyBinding metadata: name: mc-job-binding namespace: minio-tenant-1 spec: application: serviceaccount: mc-job-sa namespace: minio-tenant-1 policies: - consoleAdmin --- apiVersion: job.min.io/v1alpha1 kind: MinIOJob metadata: name: minio-test-job namespace: minio-tenant-1 spec: serviceAccountName: mc-job-sa tenant: name: myminio namespace: minio-tenant-1 commands: - op: make-bucket args: name: memes ``` ### Response N/A (This is a deployment example, not an API call with a direct response.) #### Success Response (200) N/A #### Response Example N/A ``` -------------------------------- ### Deploy MinIO Operator and Tenant Source: https://github.com/minio/operator/wiki/How-to-test-Operator-Login Deploys the MinIO Operator and a sample tenant configuration. Ensure you have kind and kubectl installed and configured. ```sh kind delete cluster kind create cluster --config ~/operator/testing/kind-config.yaml kubectl apply -k ~/operator/resources kubectl apply -k ~/operator/examples/kustomization/tenant-tiny ``` -------------------------------- ### Install MinIO Operator with Helm Source: https://github.com/minio/operator/wiki/Deploy-MinIO-Operator-with-Helm Use this Helm command to install the MinIO Operator. Specify the namespace and provide a custom values file to override default configurations. ```sh helm install \ --namespace minio-operator \ --create-namespace minio-operator minio/operator \ -f /path-to-the-repository/operator/helm/operator/values.yaml ``` -------------------------------- ### Example Service Definition (No TLS) Source: https://github.com/minio/operator/blob/master/docs/notes/v6.0.0.md This YAML defines a Kubernetes Service for the MinIO console when TLS is not enabled. Note the `http-console` port name. ```yaml apiVersion: v1 kind: Service metadata: labels: v1.min.io/console: tenant-1-console name: tenant-1-console namespace: tenant-1 spec: allocateLoadBalancerNodePorts: true clusterIP: 10.96.78.111 clusterIPs: - 10.96.78.111 internalTrafficPolicy: Cluster ipFamilies: - IPv4 ipFamilyPolicy: SingleStack ports: - name: http-console nodePort: 30984 port: 9090 selector: v1.min.io/tenant: tenant-1 type: LoadBalancer ``` -------------------------------- ### Example Service Definition (TLS Enabled) Source: https://github.com/minio/operator/blob/master/docs/notes/v6.0.0.md This YAML defines a Kubernetes Service for the MinIO console when TLS is enabled. Note the `https-console` port name. ```yaml apiVersion: v1 kind: Service metadata: labels: v1.min.io/console: tenant-1-console name: tenant-1-console namespace: tenant-1 spec: allocateLoadBalancerNodePorts: true clusterIP: 10.96.78.111 clusterIPs: - 10.96.78.111 internalTrafficPolicy: Cluster ipFamilies: - IPv4 ipFamilyPolicy: SingleStack ports: - name: https-console nodePort: 32368 port: 9443 selector: v1.min.io/tenant: tenant-1 type: LoadBalancer ``` -------------------------------- ### Deploy MinIO Operator using Kustomize Source: https://github.com/minio/operator/wiki/How-to-Test-MinIO-in-AKS-(Azure-Kubernetes-Service) Builds the operator configuration and applies it to the Kubernetes cluster. Ensure you have kustomize installed and configured. ```shell kustomize build "github.com/minio/operator/resources/?timeout=120&ref=v6.0.2" > public-operator.yaml kustomize apply -f public-operator.yaml ``` -------------------------------- ### Create Sample Bucket and Policy Source: https://github.com/minio/operator/blob/master/examples/kustomization/sts-example/README.md Apply the kustomization to set up sample buckets and policies. ```shell kubectl apply -k examples/kustomization/sts-example/sample-data ``` -------------------------------- ### List Installed Tenant Helm Release Source: https://github.com/minio/operator/wiki/Helm-Upgrade Use this command to verify the current status and version of a Tenant's Helm release in its specific namespace. ```sh $ helm list -n tenant-ns NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION tenant-ns tenant-ns 1 2023-04-10 19:01:51.583706 -0400 EDT deployed tenant-5.0.2 v5.0.2 ``` -------------------------------- ### Check Tenant Status on Kubernetes Source: https://github.com/minio/operator/wiki/Helm-Upgrade On Kubernetes, use the 'k get tenant' command to verify that the tenant resource is in the 'Initialized' state, signifying successful deployment. ```sh $ k get tenant -n tenant-ns NAME STATE AGE myminio Initialized 13m ``` -------------------------------- ### Build and Run MinIO Console Operator Source: https://github.com/minio/operator/wiki/How-to-test-Operator-Login Compiles and runs the MinIO Console in operator mode. This involves navigating to the console directory, installing dependencies, and starting the server. ```sh cd ~/console make install ~/go/bin/console operator ``` -------------------------------- ### Install MinIO Operator using nelm Source: https://github.com/minio/operator/blob/master/NELM.md Use this command to install the MinIO operator from its Helm chart source. Nelm will display progress, resource status, and container logs during the installation process. ```bash $ nelm release install -n minio -r operator ./helm/operator ``` -------------------------------- ### Install the MinIO Operator Source: https://github.com/minio/operator/wiki/How-to-test-MinIOJob Use this command to install the MinIO Operator into your Kubernetes cluster. ```shell installoperator ``` -------------------------------- ### Install cert-manager Source: https://github.com/minio/operator/blob/master/docs/lets-encrypt.md Installs cert-manager version 1.7.2. Ensure your Kubernetes version is 1.19 or later. ```bash kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.7.2/cert-manager.yaml ``` -------------------------------- ### Apply Base Tenant Configuration Source: https://github.com/minio/operator/blob/master/README.md Applies a base configuration for a MinIO Tenant using Kustomization. This example creates a 4-node tenant with 4 volumes per node. ```sh kubectl apply -k github.com/minio/operator/examples/kustomization/base ``` -------------------------------- ### Install MinIO Operator Source: https://github.com/minio/operator/wiki/decommission Use this command to install the MinIO operator in nodeport mode. Ensure you have the necessary prerequisites. ```bash installoperator nodeport ``` -------------------------------- ### Deploy and Verify MinIO Tenant Source: https://context7.com/minio/operator/llms.txt Applies the tenant.yaml to deploy the MinIO Tenant and then checks its status and associated services. This confirms the Tenant is running and accessible. ```bash # Deploy the Tenant kubectl apply -f tenant.yaml # Check Tenant status kubectl get tenant myminio -n minio-tenant # List services created for the Tenant kubectl get svc -n minio-tenant # Expected output: # NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) # minio LoadBalancer 10.104.10.9 443:31834/TCP # myminio-console LoadBalancer 10.104.216.5 9443:31425/TCP ``` -------------------------------- ### Apply MinIO Operator and Tenant Configuration Source: https://github.com/minio/operator/wiki/MinIO-and-Koperator Applies the MinIO Operator and a sample MinIO Tenant configuration using Kustomize. Ensure the paths to the operator and tenant resources are correct. ```bash kubectl apply -k ~/operator/resources kubectl apply -k ~/operator/examples/kustomization/tenant-lite ``` -------------------------------- ### MinIO Decommission Start Confirmation Source: https://github.com/minio/operator/wiki/decommission Confirmation message indicating that the decommission process has been successfully started for the specified MinIO drives. ```text $ mc admin decommission start myminio/ https://myminio-pool-0-{0...3}.myminio-hl.tenant-lite.svc.cluster.local/export{0...1} --insecure Decommission started successfully for `https://myminio-pool-0-{0...3}.myminio-hl.tenant-lite.svc.cluster.local/export{0...1}`. ``` -------------------------------- ### Create MinIO Tenant Source: https://github.com/minio/operator/wiki/MinIO-and-Koperator Use this command to create a MinIO tenant with specified configurations. Ensure the namespace and storage class are correctly set for your environment. The command outputs credentials and service details upon successful creation. ```sh $ oc minio tenant create minio-tenant-1 \ --servers 1 \ --volumes 4 \ --capacity 1Gi \ --namespace minio-tenant-1 \ --storage-class local-storage \ Tenant 'minio-tenant-1' created in 'minio-tenant-1' Namespace Username: admin Password: 7ca988c1-2963-4729-9084-4230723fb51b Note: Copy the credentials to a secure location. MinIO will not display these again. +-------------+------------------------+----------------+--------------+--------------+ | APPLICATION | SERVICE NAME | NAMESPACE | SERVICE TYPE | SERVICE PORT | +-------------+------------------------+----------------+--------------+--------------+ | MinIO | minio | minio-tenant-1 | ClusterIP | 443 | | Console | minio-tenant-1-console | minio-tenant-1 | ClusterIP | 9443 | +-------------+------------------------+----------------+--------------+--------------+ ``` -------------------------------- ### Install MinIO Operator with Helm Source: https://github.com/minio/operator/wiki/Deploy-MinIO-Operator-with-Helm Installs the MinIO Operator in a dedicated namespace. Ensure the namespace is created if it doesn't exist. ```sh helm install \ --namespace minio-operator \ --create-namespace \ minio-operator minio/operator ``` -------------------------------- ### Connect to MinIO Tenant with mc CLI Source: https://context7.com/minio/operator/llms.txt Connect to MinIO using the MinIO Client (mc) CLI. Use the `--insecure` flag if connecting to a service with self-signed certificates. This example shows setting an alias, listing buckets, creating a bucket, and copying a file. ```bash # Using mc (MinIO Client) CLI mc alias set myminio https://minio.minio-tenant.svc.cluster.local:443 minio minio123 --insecure # List buckets mc ls myminio # Create bucket mc mb myminio/my-bucket # Copy file to bucket mc cp /path/to/file myminio/my-bucket/ ``` -------------------------------- ### Install cert-manager on OpenShift Source: https://github.com/minio/operator/wiki/MinIO-and-Koperator Installs the cert-manager component using kubectl. This is a prerequisite for managing TLS certificates within the OpenShift cluster. ```sh kubectl create -f https://github.com/jetstack/cert-manager/releases/download/v1.6.2/cert-manager.yaml ``` -------------------------------- ### Install Strimzi Kafka Operator CRDs Source: https://github.com/minio/operator/wiki/MinIO-and-Koperator Installs the necessary Custom Resource Definitions (CRDs) for the Strimzi Kafka operator in the Kafka namespace. ```sh kubectl create -f 'https://strimzi.io/install/latest?namespace=kafka' -n kafka ``` -------------------------------- ### Apply Local Kustomization Source: https://github.com/minio/operator/blob/master/docs/tenant-creation.md Apply the tenant configuration using Kustomize from the current directory, assuming kustomization.yaml and tenant.yaml are present. ```shell kubectl apply -k . ``` -------------------------------- ### Deploy MinIO Tenant using Kustomize Source: https://github.com/minio/operator/wiki/How-to-Test-MinIO-in-AKS-(Azure-Kubernetes-Service) Builds the tenant configuration and applies it to the Kubernetes cluster. This deploys a lightweight MinIO tenant. ```shell kustomize build "github.com/minio/operator/examples/kustomization/tenant-lite/?timeout=120&ref=v6.0.2" > tenant.yaml kustomize apply -f tenant.yaml ``` -------------------------------- ### Install Cert-manager Source: https://github.com/minio/operator/blob/master/docs/cert-manager.md Installs cert-manager version 1.12.X LTS or the latest version using kubectl. Ensure your Kubernetes version is 1.21 or later. ```bash kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.12.9/cert-manager.yaml ``` -------------------------------- ### Install MetalLB for LoadBalancer support Source: https://github.com/minio/operator/blob/master/docs/lets-encrypt.md Installs MetalLB to provide LoadBalancer services on bare-metal Kubernetes clusters. This is an alternative to cloud provider LoadBalancers. ```bash kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.12.1/manifests/namespace.yaml kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.12.1/manifests/metallb.yaml kubectl apply -f https://kind.sigs.k8s.io/examples/loadbalancer/metallb-configmap.yaml ``` -------------------------------- ### Apply Tenant Configuration with Kustomize Build Source: https://github.com/minio/operator/wiki/cert‐manager Applies a MinIO tenant configuration directly using Kustomize from a remote Git repository. This command builds and applies the configuration in one step. ```sh kubectl apply -k github.com/minio/operator/examples/kustomization/tenant-certmanager ``` -------------------------------- ### Source File License Notice Source: https://github.com/minio/operator/blob/master/CONTRIBUTING.md All contributed source files must include this copyright and license notice. Ensure the year is updated and the license details are accurate. ```go // Copyright (C) YYYY, MinIO, Inc. // // This code is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License, version 3, // as published by the Free Software Foundation. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // // You should have received a copy of the GNU Affero General Public License, version 3, // along with this program. If not, see ``` -------------------------------- ### Install Zookeeper Operator and Zookeeper Cluster Source: https://github.com/minio/operator/wiki/MinIO-and-Koperator Adds the Pravega Helm repository, updates it, and installs the Zookeeper operator. It then defines and applies a ZookeeperCluster custom resource. ```sh helm repo add pravega https://charts.pravega.io helm repo update helm install zookeeper-operator --namespace=zookeeper --create-namespace pravega/zookeeper-operator kubectl create --namespace zookeeper -f - < /Users/cniackz/bash-config/config-files/kustomize/Tenant/kustomize-tenant-5-0-10.yaml ``` -------------------------------- ### Apply Static YAML Tenant Manifest Source: https://github.com/minio/operator/blob/master/docs/tenant-creation.md Apply the generated static YAML file to create the MinIO tenant. This is a straightforward method for deploying a tenant with a predefined configuration. ```shell kubectl apply -f minio-tenant.yaml ``` -------------------------------- ### Install MinIO Operator with Helm Source: https://github.com/minio/operator/wiki/Deploy-Operator-with-Helm Installs the MinIO Operator using a Helm chart. Ensure the chart is downloaded before running this command. The command creates a new namespace for the operator. ```shell helm install \ --namespace minio-operator \ --create-namespace \ minio-operator ./operator-5.0.14.tgz ``` -------------------------------- ### Build and Load Custom Operator Image with Kind Source: https://github.com/minio/operator/blob/master/DEVELOPMENT.md Build a custom Docker image for the Minio Operator and load it into a Kind cluster. Replace `` with your desired image tag. ```bash make build TAG="minio/operator:" && kind load docker-image minio/operator: ``` -------------------------------- ### Describe Tenant Resource Source: https://github.com/minio/operator/blob/master/docs/notes/v5.0.0.md Use this command to view detailed status information for TLS certificates within a Tenant resource. ```bash kubectl describe tenant ``` -------------------------------- ### Deploy MinIO Tenant with AutoCert TLS Source: https://github.com/minio/operator/blob/master/docs/examples.md Use this command to deploy a pre-configured MinIO tenant with automatically generated TLS secrets. This is enabled by default. ```bash kustomize examples/kustomization/base | kubectl apply -f - ```