Skip to content

Instantly share code, notes, and snippets.

@alezkv
Created June 19, 2024 07:40
Show Gist options
  • Save alezkv/ac2280dcae300f24495ebb54d44d6d98 to your computer and use it in GitHub Desktop.
Save alezkv/ac2280dcae300f24495ebb54d44d6d98 to your computer and use it in GitHub Desktop.
(!!!Not redundant) MinIO minimal Kubernetes deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: minio
spec:
selector:
matchLabels:
app: minio
strategy:
type: Recreate
template:
metadata:
labels:
app: minio
spec:
volumes:
- name: data
persistentVolumeClaim:
claimName: minio-pvc
containers:
- name: minio
volumeMounts:
- name: data
mountPath: "/data"
image: minio/minio
args:
- server
- /data
- '--console-address=:9001'
env:
- name: MINIO_ROOT_USER
valueFrom:
secretKeyRef:
name: minio-credentials
key: username
- name: MINIO_ROOT_PASSWORD
valueFrom:
secretKeyRef:
name: minio-credentials
key: password
ports:
- containerPort: 9000
- containerPort: 9001
readinessProbe:
httpGet:
path: /minio/health/ready
port: 9000
initialDelaySeconds: 120
periodSeconds: 20
livenessProbe:
httpGet:
path: /minio/health/live
port: 9000
initialDelaySeconds: 120
periodSeconds: 20
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: minio-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 50Gi
apiVersion: v1
kind: Secret
metadata:
name: minio-credentials
type: Opaque
stringData:
username: minio
password: minio123
apiVersion: v1
kind: Service
metadata:
name: minio
spec:
ports:
- port: 9000
name: api
targetPort: 9000
protocol: TCP
- port: 9001
name: webui
targetPort: 9001
protocol: TCP
selector:
app: minio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment