--- apiVersion: v1 kind: Namespace metadata: name: minio --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: demo-minio-pvc namespace: minio spec: storageClassName: standard resources: requests: storage: 1Gi accessModes: - ReadWriteOnce --- 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 namespace: minio 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: demo-minio-pvc containers: - name: minio # Pulls the default Minio image from Docker Hub image: minio/minio:latest args: - server - /storage - --console-address - ":9001" env: # Minio access key and secret key - name: MINIO_ACCESS_KEY value: "minio" - name: MINIO_SECRET_KEY value: "minio123" ports: - containerPort: 9000 hostPort: 9000 - containerPort: 9001 hostPort: 9001 # Mount the volume into the pod volumeMounts: - name: storage # must match the volume name, above mountPath: "/storage" --- apiVersion: v1 kind: Service metadata: name: minio-svc namespace: minio labels: app: minio spec: ports: - port: 9000 name: minio - port: 9001 name: minio-console selector: app: minio --- # Source: nextcloud/templates/ingress.yaml apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: minio namespace: "minio" annotations: # cert-manager.io/cluster-issuer: letsencrypt kubernetes.io/ingress.class: nginx spec: rules: - host: minio.minikube http: paths: - path: "/" pathType: Prefix backend: service: name: minio-svc port: number: 9001