apiVersion: v1
kind: Pod
metadata:
  name: nginx
  labels:
    tier: frontend
    app:  nginx
  annotations:
    description: Nginx pod serving both HTTP and HTTPS (uses a secret and configmap)
spec:
  volumes:            
    - name: ssl-files              
      secret:                      
        secretName: ssl-secret     
    
    - name: nginx-conf-file     # Define the configmap volume
      configMap:                   
        name: nginx-conf        # Name must match the name of the ConfigMap containing the nginx config file
                      
  containers:
    - name: nginx
      image: nginx:1.13.8
      volumeMounts:                 
        - name: ssl-files           
          mountPath: "/ssl"         
          readOnly: true

        - name: nginx-conf-file          # Mount the config map volume,  
          mountPath: /etc/nginx/conf.d   # at the path where nginx looks for its config file
      ports:
        - containerPort: 80
        - containerPort: 443

