Skip to content

Instantly share code, notes, and snippets.

@oceanapplications
Created July 22, 2021 01:28
Show Gist options
  • Save oceanapplications/b0680f17326179ef45553e214fc63487 to your computer and use it in GitHub Desktop.
Save oceanapplications/b0680f17326179ef45553e214fc63487 to your computer and use it in GitHub Desktop.
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx
labels:
tier: backend
spec:
replicas: 1
selector:
matchLabels:
app: nginx
tier: backend
template:
metadata:
labels:
app: nginx
tier: backend
spec:
volumes:
- name: code
persistentVolumeClaim:
claimName: code
- name: config
configMap:
name: nginx-config
items:
- key: config
path: site.conf
containers:
- name: nginx
image: nginx:1.21.0
ports:
- containerPort: 80
volumeMounts:
- name: code
mountPath: /code
- name: config
mountPath: /etc/nginx/conf.d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment