mirror of
				https://github.com/k3s-io/kubernetes.git
				synced 2025-10-31 13:50:01 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			25 lines
		
	
	
		
			609 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			609 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
| apiVersion: v1
 | |
| kind: ReplicationController
 | |
| metadata:
 | |
|   name: nginx-controller
 | |
| spec:
 | |
|   replicas: 2
 | |
|   # selector identifies the set of Pods that this
 | |
|   # replication controller is responsible for managing
 | |
|   selector:
 | |
|     app: nginx
 | |
|   # podTemplate defines the 'cookie cutter' used for creating
 | |
|   # new pods when necessary
 | |
|   template:
 | |
|     metadata:
 | |
|       labels:
 | |
|         # Important: these labels need to match the selector above
 | |
|         # The api server enforces this constraint.
 | |
|         app: nginx
 | |
|     spec:
 | |
|       containers:
 | |
|       - name: nginx
 | |
|         image: nginx
 | |
|         ports:
 | |
|         - containerPort: 80
 |