Last active
April 12, 2019 01:41
-
-
Save prabhakar97/739dfe55fa710d8c1cffd5bc63bb99c5 to your computer and use it in GitHub Desktop.
Nginx deployment file with config maps
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 # for versions before 1.9.0 use apps/v1beta2 | |
kind: Deployment | |
metadata: | |
name: nginx-dep | |
spec: | |
selector: | |
matchLabels: | |
app: nginx | |
replicas: 1 | |
template: | |
metadata: | |
labels: | |
app: nginx | |
spec: | |
containers: | |
- name: nginx | |
image: nginx:mainline-alpine | |
imagePullPolicy: "IfNotPresent" | |
ports: | |
- containerPort: 80 | |
volumeMounts: | |
- name: nginx-config | |
mountPath: /etc/nginx/nginx.conf | |
subPath: nginx.conf | |
- name: railsportal-nginx-config | |
mountPath: /etc/nginx/sites-enabled/railsportal.nginx.conf | |
subPath: railsportal.nginx.conf | |
volumes: | |
- name: nginx-config | |
configMap: | |
name: nginxconfig | |
- name: railsportal-nginx-config | |
configMap: | |
name: railsportalnginxconfig |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment