Skip to content

Instantly share code, notes, and snippets.

@dsgnr
Created June 30, 2021 10:21
Show Gist options
  • Save dsgnr/32f1d7ecb4c6a72d0aaa9f835dc9b53a to your computer and use it in GitHub Desktop.
Save dsgnr/32f1d7ecb4c6a72d0aaa9f835dc9b53a to your computer and use it in GitHub Desktop.
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: dantest
labels: &Labels
app: dantest
spec:
replicas: 1
selector:
matchLabels: *Labels
template:
metadata:
labels: *Labels
spec:
containers:
- name: dantest
image: nginx
volumeMounts:
- name: dantest-volume
mountPath: /mnt
volumes:
- name: dantest-volume
persistentVolumeClaim:
claimName: dantest-storage-claim
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: dantest-volume
spec:
capacity:
storage: 10Gi
accessModes:
- ReadWriteOnce
hostPath:
path: /Users/dani2934
claimRef:
namespace: default
name: dantest-storage-claim
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: dantest-storage-claim
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 3Gi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment