Skip to content

Instantly share code, notes, and snippets.

@Harsimran1
Created December 15, 2019 11:18
Show Gist options
  • Save Harsimran1/9030fcceafbcba549e99c20f8f5e8e6a to your computer and use it in GitHub Desktop.
Save Harsimran1/9030fcceafbcba549e99c20f8f5e8e6a to your computer and use it in GitHub Desktop.
Deploymeny yaml with external volume mounts for nginx.confg
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
labels:
app: nginx
spec:
replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginxinc/nginx-unprivileged:1.16.1-alpine
ports:
- containerPort: 8080
volumeMounts:
- name: nginx-config
mountPath: /etc/nginx/nginx.conf
subPath: nginx.conf
volumes:
- name: nginx-config
configMap:
name: nginx-configmap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment