Skip to content

Instantly share code, notes, and snippets.

@alazycoder101
Created October 23, 2021 09:02
Show Gist options
  • Save alazycoder101/ed52d1edde5cc92021bc9f37c30c1d59 to your computer and use it in GitHub Desktop.
Save alazycoder101/ed52d1edde5cc92021bc9f37c30c1d59 to your computer and use it in GitHub Desktop.
nginx deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx
spec:
selector:
matchLabels:
app: nginx
replicas: 1
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.14.2
ports:
- containerPort: 80
volumeMounts:
- name: nginx-conf
mountPath: /etc/nginx/nginx.conf
subPath: nginx.conf
readOnly: true
volumes:
- name: nginx-conf
configMap:
name: nginx-conf
items:
- key: nginx.conf
path: nginx.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment