title: How to pass all values from multiple Secrets to env variables in Kubernetes?
body: <p>I have multiple Secrets in a Kubernetes. All of them contain many values, as example:</p>
  
  <pre><code>apiVersion: v1
  kind: Secret
  metadata:
    name: paypal-secret
  type: Opaque
  data:
    PAYPAL_CLIENT_ID: base64_PP_client_id
    PAYPAL_SECRET: base64_pp_secret
  stringData:
    PAYPAL_API: https://api.paypal.com/v1
    PAYPAL_HOST: api.paypal.com
  </code></pre>
  
  <p>I'm curious how to pass all of the values from all <code>Secrets</code> to a <code>ReplicaSet</code> for example.</p>
  
  <p>I tried this one approach:</p>
  
  <pre><code>apiVersion: apps/v1
  kind: ReplicaSet
  metadata:
    name: pp-debts
    labels:
      environment: prod
  spec:
    replicas: 1
    selector:
      matchLabels:
        environment: prod
    template:
      metadata:
        labels:
          environment: prod
      spec:
        containers:
        - name: integration-app
          image: my-container-image
          envFrom:
          - secretRef:
            name: intercom-secret
          envFrom:
          - secretRef:
              name: paypal-secret
          envFrom:
          - secretRef:
              name: postgres-secret
          envFrom:
          - secretRef:
              name: redis-secret
  </code></pre>
  
  <p>But when I connected to the pod, and looked on the env variables, I was able to see only values from the <code>redis-secret</code>.</p>