File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change @@ -127,6 +127,53 @@ spec:
127
127
hostPath :
128
128
path : /etc/localtime
129
129
` ` `
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
+
130
177
* Edit node-problem-detector.yaml to fit your environment: Set ` log` volume to your system log directory. (Used by SystemLogMonitor)
131
178
* Create the DaemonSet with `kubectl create -f node-problem-detector.yaml`
132
179
* If needed, you can use [ConfigMap](https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/)
You can’t perform that action at this time.
0 commit comments