{"id":13697563,"url":"https://github.com/kubernetes-sigs/sig-windows-dev-tools","last_synced_at":"2025-10-27T08:45:25.953Z","repository":{"id":38381539,"uuid":"350096177","full_name":"kubernetes-sigs/sig-windows-dev-tools","owner":"kubernetes-sigs","description":"This is a batteries included local development environment for Kubernetes on Windows.","archived":false,"fork":false,"pushed_at":"2024-05-11T00:33:13.000Z","size":92798,"stargazers_count":81,"open_issues_count":6,"forks_count":46,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-21T06:55:27.239Z","etag":null,"topics":["k8s","k8s-sig-windows","kubernetes","linux","vagrant","vagrantfile","windows","windows-server-2019"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kubernetes-sigs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"code-of-conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-21T19:19:27.000Z","updated_at":"2024-12-27T09:18:42.000Z","dependencies_parsed_at":"2024-01-05T22:29:27.608Z","dependency_job_id":"e999159c-e684-46cb-ae14-f1c7203d5182","html_url":"https://github.com/kubernetes-sigs/sig-windows-dev-tools","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubernetes-sigs%2Fsig-windows-dev-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubernetes-sigs%2Fsig-windows-dev-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubernetes-sigs%2Fsig-windows-dev-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubernetes-sigs%2Fsig-windows-dev-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kubernetes-sigs","download_url":"https://codeload.github.com/kubernetes-sigs/sig-windows-dev-tools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252252491,"owners_count":21718749,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["k8s","k8s-sig-windows","kubernetes","linux","vagrant","vagrantfile","windows","windows-server-2019"],"created_at":"2024-08-02T18:01:00.210Z","updated_at":"2025-10-27T08:45:25.888Z","avatar_url":"https://github.com/kubernetes-sigs.png","language":"Go","funding_links":[],"categories":["Testing"],"sub_categories":[],"readme":"# Welcome to the SIG Windows Development Environment!\n\nThis is a fully batteries-included development environment for Windows on Kubernetes, including:\n- Vagrant file for launching a two-node cluster\n- containerd 1.6.15\n- Support for two CNIs: antrea, or calico on containerd:  configure your CNI option in variables.yml\n  - Calico 3.25.0 on containerd runs containers out of the box\n  - Antrea 0.13.2 runs but requires running with a patch for https://github.com/antrea-io/antrea/issues/2344 which was recently made available\n- NetworkPolicy support for Windows and Linux provided by [Antrea](https://antrea.io) and [Calico](https://www.tigera.io/project-calico/)\n- Windows binaries for kube-proxy.exe and kubelet.exe that are either built from source (K8s main branch) or releases\n- Kubeadm installation that can put the latest Linux control plane in place\n\n## Quick Start\n\n### Prerequisites \n- Linux host - [Fedora 38](#fedora). \n  - Experimental support for Windows host with WSL as environment providing `make`, see [Windows with WSL](#windows-with-wsl-experimental).\n- [make](https://www.gnu.org/software/make/)\n- [Vagrant](https://www.vagrantup.com/downloads)\n- [VirtualBox](https://www.virtualbox.org/wiki/Downloads) (we only have VirtualBox automated here, but these recipes have been used with others, like Microsoft HyperV and VMware Fusion).\n- [Kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl)\n\n### Getting a cluster up and running\n\nSimple steps to a Windows Kubernetes cluster, from scratch, built from source...\n\n- `vagrant plugin install vagrant-reload vagrant-vbguest winrm winrm-elevated`, vagrant-reload needed to easily reboot windows VMs during setup of containers features.\n- `make all`, this will create the entire cluster for you.  To compile k/k/ from local source, see instructions later in this doc. \n\t- *If the above failed, run `vagrant provision winw1`, just in case you have a flake during windows installation.*\n- `vagrant ssh controlplane` and run `kubectl get nodes` to see your running dual-os linux+windows k8s cluster.\n\n## Windows with WSL (experimental)\n\nAll the above Quick Start steps apply, except you have to run the `Makefile` targets in WSL\n- using `vagrant.exe` on the host\n- while inside clone of this repo on Windows filesystem, not WSL filesystem.\n\nFirst, get the path for your `vagrant.exe` on the host use `Get-Command vagrant` in PowerShell like the following example.\n\n```powershell\n~ \u003e $(get-command vagrant).Source.Replace(\"\\\",\"/\").Replace(\"C:/\", \"/mnt/c/\")\n/mnt/c/HashiCorp/Vagrant/bin/vagrant.exe\n```\n\nNext, pass the mount path to the executable on the Windows host with the `VAGRANT` environment variable exported in WSL.\n\nThen, ensure you clone this repository onto filesystem inside `/mnt` and not the WSL filesystem, in order to avoid failures similar to this one:\n\n```\nThe host path of the shared folder is not supported from WSL.\nHost path of the shared folder must be located on a file system with\nDrvFs type. Host path: ./sync/shared\n```\n\nFinally, steps to a Windows Kubernetes cluster on Windows host in WSL is turn into the following sequence:\n\n```bash\nexport VAGRANT=/mnt/c/HashiCorp/Vagrant/bin/vagrant.exe\ncd /mnt/c/Users/joe\ngit clone https://github.com/kubernetes-sigs/sig-windows-dev-tools.git\nmake all\n# ...\nmake clean\n```\n\n## Fedora\n\nFollow the steps presented below to prepare the Linux host environment and create the two-node cluster:\n\n**1.** Install essential tools for build and vagrant/virtualbox packages.\n\n*Example*:\n\n[Adding](https://developer.hashicorp.com/vagrant/downloads?product_intent=vagrant)\n hashicorp repo for most recent vagrant bits:\n```\nsudo dnf install -y dnf-plugins-core\nsudo dnf config-manager --add-repo https://rpm.releases.hashicorp.com/fedora/hashicorp.repo\nsudo dnf -y install vagrant\n```\n\nInstalling packages:\n```\nsudo dnf install -y vagrant VirtualBox\nsudo vagrant plugin install vagrant-reload vagrant-vbguest winrm winrm-elevated vagrant-ssh\n```\n\n**2.** Create `/etc/vbox/networks.conf` to set the [network bits](https://www.virtualbox.org/manual/ch06.html#network_hostonly):\n\n*Example*:\n```\nsudo mkdir /etc/vbox\nsudo vi /etc/vbox/networks.conf\n\n* 10.0.0.0/8 192.168.0.0/16\n* 2001::/64\n```\n\n**3.** Clone the repo and build\n\nIf you are building Kubernetes components from source, please follow the\n[development guide](https://github.com/kubernetes/community/blob/master/contributors/devel/development.md).\n\n```\ngit clone https://github.com/kubernetes-sigs/sig-windows-dev-tools.git\ncd sig-windows-dev-tools\ntouch tools/sync/shared/kubejoin.ps1\nmake all\n```\n\n**4.** ssh to the virtual machines\n\n- Control Plane node (Linux):\n```\nvagrant ssh controlplane\nkubectl get pods -A\n```\n\n- Windows node:\n```\nvagrant ssh winw1\n```\n\n# Goal\n\nOur goal is to make Windows ridiculously easy to contribute to, play with, and learn about for anyone interested\nin using or contributing to the ongoing Kubernetes-on-Windows story. Windows is rapidly becoming an increasingly\nviable alternative to Linux thanks to the recent introduction of Windows HostProcess containers and Windows support for NetworkPolicies + Containerd integration.\n\n\n\n# Lets run it!\n\nOk let's get started... \n\n## 1) Pre-Flight checks...\n\nFor the happy path, just:\n\n0) Start Docker so that you can build K8s from source as needed.\n1) Install Vagrant, and then vagrant-reload\n```\nvagrant plugin install vagrant-reload vagrant-vbguest winrm winrm-elevated \n```\n2) Modify CPU/memory in the variables.yml file. We recommend four cores 8G+ for your Windows node if you can spare it, and two cores 8G for your Linux node as well. \n \n## 2) Run it!\n\nThere are two use cases for these Windows K8s dev environments: Quick testing, and testing K8s from source.\n\n## 3) Testing from source? `make all`\n\nTo test from source, run `vagrant destroy --force ; make all`.  This will\n\n- destroy your existing dev environment (destroying the existent one, and removing binaries folder)\n- clone down K8s from GitHub. If you have the k/k repo locally, you can `make path=path_to_k/k all` \n- compile the K8s proxy and kubelet (for linux and windows)\n- inject them into the Linux and Windows vagrant environment at the /usr/bin and C:/k/bin/ location \n- start up the Linux and Windows VMs\n\nAND THAT'S IT! Your machines should come up in a few minutes...\n\nNOTE: Do not run the middle Makefile targets, they depend of the sequence to give the full cluster experience.\n\n## IMPORTANT\nDo not log into the VMs until the provisioning is done. That is especially true for Windows because it will prevent the reboots.\n\n## Other notes \n\nIf you still have an old instance of these VMs running for the same dir:\n```\nvagrant destroy -f \u0026\u0026 vagrant up\n```\nafter everything is done (can take 10 min+), ssh' into the Linux VM:\n```\nvagrant ssh controlplane\n```\nand get an overview of the nodes:\n```\nkubectl get nodes\n```\nThe Windows node might stay 'NotReady' for a while, because it takes some time to download the Flannel image.\n```\nvagrant@controlplane:~$ kubectl get nodes\nNAME     STATUS     ROLES                  AGE    VERSION\ncontrolplane    Ready      control-plane,controlplane   8m4s   v1.20.4\nwinw1           NotReady   \u003cnone\u003e                       64s    v1.20.4\n```\n...\n```\nNAME     STATUS   ROLES                  AGE     VERSION\ncontrolplane    Ready    control-plane,controlplane     16m     v1.20.4\nwinw1           Ready    \u003cnone\u003e                         9m11s   v1.20.4\n```\n\n## Accessing the Windows box\n\nYou'll obviously want to run commands on the Windows box. The easiest way is to SSH into the Windows machine and use powershell from there:\n\n```\nvagrant ssh winw1\nC:\\ \u003e powershell\n```\n\nOptionally, you can do this by noting the IP address during `vagrant provision` and running *any* RDP client (vagrant/vagrant for username/password, works for SSH).\nTo run a *command* on the Windows boxes without actually using the UI, you can use `winrm`, which is integrated into Vagrant. For example, you can run:\n\n```\nvagrant winrm winw1 --shell=powershell --command=\"ls\"\n```\n\nIF you want to debug on the windows node, you can also run crictl:\n\n```\n.\\crictl config --set runtime-endpoint=npipe:////./pipe/containerd-containerd\n```\n\n## Where we derived these recipes from \n\n- This guide is based on [this very nice Vagrantfile](https://gist.github.com/danielepolencic/ef4ddb763fd9a18bf2f1eaaa2e337544)\n- this very good [guide on how to install Kubernetes on Ubuntu Focal (20.04)](https://github.com/mialeevs/kubernetes_installation). \n- The Windows part is informed by this [guide on how to install Docker on Win Server 2019](https://www.hostafrica.co.za/blog/new-technologies/how-to-install-docker-on-linux-and-windows/#win), [this guide on adding Windows nodes](https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/adding-windows-nodes/), and [this guide](https://www.hostafrica.co.za/blog/new-technologies/install-kubernetes-cluster-windows-server-worker-nodes/) on how to install Kubernetes on Win Server 2019.\n- We've also borrowed ideas from cluster api, kubeadm, and the antrea project too bootstrap how we manage CNI and containerd support.\n\n# Contributing\n\nWorking on Windows Kubernetes is a great way to learn about Kubernetes internals and how Kubernetes works in a multi-OS environment.  \n\nSo, even if you aren't a Windows user, we encourage Kubernetes users of all types to try to get involved and contribute!\n\nWe are a new project and we need help with... \n\n- contributing / testing recipes on different Vagrant providers\n- docs of existing workflows\n- CSI support and testing\n- privileged container support\n- recipes with active directory\n- any other ideas!\n\nIf nothing else, filing an issue with your bugs or experiences will be helpful long-term. If interested in pairing with us to do your first contribution, just reach out in #sig-windows (https://slack.k8s.io/). We understand that developing on Kubernetes with Windows is new to many folks, and we're here to help you get started.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkubernetes-sigs%2Fsig-windows-dev-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkubernetes-sigs%2Fsig-windows-dev-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkubernetes-sigs%2Fsig-windows-dev-tools/lists"}