apiVersion: v1
kind: Pod
metadata:
  name: nginx
  labels:
    tier: frontend
    app:  nginx
  annotations:
    description: Nginx pod with a secret containing TLS data
spec:
  volumes:            
    - name: ssl-files              # Define the secret volume
      secret:                      # Create a secret-volume to store sensitive data
        secretName: ssl-secret     # Name must match the secret object you created using the kubectl secret command
                      
  containers:
    - name: nginx
      image: nginx:1.13.8
      volumeMounts:                 # Mount the secret volume
        - name: ssl-files           # Name must match the secret volume name defined above in spec.volumes
          mountPath: "/ssl"         # The mountPath within the container where the secret data will appear
          readOnly: true
      ports:
        - containerPort: 80

