mirror of
				https://github.com/k3s-io/kubernetes.git
				synced 2025-11-03 23:40:03 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			14 lines
		
	
	
		
			376 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			376 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
kind: Service
 | 
						|
apiVersion: v1beta1
 | 
						|
id: nginx-example
 | 
						|
# the port that this service should serve on
 | 
						|
port: 8000
 | 
						|
# just like the selector in the replication controller,
 | 
						|
# but this time it identifies the set of pods to load balance
 | 
						|
# traffic to.
 | 
						|
selector:
 | 
						|
  name: nginx
 | 
						|
# the container on each pod to connect to, can be a name
 | 
						|
# (e.g. 'www') or a number (e.g. 80)
 | 
						|
containerPort: 80
 |