Commit 28999032 authored by Vũ Hoàng Nam's avatar Vũ Hoàng Nam

Deploy Min.io using PV,PVC connect to NFS server.

parent fcbfa41b
---
# Deploys a new MinIO Pod into the metadata.namespace Kubernetes namespace
#
# The `spec.containers[0].args` contains the command run on the pod
# The `/data` directory corresponds to the `spec.containers[0].volumeMounts[0].mountPath`
# That mount path corresponds to a Kubernetes HostPath which binds `/data` to a local drive or volume on the worker node where the pod runs
#
apiVersion: v1
kind: Pod
metadata:
labels:
app: minio
name: minio
namespace: minio-dev # Change this value to match the namespace metadata.name
spec:
containers:
- name: minio
image: quay.io/minio/minio:latest
resources:
limits:
memory: "2048Mi"
cpu: "2000m"
command:
- /bin/bash
- -c
args:
- minio server /data --console-address :9090
volumeMounts:
- mountPath: /data
name: localvolume
volumes:
- name: localvolume
persistentVolumeClaim:
claimName: minio-pvc
\ No newline at end of file
# Deploys a new Namespace for the MinIO Pod
apiVersion: v1
kind: Namespace
metadata:
name: minio-dev # Change this value if you want a different namespace name
labels:
name: minio-dev # Change this value to match metadata.name
\ No newline at end of file
apiVersion: v1
kind: PersistentVolume
metadata:
name: minio-pv
spec:
capacity:
storage: 1024Mi
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
storageClassName: ""
persistentVolumeReclaimPolicy: Recycle
nfs:
path: /var/nfs/k8s
server: 192.168.67.9
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: minio-pvc
namespace: minio-dev
spec:
resources:
requests:
storage: 1000Mi
volumeMode: Filesystem
storageClassName: ""
volumeName: minio-pv # Specific PV to PVC connect
accessModes:
- ReadWriteOnce
apiVersion: v1
kind: Service
metadata:
name: minio-svc
namespace: minio-dev
spec:
type: NodePort
selector:
app: minio
ports:
- port: 9090
nodePort: 30001
targetPort: 9090
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment