-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path01-create-pv-consul.yaml
89 lines (89 loc) · 1.86 KB
/
01-create-pv-consul.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: consul-storage
provisioner: kubernetes.io/no-provisioner
reclaimPolicy: Delete
volumeBindingMode: WaitForFirstConsumer
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: consul-data-0
spec:
accessModes:
- ReadWriteOnce
capacity:
storage: 2Gi
claimRef:
apiVersion: v1
kind: PersistentVolumeClaim
name: data-consul-consul-server-0
namespace: consul
local:
path: /var/lib/consul0
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- osc01.servicemesh.local
persistentVolumeReclaimPolicy: Retain
storageClassName: consul-storage
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: consul-data-1
spec:
accessModes:
- ReadWriteOnce
capacity:
storage: 2Gi
claimRef:
apiVersion: v1
kind: PersistentVolumeClaim
name: data-consul-consul-server-1
namespace: consul
local:
path: /var/lib/consul1
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- osc01.servicemesh.local
persistentVolumeReclaimPolicy: Retain
storageClassName: consul-storage
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: consul-data-2
spec:
accessModes:
- ReadWriteOnce
capacity:
storage: 2Gi
claimRef:
apiVersion: v1
kind: PersistentVolumeClaim
name: data-consul-consul-server-2
namespace: consul
local:
path: /var/lib/consul2
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- osc01.servicemesh.local
persistentVolumeReclaimPolicy: Retain
storageClassName: consul-storage
---