apiVersion: v1
kind: Service
metadata:
  labels:
    app: minio
  name: minio
spec:
  ports:
    - port: 9000
      protocol: TCP
      targetPort: 9000
  selector:
    statefulset.kubernetes.io/pod-name: minio-0
  type: NodePort
---
apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
  name: minio
  labels:
    app: minio
spec:
  serviceName: "minio"
  replicas: 1
  selector:
    matchLabels:
      app: minio
  template:
    metadata:
      labels:
        app: minio
    spec:
      # Yolo - no pv.
      containers:
        - name: minio
          image: minio/minio:RELEASE.2019-01-31T00-31-19Z
          args:
            - server
            - /data
          env:
            - name: MINIO_ACCESS_KEY
              value: "smth"
            - name: MINIO_SECRET_KEY
              value: "Need8Chars"
          ports:
            - containerPort: 9000