apiVersion: v1
kind: Pod
metadata:
  name: secret-test-pod
spec:
  volumes:
  - name: secret-volume
    secret:
      secretName: test-secret
  containers:
    - name: test-container
      image: k8s.gcr.io/busybox
      command: [ "/bin/sh", "-c", "while sleep 2; do echo thinking; done" ]
      envFrom:
      - secretRef:
          name: test-secret

      volumeMounts:
      - name: secret-volume
        readOnly: true
        mountPath: "/secrets"
  restartPolicy: Never
