Skip to content

Commit

Permalink
[fix] cannot patch resource "nodes/status" in API group
Browse files Browse the repository at this point in the history
  • Loading branch information
double12gzh committed May 15, 2023
1 parent 9fd58e3 commit 7fc7947
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,13 @@ Alternatively, to install node-problem-detector manually:

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

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

3. Create the DaemonSet with `kubectl create -f node-problem-detector.yaml`.
4. Create the ServiceAccount and ClusterRoleBinding with `kubectl create -f rbac.yaml`.

4. Create the ConfigMap with `kubectl create -f node-problem-detector-config.yaml`.

5. Create the DaemonSet with `kubectl create -f node-problem-detector.yaml`.

## Start Standalone

Expand Down
1 change: 1 addition & 0 deletions deployment/node-problem-detector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ spec:
- name: config
mountPath: /config
readOnly: true
serviceAccountName: node-problem-detector
volumes:
- name: log
# Config `log` to your system log directory
Expand Down
19 changes: 19 additions & 0 deletions deployment/rbac.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: node-problem-detector
namespace: kube-system

---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: npd-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: system:node-problem-detector
subjects:
- kind: ServiceAccount
name: node-problem-detector
namespace: kube-system

0 comments on commit 7fc7947

Please sign in to comment.