- You don't need WSL in 2019 VM, you need just to configure WinRM on the Hyper-V and add the IP in inventory\host, and WSL a mac or linux for launching the playbook
- Added Group Vars in Part 5, so you don't need to change multiple stuff
- I'm working on the project to add a way to change number of each type of Kubernetes nodes - WIP
You need a Windows Server 2019 VM with nested virtualization enabled at least 8 Go of Ram in the VM:
Setup Guide for Hyper V
On the 2019 VM host :
In WSL:
- Install the dependencies
- Clone the project
git clone https://github.com/EtienneDeneuve/kubernetes_hyperv/kubernetes_hyperv.git
- Update the credential for hyperv in
inventory/hosts.yml
- Launch the playbook in
main
:ansible-playbook -i inventory/hosts.yml main/playbook.yml
- SSH into the master node and start playing with your Kubernetes Cluster !
- Add Tests with Molecule
- Add Tests with Pester
- Add Tests for Packer image generation
- Configure CI/CD for test
- Add others distro for base os in Kubernetes
- Hardening and avoid snowflake
- Create box with Vagrant for Hyper V VM
For Windows 10
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Then for Windows 10 and Windows Server 2019
Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1604 -OutFile Ubuntu.zip -UseBasicParsing
Expand-Archive .\Ubuntu.zip c:\Distros\Ubuntu
Rename-Item c:\distros\ubuntu\ubuntu1804.exe c:\distros\ubuntu\ubuntu.exe
Launch this script :
ConfigureRemotingForAnsible
or use the one in misc folder : here
Launch the 04_configure.sh
script in misc\wsl_preparation
:
sudo .\04_configure.sh
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.