apiVersion: apps/v1 kind: StatefulSet metadata: namespace: 命名空间 name: helm-minio spec: serviceName: helm-minio replicas: 1 selector: matchLabels: app: helm-minio template: metadata: labels: app: helm-minio spec: imagePullSecrets: - name: harborsecret affinity: {} # nodeAffinity: # requiredDuringSchedulingIgnoredDuringExecution: # nodeSelectorTerms: # - matchExpressions: # - key: minio-deploy # operator: In # values: # - "true" containers: - name: minio image: 镜像仓库/cmii/minio:RELEASE.2023-06-02T23-17-26Z command: ["/bin/sh", "-c"] args: - minio server /data --console-address ":9001" ports: - containerPort: 9000 name: api - containerPort: 9001 name: console env: - name: MINIO_ACCESS_KEY value: "cmii" - name: MINIO_SECRET_KEY value: "B#923fC7mk" volumeMounts: - name: data mountPath: /data resources: limits: memory: 1Gi cpu: "1" requests: memory: 200Mi cpu: 200m volumes: - name: data persistentVolumeClaim: claimName: helm-minio # hostPath: # path: /var/lib/docker/minio-pv/ --- apiVersion: v1 kind: Service metadata: name: helm-minio namespace: 命名空间 spec: selector: app: helm-minio ports: - name: api port: 9000 targetPort: 9000 nodePort: 39000 - name: console port: 9001 targetPort: 9001 nodePort: 39001 type: NodePort