<p>I am able to get a secrets file pulled from AWS Secrets Manager and mounted in the container. The format of the secrets file is as follows:</p>
<pre><code>{&quot;testkey&quot;:&quot;datepie&quot;}
</code></pre>
<p>How do I reformat the file to be like this:</p>
<pre><code>testkey=datepie
</code></pre>
<p>Here is my manifest file:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: test-app
  labels:
    app: test-app
spec:
  replicas: 2
  selector:
    matchLabels:
      app: test-app
  template:
    metadata:
      labels:
        app: test-app
    spec:
      serviceAccountName: test-service-account
      containers:
      - name: test-app
        image: 111122223333.dkr.ecr.us-west-2.amazonaws.com/test.example:test-service-1.0.0-main
        volumeMounts:
          - name: test-secrets
            mountPath: /mnt/
            readOnly: true
. . .
      volumes:
      - name: test-secrets
        csi:
          driver: secrets-store.csi.k8s.io
          readOnly: true
          volumeAttributes:
            secretProviderClass: test-secrets
</code></pre>

Nova
<p>I figured it out. Use the desired format in the AWS Secrets Manager itself, so in the &quot;Secret value&quot; part, select &quot;Plaintext&quot; and put <code>testkey=datepie</code> in the box. The &quot;Secret key/value&quot; tab will no longer be usable, which is not an issue.</p>
<p><a href="https://i.stack.imgur.com/IfUw6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IfUw6.png" alt="enter image description here" /></a></p>
