Skip to content

Commit 7abeee9

Browse files
authored
Merge pull request #164 from jsenon/patch-1
Update Readme
2 parents 02358e6 + a84a937 commit 7abeee9

File tree

3 files changed

+58
-37
lines changed

3 files changed

+58
-37
lines changed

README.md

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -91,43 +91,7 @@ Run `make` in the top directory. It will:
9191
to another registry.
9292

9393
## Start DaemonSet
94-
* Create a file node-problem-detector.yaml with the following yaml.
95-
```yaml
96-
apiVersion: extensions/v1beta1
97-
kind: DaemonSet
98-
metadata:
99-
name: node-problem-detector
100-
spec:
101-
template:
102-
spec:
103-
containers:
104-
- name: node-problem-detector
105-
image: k8s.gcr.io/node-problem-detector:v0.2
106-
imagePullPolicy: Always
107-
securityContext:
108-
privileged: true
109-
env:
110-
- name: NODE_NAME
111-
valueFrom:
112-
fieldRef:
113-
fieldPath: spec.nodeName
114-
volumeMounts:
115-
- name: log
116-
mountPath: /log
117-
readOnly: true
118-
- name: localtime
119-
mountPath: /etc/localtime
120-
readOnly: true
121-
volumes:
122-
- name: log
123-
# Config `log` to your system log directory
124-
hostPath:
125-
path: /var/log/
126-
- name: localtime
127-
hostPath:
128-
path: /etc/localtime
129-
```
130-
* Edit node-problem-detector.yaml to fit your environment: Set `log` volume to your system log directory. (Used by SystemLogMonitor)
94+
* Edit [node-problem-detector.yaml](https://github.com/kubernetes/node-problem-detector/blob/master/deployment/node-problem-detector.yaml) to fit your environment: Set `log` volume to your system log directory. (Used by SystemLogMonitor). For **kubernetes <1.9** use [node-problem-detector-old.yaml](https://github.com/kubernetes/node-problem-detector/blob/master/deployment/node-problem-detector-old.yaml)
13195
* Create the DaemonSet with `kubectl create -f node-problem-detector.yaml`
13296
* If needed, you can use [ConfigMap](https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/)
13397
to overwrite the `config/`.

deployment/node-problem-detector.yaml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
apiVersion: apps/v1
2+
kind: DaemonSet
3+
metadata:
4+
name: node-problem-detector
5+
spec:
6+
selector:
7+
matchLabels:
8+
name: node-problem-detector
9+
template:
10+
metadata:
11+
labels:
12+
app: node-problem-detector
13+
spec:
14+
containers:
15+
- name: node-problem-detector
16+
command:
17+
- /node-problem-detector
18+
- --logtostderr
19+
- --kernel-monitor=/config/kernel-monitor.json
20+
image: k8s.gcr.io/node-problem-detector:v0.2
21+
imagePullPolicy: Always
22+
securityContext:
23+
privileged: true
24+
env:
25+
- name: NODE_NAME
26+
valueFrom:
27+
fieldRef:
28+
fieldPath: spec.nodeName
29+
volumeMounts:
30+
- name: log
31+
mountPath: /var/log
32+
readOnly: true
33+
- name: kmsg
34+
mountPath: /dev/kmsg
35+
readOnly: true
36+
# Make sure node problem detector is in the same timezone
37+
# with the host.
38+
- name: localtime
39+
mountPath: /etc/localtime
40+
readOnly: true
41+
- name: config
42+
mountPath: /config
43+
readOnly: true
44+
volumes:
45+
- name: log
46+
# Config `log` to your system log directory
47+
hostPath:
48+
path: /var/log/
49+
- name: kmsg
50+
hostPath:
51+
path: /dev/kmsg
52+
- name: localtime
53+
hostPath:
54+
path: /etc/localtime
55+
- name: config
56+
configMap:
57+
name: node-problem-detector-config

0 commit comments

Comments
 (0)