Created
February 9, 2024 07:29
-
-
Save Yamini-crypto/7c6b1b833282157579deaf5c07bf50df to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: nginx-deployment | |
annotations: | |
reloader.stakater.com/auto: "true" | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: nginx | |
template: | |
metadata: | |
labels: | |
app: nginx | |
spec: | |
containers: | |
- name: nginx | |
image: nginx | |
ports: | |
- containerPort: 80 | |
env: | |
- name: SECRET_DEMO | |
valueFrom: | |
secretKeyRef: | |
name: secret-demo | |
key: secret-demo | |
command: | |
- "/bin/bash" | |
- "-c" | |
- | | |
echo "$SECRET_DEMO" > /usr/share/nginx/html/index.html | |
nginx -g 'daemon off;' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment