Minio FS mode:
- Deploy minio in fs mode with below yaml in a file like
$ kubectl create -f my-minio-fs.yaml
## Create persistent volume claim for minio to store data.
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: my-minio-fs-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
---
## Run minio fs deployment.
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-minio-fs
labels:
app: my-minio-fs
spec:
selector:
matchLabels:
app: my-minio-fs
template:
metadata:
labels:
app: my-minio-fs
spec:
volumes:
- name: data
persistentVolumeClaim:
claimName: my-minio-fs-pvc
containers:
- name: my-minio-fs
volumeMounts:
- name: data
mountPath: "/data"
image: minio/minio:RELEASE.2017-11-22T19-55-46Z
args:
- server
- /data
env:
- name: MINIO_ACCESS_KEY
value: "minio_access_key"
- name: MINIO_SECRET_KEY
value: "minio_secret_key"
ports:
- containerPort: 9000
hostPort: 9000
- To make the above deployment accessible from outside network, run below command
$ kubectl expose deployment/my-minio-fs --type="NodePort" --port 9000
- Run below command to know the port the above service exposed.
kubectl get services/my-minio-fs -o go-template='{{(index .spec.ports 0).nodePort}}'
- Use this port in the endpoint
http://minikube:<EXPOSED-PORT>