Skip to content

Instantly share code, notes, and snippets.

@alhafoudh
Forked from dims/hostpath-pvc-example.yaml
Last active October 16, 2017 22:10
Show Gist options
  • Save alhafoudh/a6daf32dad38bb37cabfa37c8d2b5e49 to your computer and use it in GitHub Desktop.
Save alhafoudh/a6daf32dad38bb37cabfa37c8d2b5e49 to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: PersistentVolume
metadata:
name: test-volume
spec:
capacity:
storage: 1Gi
accessModes:
- ReadWriteOnce
hostPath:
path: /mnt/data/test
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: test-claim
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
---
apiVersion: v1
kind: Pod
metadata:
name: test-pod
spec:
containers:
- name: web
image: gcr.io/google-containers/nginx:1.7.9
volumeMounts:
- mountPath: "/usr/share/nginx/html"
name: web-volume
volumes:
- name: web-volume
persistentVolumeClaim:
claimName: test-claim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment