Last active
November 8, 2025 01:06
-
-
Save williamcaban/831718fafc57b7c9bb1f50c7b55c470b to your computer and use it in GitHub Desktop.
Deploying Minio Community Edition container in OpenShift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # kubectl create secret generic minio-secret \ | |
| # --from-literal=rootUser=your-username \ | |
| # --from-literal=rootPassword=your-secure-password \ | |
| # -o yaml --dry-run=client > minio-secret.yaml | |
| # | |
| # kubectl apply -f minio-secret.yaml -f minio.yaml | |
| --- | |
| apiVersion: v1 | |
| kind: Secret | |
| metadata: | |
| name: minio-secret | |
| type: Opaque | |
| stringData: | |
| rootUser: minioadmin | |
| rootPassword: minioadmin | |
| --- | |
| apiVersion: v1 | |
| kind: PersistentVolumeClaim | |
| metadata: | |
| name: minio-pvc | |
| spec: | |
| accessModes: | |
| - ReadWriteOnce | |
| storageClassName: lvms-vg1 | |
| resources: | |
| requests: | |
| storage: 10Gi | |
| --- | |
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: minio | |
| labels: | |
| app: minio | |
| spec: | |
| replicas: 1 | |
| selector: | |
| matchLabels: | |
| app: minio | |
| template: | |
| metadata: | |
| labels: | |
| app: minio | |
| spec: | |
| containers: | |
| - name: minio | |
| image: quay.io/minio/minio:latest | |
| args: | |
| - server | |
| - /data | |
| - --console-address | |
| - $(MINIO_CONSOLE_ADDRESS) | |
| env: | |
| - name: MINIO_ROOT_USER | |
| valueFrom: | |
| secretKeyRef: | |
| name: minio-secret | |
| key: rootUser | |
| - name: MINIO_ROOT_PASSWORD | |
| valueFrom: | |
| secretKeyRef: | |
| name: minio-secret | |
| key: rootPassword | |
| - name: MINIO_CONSOLE_ADDRESS | |
| value: ":9001" | |
| ports: | |
| - containerPort: 9000 | |
| name: api | |
| - containerPort: 9001 | |
| name: console | |
| volumeMounts: | |
| - name: minio-storage | |
| mountPath: /data | |
| volumes: | |
| - name: minio-storage | |
| persistentVolumeClaim: | |
| claimName: minio-pvc | |
| --- | |
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: minio | |
| spec: | |
| type: ClusterIP | |
| selector: | |
| app: minio | |
| ports: | |
| - name: api | |
| port: 9000 | |
| targetPort: 9000 | |
| - name: console | |
| port: 9001 | |
| targetPort: 9001 | |
| --- | |
| apiVersion: route.openshift.io/v1 | |
| kind: Route | |
| metadata: | |
| name: minio-console | |
| spec: | |
| to: | |
| kind: Service | |
| name: minio | |
| port: | |
| targetPort: console | |
| tls: | |
| termination: edge | |
| insecureEdgeTerminationPolicy: Redirect |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment