There's more...

Even though it isn't recommended, you can also expose secrets as environmental variables. To accomplish this, create a new file called secret_env_pod.yml that looks like the following and refer the below screenshot:

apiVersion: v1
kind: Pod
metadata:
name: myenvpod
spec:
containers:
- name: shell
image: alpine
env:
- name: MY_SECRET
valueFrom:
secretKeyRef:
name: my-secret
key: secret.txt
command:
- "bin/ash"
- "-c"
- "sleep 10000"

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.119.155