How to deploy Kubernetes on Windows with Flannel + HostGW
- You have a Kubernetes Master that was successfully setup using Flannel with host-gateway as the network backend. This can be done using kubeadm, or our Kubernetes master from scratch instructions, for example.
- Kube-Proxy and Flannel DaemonSets are scheduled to only target Linux nodes. You can do this by applying this node-selector.
- You are using Windows Server, version 1709 or above.
A more detailed version of these instructions can be found here.
1. Install Docker
Install-Module -Name DockerMsftProvider -Repository PSGallery -Force Install-Package -Name Docker -ProviderName DockerMsftProvider Restart-Computer -Force
2. Create the Kubernetes for Windows directory
l2bridge directory into
3. Download the contents of
C:\k and do the following:
- Download Kubernetes Windows binaries (kubelet.exe, kubectl.exe, kube-proxy.exe) into
- See Kubernetes release notes for newest version
- Copy Kubeconfig file
/etc/kubernetes/admin.conffrom Kubernetes Master and save as
- Ensure the cluster CIDR (e.g. "10.244.0.0/16") is correct in:
4. Join the Kubernetes cluster:
.\start.ps1 -ManagementIP <Windows_Worker_Node_IP> -ClusterCIDR <ClusterCIDR> -ServiceCIDR <SvcCIDR> -KubeDnsServiceIP <KubeDNSIP>
ManagementIP: The IP address of the machine you are trying to join.
ClusterCIDR: The address range used by Kubernetes pods.
ServiceCIDR: The address range used by Kubernetes services.
KubeDnsServiceIP: The DNS service VIP used by kube-dns.
example Windows service (make sure container image matches host OS)5. Deploy an
Temp Binaries that will be removed soon
There are several pending PRs, because of which the bins are published here host-gw: add windows support
- flanned.exe -
- cni\flannel.exe -