Created
August 9, 2019 01:33
-
-
Save 74th/8bb1b1a1ef5e7879f1708695baa67253 to your computer and use it in GitHub Desktop.
Kubernetes Readonly filesystem nginx example
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: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: readonly-fs-test | |
spec: | |
replicas: 1 | |
template: | |
metadata: | |
labels: | |
name: readonly-fs-test | |
spec: | |
containers: | |
- name: nginx | |
image: nginx:1.17.2 | |
securityContext: | |
readOnlyRootFilesystem: true | |
volumeMounts: | |
- name: run | |
mountPath: /var/run | |
- name: log | |
mountPath: /var/log/nginx | |
- name: cache | |
mountPath: /var/cache/nginx | |
volumes: | |
- name: run | |
emptyDir: | |
medium: "" | |
- name: log | |
emptyDir: | |
medium: "" | |
- name: cache | |
emptyDir: | |
medium: "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment