From 6ca9f364acaf9bbe9bb050ee9228a46915abc321 Mon Sep 17 00:00:00 2001 From: Alin Balutoiu Date: Thu, 31 May 2018 22:24:57 +0200 Subject: [PATCH] Update documentation for Windows with new service feature (#8454) This commit adds details on how to create Windows services from kubelet and kube-proxy. Signed-off-by: Alin Balutoiu --- .../getting-started-guides/windows/_index.md | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/content/en/docs/getting-started-guides/windows/_index.md b/content/en/docs/getting-started-guides/windows/_index.md index 0799cce3ad..b09f5ae90f 100644 --- a/content/en/docs/getting-started-guides/windows/_index.md +++ b/content/en/docs/getting-started-guides/windows/_index.md @@ -496,6 +496,40 @@ spec: - containerPort: 80 ``` +### Kubelet and kube-proxy can now run as Windows services + +Starting with kubernetes v1.11, kubelet and kube-proxy can run as Windows services. + +This means that you can now register them as Windows services via `sc` command. More details about how to create Windows services with `sc` can be found [here](https://support.microsoft.com/en-us/help/251192/how-to-create-a-windows-service-by-using-sc-exe). + +**Examples:** + +To create the service: +``` +PS > sc.exe create binPath= " --service " +CMD > sc create binPath= " --service " +``` +Please note that if the arguments contain spaces, it must be escaped. Example: +``` +PS > sc.exe create kubelet binPath= "C:\kubelet.exe --service --hostname-override 'minion' " +CMD > sc create kubelet binPath= "C:\kubelet.exe --service --hostname-override 'minion' " +``` +To start the service: +``` +PS > Start-Service kubelet; Start-Service kube-proxy +CMD > net start kubelet && net start kube-proxy +``` +To stop the service: +``` +PS > Stop-Service kubelet (-Force); Stop-Service kube-proxy (-Force) +CMD > net stop kubelet && net stop kube-proxy +``` +To query the service: +``` +PS > Get-Service kubelet; Get-Service kube-proxy; +CMD > sc.exe queryex kubelet && sc qc kubelet && sc.exe queryex kube-proxy && sc.exe qc kube-proxy +``` + ## Known Limitations for Windows Server Containers with v1.9 Some of these limitations will be addressed by the community in future releases of Kubernetes: