44 lines
		
	
	
		
			763 B
		
	
	
	
		
			YAML
		
	
	
	
			
		
		
	
	
			44 lines
		
	
	
		
			763 B
		
	
	
	
		
			YAML
		
	
	
	
| apiVersion: v1
 | |
| kind: Service
 | |
| metadata:
 | |
|   name: my-nginx
 | |
|   labels:
 | |
|     run: my-nginx
 | |
| spec:
 | |
|   type: NodePort
 | |
|   ports:
 | |
|   - port: 8080
 | |
|     targetPort: 80
 | |
|     protocol: TCP
 | |
|     name: http
 | |
|   - port: 443
 | |
|     protocol: TCP
 | |
|     name: https
 | |
|   selector:
 | |
|     run: my-nginx
 | |
| ---
 | |
| apiVersion: apps/v1beta1
 | |
| kind: Deployment
 | |
| metadata:
 | |
|   name: my-nginx
 | |
| spec:
 | |
|   replicas: 1
 | |
|   template:
 | |
|     metadata:
 | |
|       labels:
 | |
|         run: my-nginx
 | |
|     spec:
 | |
|       volumes:
 | |
|       - name: secret-volume
 | |
|         secret:
 | |
|           secretName: nginxsecret
 | |
|       containers:
 | |
|       - name: nginxhttps
 | |
|         image: bprashanth/nginxhttps:1.0
 | |
|         ports:
 | |
|         - containerPort: 443
 | |
|         - containerPort: 80
 | |
|         volumeMounts:
 | |
|         - mountPath: /etc/nginx/ssl
 | |
|           name: secret-volume
 |