Created
June 21, 2023 10:05
-
-
Save ajeetraina/136f38fc9a622714f0dbc7770f32aba4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
kind: Deployment | |
metadata: | |
name: nginx-deployment | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: nginx | |
template: | |
metadata: | |
labels: | |
app: nginx | |
spec: | |
containers: | |
- name: nginx | |
image: nginx:latest | |
ports: | |
- containerPort: 80 | |
env: | |
- name: SERVER_NAME | |
valueFrom: | |
fieldRef: | |
fieldPath: metadata.name | |
volumeMounts: | |
- name: nginx-config | |
mountPath: /etc/nginx/conf.d/default.conf | |
subPath: nginx.conf | |
volumes: | |
- name: nginx-config | |
configMap: | |
name: nginx-config |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment