Skip to content

Instantly share code, notes, and snippets.

@akhilerm
Created November 15, 2020 17:48
Show Gist options
  • Save akhilerm/194a1606c514d8930addcaef56f9f19f to your computer and use it in GitHub Desktop.
Save akhilerm/194a1606c514d8930addcaef56f9f19f to your computer and use it in GitHub Desktop.
Deploy Sample Minio application
#Create namespace
apiVersion: v1
kind: Namespace
metadata:
name: minio
---
apiVersion: apps/v1
kind: Deployment
metadata:
# This name uniquely identifies the Deployment
name: minio-deployment
namespace: minio
spec:
selector:
matchLabels:
name: minio
strategy:
type: Recreate
template:
metadata:
labels:
# Label is used as selector in the service.
name: minio
spec:
nodeSelector:
kubernetes.io/hostname: worker-ak1
volumes:
- name: storage
persistentVolumeClaim:
claimName: minio-localpv-device
containers:
- name: minio
# Pulls the default Minio image from Docker Hub
image: minio/minio
args:
- server
- /storage
env:
# Minio access key and secret key
- name: MINIO_ACCESS_KEY
value: "minio"
- name: MINIO_SECRET_KEY
value: "minio123"
ports:
- containerPort: 9000
# Mount the volume into the pod
volumeMounts:
- name: storage
mountPath: "/storage"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: minio-localpv-device
namespace: minio
labels:
app: minio
spec:
storageClassName: openebs-device
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10G
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment