Created
March 5, 2022 06:30
-
-
Save mr-pascal/ed92182fcf2b94c5b44aad40ad9a755c 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 | |
labels: | |
name: nginx | |
spec: | |
selector: | |
matchLabels: | |
name: nginx | |
template: | |
metadata: | |
labels: | |
name: nginx | |
spec: | |
containers: | |
- name: nginx | |
image: nginx:1.21.6-alpine | |
ports: | |
- containerPort: 80 | |
###### Mount the config map | |
volumeMounts: | |
- name: mnt | |
mountPath: /usr/share/nginx/html/index.html | |
subPath: file-from-cfgmap | |
volumes: | |
- name: mnt | |
configMap: | |
name: nginx-cfgmap |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment