2015-06-11 04:25:54 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								apiVersion: v1
							 | 
						
					
						
							
								
									
										
										
										
											2014-10-21 13:44:14 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								kind: ReplicationController
							 | 
						
					
						
							
								
									
										
										
										
											2015-05-08 08:55:36 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								metadata:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  name: nginx-controller
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								spec:
							 | 
						
					
						
							
								
									
										
										
										
											2014-10-21 13:44:14 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  replicas: 2
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-21 06:46:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  # selector identifies the set of Pods that this
							 | 
						
					
						
							
								
									
										
										
										
											2015-06-17 05:48:51 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  # replication controller is responsible for managing
							 | 
						
					
						
							
								
									
										
										
										
											2015-05-08 08:55:36 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  selector:
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-21 06:46:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    app: nginx
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  # podTemplate defines the 'cookie cutter' used for creating
							 | 
						
					
						
							
								
									
										
										
										
											2014-10-21 13:44:14 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  # new pods when necessary
							 | 
						
					
						
							
								
									
										
										
										
											2015-05-08 08:55:36 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  template:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    metadata:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      labels:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        # Important: these labels need to match the selector above
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        # The api server enforces this constraint.
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-21 06:46:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        app: nginx
							 | 
						
					
						
							
								
									
										
										
										
											2015-05-08 08:55:36 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    spec:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      containers:
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-21 06:46:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								      - name: nginx
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        image: nginx
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        ports:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        - containerPort: 80
							 |