Skip to content

Commit adf4c72

Browse files
authored
Merge pull request #534 from jeremyje/docs
Add instructions for developing NPD on Windows
2 parents ee5f2d1 + efe0254 commit adf4c72

File tree

1 file changed

+32
-1
lines changed

1 file changed

+32
-1
lines changed

README.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,37 @@ node-problem-detector --apiserver-override=http://APISERVER_IP:APISERVER_INSECUR
200200

201201
For more scenarios, see [here](https://github.com/kubernetes/heapster/blob/master/docs/source-configuration.md#kubernetes)
202202

203+
## Windows
204+
205+
Node Problem Detector has preliminary support Windows. Most of the functionality has not been tested but filelog plugin works.
206+
207+
Follow [Issue #461](https://github.com/kubernetes/node-problem-detector/issues/461) for development status of Windows support.
208+
209+
### Development
210+
211+
To develop NPD on Windows you'll need to setup your Windows machine for Go development. Install the following tools:
212+
213+
* [Git for Windows](https://git-scm.com/)
214+
* [Go](https://golang.org/)
215+
* [Visual Studio Code](https://code.visualstudio.com/)
216+
* [Make](http://gnuwin32.sourceforge.net/packages/make.htm)
217+
* [mingw-64 WinBuilds](http://mingw-w64.org/doku.php/download/win-builds)
218+
* Tested with x86-64 Windows Native mode.
219+
* Add the `$InstallDir\bin` to [Windows `PATH` variable](https://answers.microsoft.com/en-us/windows/forum/windows_10-other_settings-winpc/adding-path-variable/97300613-20cb-4d85-8d0e-cc9d3549ba23).
220+
221+
```powershell
222+
# Run these commands in the node-problem-detector directory.
223+
224+
# Build
225+
make clean windows-binaries
226+
227+
# Test
228+
make test
229+
230+
# Run with containerd log monitoring enabled. (Assumes containerd is installed.)
231+
%CD%\bin\windows_amd64\node-problem-detector.exe --logtostderr --enable-k8s-exporter=false --config.system-log-monitor=%CD%\config\windows-containerd-monitor-filelog.json
232+
```
233+
203234
## Try It Out
204235

205236
You can try node-problem-detector in a running cluster by injecting messages to the logs that node-problem-detector is watching. For example, Let's assume node-problem-detector is using [KernelMonitor](https://github.com/kubernetes/node-problem-detector/blob/master/config/kernel-monitor.json). On your workstation, run ```kubectl get events -w```. On the node, run ```sudo sh -c "echo 'kernel: BUG: unable to handle kernel NULL pointer dereference at TESTING' >> /dev/kmsg"```. Then you should see the ```KernelOops``` event.
@@ -284,4 +315,4 @@ See [NPD e2e test documentation](https://github.com/kubernetes/node-problem-dete
284315
* [Slides](https://docs.google.com/presentation/d/1bkJibjwWXy8YnB5fna6p-Ltiy-N5p01zUsA22wCNkXA/edit?usp=sharing)
285316
* [Plugin Interface Proposal](https://docs.google.com/document/d/1jK_5YloSYtboj-DtfjmYKxfNnUxCAvohLnsH5aGCAYQ/edit#)
286317
* [Addon Manifest](https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/node-problem-detector)
287-
* [Metrics Mode Proposal](https://docs.google.com/document/d/1SeaUz6kBavI283Dq8GBpoEUDrHA2a795xtw0OvjM568/edit)
318+
* [Metrics Mode Proposal](https://docs.google.com/document/d/1SeaUz6kBavI283Dq8GBpoEUDrHA2a795xtw0OvjM568/edit)

0 commit comments

Comments
 (0)