Skip to content

Commit d9c68c1

Browse files
authored
Update Readme
Update yaml file with new daemonset definition introduce by kubernetes 1.9
1 parent eda20e8 commit d9c68c1

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,53 @@ spec:
127127
hostPath:
128128
path: /etc/localtime
129129
```
130+
131+
For Kubernetes >= 1.9 you need to add selector tag as bellow:
132+
133+
```yaml
134+
apiVersion: extensions/v1beta1
135+
kind: DaemonSet
136+
metadata:
137+
name: node-problem-detector
138+
spec:
139+
selector:
140+
matchLabels:
141+
name: node-problem-detector
142+
template:
143+
metadata:
144+
labels:
145+
name: node-problem-detector
146+
template:
147+
spec:
148+
containers:
149+
- name: node-problem-detector
150+
image: k8s.gcr.io/node-problem-detector:v0.2
151+
imagePullPolicy: Always
152+
securityContext:
153+
privileged: true
154+
env:
155+
- name: NODE_NAME
156+
valueFrom:
157+
fieldRef:
158+
fieldPath: spec.nodeName
159+
volumeMounts:
160+
- name: log
161+
mountPath: /log
162+
readOnly: true
163+
- name: localtime
164+
mountPath: /etc/localtime
165+
readOnly: true
166+
volumes:
167+
- name: log
168+
# Config `log` to your system log directory
169+
hostPath:
170+
path: /var/log/
171+
- name: localtime
172+
hostPath:
173+
path: /etc/localtime
174+
```
175+
176+
130177
* Edit node-problem-detector.yaml to fit your environment: Set `log` volume to your system log directory. (Used by SystemLogMonitor)
131178
* Create the DaemonSet with `kubectl create -f node-problem-detector.yaml`
132179
* If needed, you can use [ConfigMap](https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/)

0 commit comments

Comments
 (0)