Skip to content

Instantly share code, notes, and snippets.

@Yamini-crypto
Created February 9, 2024 07:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Yamini-crypto/7c6b1b833282157579deaf5c07bf50df to your computer and use it in GitHub Desktop.
Save Yamini-crypto/7c6b1b833282157579deaf5c07bf50df to your computer and use it in GitHub Desktop.
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