-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added yaml files for minio server deployment with k8s
Signed-off-by: Dmitrii Ustiugov <dmitrii.ustiugov@ed.ac.uk>
- Loading branch information
Showing
4 changed files
with
96 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1 | ||
kind: Deployment | ||
metadata: | ||
# This name uniquely identifies the Deployment | ||
name: minio-deployment | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: minio | ||
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:latest | ||
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 | ||
hostPort: 9000 | ||
# Mount the volume into the pod | ||
volumeMounts: | ||
- name: storage # must match the volume name, above | ||
mountPath: "/storage" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
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: http://kubernetes.io/docs/user-guide/persistent-volumes/#access-modes | ||
accessModes: | ||
- ReadWriteOnce | ||
storageClassName: local-storage | ||
resources: | ||
# This is the request for storage. Should be available in the cluster. | ||
requests: | ||
storage: 100Gi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
apiVersion: v1 | ||
kind: PersistentVolume | ||
metadata: | ||
name: minio-pv | ||
spec: | ||
capacity: | ||
storage: 100Gi | ||
volumeMode: Filesystem | ||
accessModes: | ||
- ReadWriteOnce | ||
persistentVolumeReclaimPolicy: Delete | ||
storageClassName: local-storage | ||
local: | ||
# FIXME: Need a better way to assign local storage | ||
path: /minio | ||
nodeAffinity: | ||
required: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: kubernetes.io/hostname | ||
operator: In | ||
values: | ||
# FIXME: need a better way to name a node | ||
- node-0.ustiugov-qv89540.rperf-pg0.utah.cloudlab.us |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: minio-service | ||
spec: | ||
clusterIP: 10.96.0.46 | ||
ports: | ||
- port: 9000 | ||
targetPort: 9000 | ||
protocol: TCP | ||
selector: | ||
app: minio |