mirror of
				https://github.com/k3s-io/kubernetes.git
				synced 2025-10-31 13:50:01 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			44 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			44 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
| apiVersion: apps/v1beta2
 | |
| 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"
 |