All Projects → kubernetes-sigs → sig-windows-dev-tools

kubernetes-sigs / sig-windows-dev-tools

Licence: Apache-2.0 license
This is a batteries included local development environment for Kubernetes on Windows.

Programming Languages

powershell
5483 projects
shell
77523 projects
Makefile
30231 projects

Projects that are alternatives of or similar to sig-windows-dev-tools

Kubernetes Vagrant Centos Cluster
Setting up a distributed Kubernetes cluster along with Istio service mesh locally with Vagrant and VirtualBox, only PoC or Demo use.
Stars: ✭ 1,750 (+3265.38%)
Mutual labels:  vagrant, vagrantfile
build-inspector
Inspect your builds to look for changes in filesystem, network traffic and running processes.
Stars: ✭ 12 (-76.92%)
Mutual labels:  vagrant, vagrantfile
vagrant-ids
An Ubuntu 16.04 build containing Suricata, PulledPork, Bro, and Splunk
Stars: ✭ 21 (-59.62%)
Mutual labels:  vagrant, vagrantfile
kubernetes-cluster
Vagrant As Automation Script
Stars: ✭ 34 (-34.62%)
Mutual labels:  vagrant, vagrantfile
k8s0
Another minimal kubernetes with ansible
Stars: ✭ 23 (-55.77%)
Mutual labels:  vagrant, k8s
vagrant-r10k
UNSUPPORTED - SEEKING MAINTAINER - Vagrant middleware plugin to retrieve puppet modules using r10k.
Stars: ✭ 36 (-30.77%)
Mutual labels:  vagrant, vagrantfile
Detectionlab
Automate the creation of a lab environment complete with security tooling and logging best practices
Stars: ✭ 3,237 (+6125%)
Mutual labels:  vagrant, vagrantfile
kubeadm-vagrant
Setup Kubernetes Cluster with Kubeadm and Vagrant
Stars: ✭ 49 (-5.77%)
Mutual labels:  vagrant, vagrantfile
kubernetes the easy way
Automating Kubernetes the hard way with Vagrant and scripts
Stars: ✭ 22 (-57.69%)
Mutual labels:  vagrant, k8s
Book k8sInfra
< 컨테이너 인프라 환경 구축을 위한 쿠버네티스/도커 >
Stars: ✭ 176 (+238.46%)
Mutual labels:  vagrant, k8s
Vagrantfile
Vagrant 配置示例
Stars: ✭ 50 (-3.85%)
Mutual labels:  vagrant, vagrantfile
dockerX
Examples of amazing Docker/Docker-Compose/Docker Swarm technologies
Stars: ✭ 17 (-67.31%)
Mutual labels:  vagrant
charts
☸️ Helm Charts for YOURLS
Stars: ✭ 12 (-76.92%)
Mutual labels:  k8s
k8s-buildkite-plugin
Run any buildkite build step as a Kubernetes Job
Stars: ✭ 37 (-28.85%)
Mutual labels:  k8s
oracle-12.2-vagrant
Oracle Database 12.2.0.1 installation scripts based on latest Oracle Linux 7 Vagrant box
Stars: ✭ 26 (-50%)
Mutual labels:  vagrant
RunningLow
Free PowerShell script to to check for low disk space on local and network drives and send e-mail alerts when it goes under a user-defined quota.
Stars: ✭ 17 (-67.31%)
Mutual labels:  windows-server-2019
ansible-role-test-vms
DEPRECATED - A Vagrant configuration to test Ansible roles against a variety of Linux distributions.
Stars: ✭ 42 (-19.23%)
Mutual labels:  vagrant
tondra
Continuous Development on Kubernetes environments with Skaffold
Stars: ✭ 105 (+101.92%)
Mutual labels:  k8s
k8s-set-context
GitHub Action for setting context and retrieving Kubeconfig before deploying to Kubernetes clusters
Stars: ✭ 51 (-1.92%)
Mutual labels:  k8s
k3s-homeops-ansible
Bootstrap a k3s cluster on top of Ubuntu 20.04
Stars: ✭ 47 (-9.62%)
Mutual labels:  vagrant

Welcome to the SIG Windows Development Environment!

This is a fully batteries-included development environment for Windows on Kubernetes, including:

  • Vagrant file for launching a two-node cluster
  • the latest Containerd
  • Support for two CNIs: antrea, or calico on containerd: configure your CNI option in variables.yml
    • calico 3.19 on containerd runs containers out of the box
    • antrea 0.13.2 runs but requires running with a patch for antrea-io/antrea#2344 which was recently made available
  • NetworkPolicy support for Windows and Linux provided by Antrea and Calico
  • Windows binaries for kube-proxy.exe and kubelet.exe that are fully built from source (K8s main branch)
  • kubeadm installation that can put the bleeding-edge Linux control plane in place, so you can test new features like privileged containers

Quick start

  • clone this repo (obviously!)
  • install vagrant & virtualbox (the base tools for this project)
  • vagrant plugin install vagrant-reload winrm winrm-elevated, vagrant-reload needed to easily reboot windows VMs during setup of containers features.
  • make all, this will create the entire cluster for you and compile windows binaries from source
  • if the above failed, run vagrant provision winw1, just in case you have a flake during windows installation.
  • vagrant ssh controlplane and run kubectl get nodes to see your running dual-os linux+windows k8s cluster.

Goal

Our goal is to make Windows ridiculously easy to contribute to, play with, and learn about for anyone interested in using or contributing to the ongoing Kubernetes-on-Windows story. Windows is rapidly becoming an increasingly viable alternative to Linux thanks to the recent introduction of Windows HostProcess containers and Windows support for NetworkPolicies + Containerd integration.

Prerequisites

  • Vagrant
  • Vagrant vagrant-vbguest, reload, winrm and winrm-elevated plugins
  • some Vagrant provider (we only have VirtualBox automated here, but these recipes have been used with others, like HyperV and Fusion).

Lets run it!

Ok let's get started...

1) Pre-Flight checks...

For the happy path, just:

  1. Start Docker so that you can build K8s from source as needed.
  2. Install Vagrant, and then vagrant-reload
vagrant plugin install vagrant-reload winrm winrm-elevated vagrant-vbguest
  1. 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.

2) Run it!

There are two use cases for these Windows K8s dev environments: Quick testing, and testing K8s from source.

3) Testing from source? make all

To test from source, run vagrant destroy --force ; make all. This will

  • destroy your existing dev environment (destroying the existent one, and removing binaries folder)
  • clone down K8s from GitHub. If you have the k/k repo locally, you can make path=path_to_k/k all
  • compile the K8s proxy and kubelet (for linux and windows)
  • inject them into the Linux and Windows vagrant environment at the /usr/bin and C:/k/bin/ location
  • start up the Linux and Windows VMs

AND THAT'S IT! Your machines should come up in a few minutes...

NOTE: Do not run the middle Makefile targets, they depend of the sequence to give the full cluster experience.

IMPORTANT

Do not log into the VMs until the provisioning is done. That is especially true for Windows because it will prevent the reboots.

Other notes

If you still have an old instance of these VMs running for the same dir:

vagrant destroy -f && vagrant up

after everything is done (can take 10 min+), ssh' into the Linux VM:

vagrant ssh controlplane

and get an overview of the nodes:

kubectl get nodes

The Windows node might stay 'NotReady' for a while, because it takes some time to download the Flannel image.

vagrant@controlplane:~$ kubectl get nodes
NAME     STATUS     ROLES                  AGE    VERSION
controlplane    Ready      control-plane,controlplane   8m4s   v1.20.4
winw1           NotReady   <none>                       64s    v1.20.4

...

NAME     STATUS   ROLES                  AGE     VERSION
controlplane    Ready    control-plane,controlplane     16m     v1.20.4
winw1           Ready    <none>                         9m11s   v1.20.4

Accessing the Windows box

You'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:

vagrant ssh winw1
C:\ > powershell

Optionally, 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). To 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:

vagrant winrm winw1 --shell=powershell --command="ls"

IF you want to debug on the windows node, you can also run crictl:

.\crictl config --set runtime-endpoint=npipe:////./pipe/containerd-containerd

Where we derived these recipes from

Contributing

Working on Windows Kubernetes is a great way to learn about Kubernetes internals and how Kubernetes works in a multi-OS environment.

So, even if you aren't a Windows user, we encourage Kubernetes users of all types to try to get involved and contribute!

We are a new project and we need help with...

  • contributing / testing recipes on different Vagrant providers
  • docs of existing workflows
  • CSI support and testing
  • privileged container support
  • recipes with active directory
  • any other ideas!

If 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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].