-
-
Save dsgnr/32f1d7ecb4c6a72d0aaa9f835dc9b53a to your computer and use it in GitHub Desktop.
This file contains 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: 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