Guia-Tutorial-kubernetes/yaml-del-pelado/15-pod-secret.yaml

24 lines
437 B
YAML
Raw Normal View History

2022-09-19 18:31:05 +02:00
apiVersion: v1
kind: Pod
metadata:
name: nginx
spec:
containers:
- name: nginx
image: nginx:alpine
env:
- name: MI_VARIABLE
value: "pelado"
- name: MYSQL_USER
valueFrom:
secretKeyRef:
name: db-credentials
key: username
- name: MYSQL_PASSWORD
valueFrom:
secretKeyRef:
name: db-credentials
key: password
ports:
- containerPort: 80