Skip to content

Commit 2bad7c2

Browse files
committed
Create pv on both kind nodes
1 parent d4f0141 commit 2bad7c2

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

04-built-in-resource-types/PersistentVolume/kind/PersistentVolume.manual-kind.yaml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v1
22
kind: PersistentVolume
33
metadata:
4-
name: manual-kind
4+
name: manual-kind-worker
55
labels:
66
name: manual-kind
77
spec:
@@ -20,3 +20,26 @@ spec:
2020
operator: In
2121
values:
2222
- kind-worker
23+
---
24+
apiVersion: v1
25+
kind: PersistentVolume
26+
metadata:
27+
name: manual-kind-worker2
28+
labels:
29+
name: manual-kind
30+
spec:
31+
accessModes:
32+
- ReadWriteOnce
33+
capacity:
34+
storage: 100Mi
35+
storageClassName: standard
36+
local:
37+
path: /some/path/in/container # Replace with the path to your local storage
38+
nodeAffinity:
39+
required:
40+
nodeSelectorTerms:
41+
- matchExpressions:
42+
- key: kubernetes.io/hostname
43+
operator: In
44+
values:
45+
- kind-worker2

0 commit comments

Comments
 (0)