Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- apiVersion: v1
- kind: PersistentVolumeClaim
- metadata:
- # This name uniquely identifies the PVC. Will be used in deployment below.
- name: minio-pv-claim
- labels:
- app: minio-storage-claim
- spec:
- # Read more about access modes here: https://kubernetes.io/docs/user-guide/persistent-volumes/#access-modes
- accessModes:
- - ReadWriteOnce
- resources:
- # This is the request for storage. Should be available in the cluster.
- requests:
- storage: 30Gi
- # Uncomment and add storageClass specific to your requirements below. Read more https://kubernetes.io/docs/concepts/storage/persistent-volumes/#class-1
- #storageClassName:
- ---
- apiVersion: extensions/v1
- kind: Deployment
- metadata:
- # This name uniquely identifies the Deployment
- name: minio-deployment
- spec:
- strategy:
- type: Recreate
- template:
- metadata:
- labels:
- # Label is used as selector in the service.
- app: minio
- spec:
- # Refer to the PVC created earlier
- volumes:
- - name: storage
- persistentVolumeClaim:
- # Name of the PVC created earlier
- claimName: minio-pv-claim
- 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: "AKIAIOSFODNN7EXAMPLE"
- - name: MINIO_SECRET_KEY
- value: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
- ports:
- - containerPort: 9000
- # Mount the volume into the pod
- volumeMounts:
- - name: storage # must match the volume name, above
- mountPath: "/storage"
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: minio-service
- spec:
- type: LoadBalancer
- ports:
- - port: 9000
- targetPort: 9000
- protocol: TCP
- selector:
- app: minio
Add Comment
Please, Sign In to add comment