Last active
April 20, 2024 09:58
-
-
Save si3mshady/d0df09a827a03aea1ef8559b3c70e0e9 to your computer and use it in GitHub Desktop.
MinIO deployment on a Kubernetes cluster
This file contains 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
apiVersion: storage.k8s.io/v1 | |
kind: StorageClass | |
metadata: | |
name: minio-storage-class | |
provisioner: kubernetes.io/gce-pd # or the appropriate provisioner for your cluster | |
volumeBindingMode: Immediate | |
--- | |
# MinIO Persistent Volume Claim | |
apiVersion: v1 | |
kind: PersistentVolumeClaim | |
metadata: | |
name: minio-data | |
spec: | |
accessModes: | |
- ReadWriteOnce | |
storageClassName: minio-storage-class # Use the custom StorageClass | |
resources: | |
requests: | |
storage: 10Gi | |
--- | |
# MinIO StatefulSet | |
apiVersion: apps/v1 | |
kind: StatefulSet | |
metadata: | |
name: minio | |
spec: | |
serviceName: minio | |
replicas: 3 | |
selector: | |
matchLabels: | |
app: minio | |
template: | |
metadata: | |
labels: | |
app: minio | |
spec: | |
containers: | |
- name: minio | |
image: quay.io/minio/minio:latest | |
command: | |
- /bin/bash | |
- -c | |
args: | |
- minio server /data --console-address :9090 | |
ports: | |
- containerPort: 9000 | |
- containerPort: 9090 | |
volumeMounts: | |
- name: data | |
mountPath: /data | |
volumeClaimTemplates: | |
- metadata: | |
name: data | |
spec: | |
accessModes: ["ReadWriteOnce"] | |
resources: | |
requests: | |
storage: 10Gi | |
--- | |
# MinIO Service (LoadBalancer) | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: minio | |
spec: | |
type: LoadBalancer | |
ports: | |
- name: minio-server | |
port: 9000 | |
targetPort: 9000 | |
- name: minio-console | |
port: 9090 | |
targetPort: 9090 | |
selector: | |
app: minio |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Added storage class - for immediate PVC binding