Skip to content

Instantly share code, notes, and snippets.

@duglin
Created April 13, 2017 13:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save duglin/9db61a7c4e2bf497c56047592b7feb5d to your computer and use it in GitHub Desktop.
Save duglin/9db61a7c4e2bf497c56047592b7feb5d to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: PersistentVolume
metadata:
name: local-volume-test
labels:
type: local
spec:
capacity:
storage: 5Gi
accessModes:
- ReadWriteOnce
hostPath:
path: /tmp/data/data
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: test-claim
labels:
app: test
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
---
piVersion: v1
kind: Pod
metadata:
name: pod
spec:
containers:
- name: httpd
image: ubuntu
command: [ "/bin/sh", "-c", "sleep 5000" ]
imagePullPolicy: IfNotPresent
volumeMounts:
- name: test-vol
mountPath: /data
volumes:
- name: test-vol
persistentVolumeClaim:
claimName: test-claim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment