-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path0nfs-storaageclass.yaml
92 lines (88 loc) · 2.25 KB
/
0nfs-storaageclass.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
90
91
92
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: nfs-logging
namespace: elklogging
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: nfs-client-logging-runner
namespace: elklogging
rules:
- apiGroups: [""]
resources: ["persistentvolumes"]
verbs: ["get", "list", "watch", "create", "delete"]
- apiGroups: [""]
resources: ["persistentvolumeclaims"]
verbs: ["get", "list", "watch", "update"]
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["events"]
verbs: ["list", "watch", "create", "update", "patch"]
- apiGroups: [""]
resources: ["services", "endpoints"]
verbs: ["get","create","list", "watch","update"]
- apiGroups: ["extensions"]
resources: ["podsecuritypolicies"]
resourceNames: ["nfs-logging"]
verbs: ["use"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: run-nfs-client-logging
subjects:
- kind: ServiceAccount
name: nfs-logging
namespace: elklogging
roleRef:
kind: ClusterRole
name: nfs-client-logging-runner
apiGroup: rbac.authorization.k8s.io
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: nfs-elk-class
provisioner: nfs-storage
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: nfs-client-logging
namespace: elklogging
spec:
replicas: 1
selector:
matchLabels:
app: nfs-client-logging
strategy:
type: Recreate
template:
metadata:
labels:
app: nfs-client-logging
spec:
serviceAccount: nfs-logging
containers:
- name: nfs-client-logging
image: quay.io/external_storage/nfs-client-provisioner:latest
volumeMounts:
- name: nfs-client-root
mountPath: /persistentvolumes
env:
- name: PROVISIONER_NAME
value: nfs-storage
- name: NFS_SERVER
value: 192.168.133.201
- name: NFS_PATH
value: /log
volumes:
- name: nfs-client-root
nfs:
server: 192.168.133.201
path: /log