Skip to content

Commit d4aeca0

Browse files
authored
Merge pull request #755 from double12gzh/master
[fix] cannot patch resource "nodes/status" in API group
2 parents b610240 + 7fc7947 commit d4aeca0

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,13 @@ Alternatively, to install node-problem-detector manually:
179179

180180
2. Edit [node-problem-detector-config.yaml](deployment/node-problem-detector-config.yaml) to configure node-problem-detector.
181181

182-
3. Create the ConfigMap with `kubectl create -f node-problem-detector-config.yaml`.
182+
3. Edit [rbac.yaml](deployment/rbac.yaml) to fit your environment.
183183

184-
3. Create the DaemonSet with `kubectl create -f node-problem-detector.yaml`.
184+
4. Create the ServiceAccount and ClusterRoleBinding with `kubectl create -f rbac.yaml`.
185+
186+
4. Create the ConfigMap with `kubectl create -f node-problem-detector-config.yaml`.
187+
188+
5. Create the DaemonSet with `kubectl create -f node-problem-detector.yaml`.
185189

186190
## Start Standalone
187191

deployment/node-problem-detector.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ spec:
6060
- name: config
6161
mountPath: /config
6262
readOnly: true
63+
serviceAccountName: node-problem-detector
6364
volumes:
6465
- name: log
6566
# Config `log` to your system log directory

deployment/rbac.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
apiVersion: v1
2+
kind: ServiceAccount
3+
metadata:
4+
name: node-problem-detector
5+
namespace: kube-system
6+
7+
---
8+
apiVersion: rbac.authorization.k8s.io/v1
9+
kind: ClusterRoleBinding
10+
metadata:
11+
name: npd-binding
12+
roleRef:
13+
apiGroup: rbac.authorization.k8s.io
14+
kind: ClusterRole
15+
name: system:node-problem-detector
16+
subjects:
17+
- kind: ServiceAccount
18+
name: node-problem-detector
19+
namespace: kube-system

0 commit comments

Comments
 (0)