Skip to content

Instantly share code, notes, and snippets.

@duglin
Created Apr 13, 2017
Embed
What would you like to do?
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