-
Notifications
You must be signed in to change notification settings - Fork 759
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows container support? #1300
Comments
Joining non microk8s nodes to a microk8s cluster you mean? |
Yes, non-microk8s nodes (plain windows worker nodes) to microk8s clusters running on WSL2. |
From what i can tell, not possible. |
Hi @biiiipy, to get the Linux workers (i.e. MicroK8s) on Windows, we recommend using the Windows installer found here: https://microk8s.io/docs/install-alternatives#heading--windows. Getting the Windows workers running would be a different challenge, but (I think), if you could get MicroK8s running with the installer, you could enroll manually installed Windows Kubelets; in theory at least. There is no precedence for this, but I'd be interested if you get it working. |
I've already deployed a native kubernetes cluster working with both linux and windows nodes, but its a real pain, lots of configuration and a huge mess with the windows nodes having to proxy the traffic via the linux nodes. I recently discovered microk8s and really enjoyed installing a PoC cluster with it, its stable, fast and easy to use. But having windows containers running in the same k8s cluster is, unfortunately, also a need in the project. From the microk8s side, we have no access to the kubeadm so we can't do @joedborg how would you enroll a Edit 16/10/2020 11:31: I found that we can get the certificate from microk8s with |
Hi @organom, all certs are in Are you following any guide/doc I could look at? How do you install the windows node? |
@organom great to see someone else in similar situation :) |
@biiiipy yes, that is my understanding of it also. On a native kubernetes, you setup the master, Linux nodes and then the windows nodes. Linux nodes are still mandatory because the windows machines use them to proxy the traffic. @ktsakalozos I followed the native kubernetes installation guide https://kubernetes.io/docs/setup/production-environment/windows/intro-windows-in-kubernetes/ and https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/adding-windows-nodes/ . As a first step I would be happy to at least be able to join the native windows node into a microk8s cluster, but the token difference ( |
+1 for this. We have legacy .NET Framework containers which can only be run on a native Windows worker, so it would be very helpful to be able to easily spin up such a worker using microk8s! |
We've just finished the documentation for this: https://discuss.kubernetes.io/t/add-a-windows-worker-node-to-microk8s/13782 |
@joedborg The document looks awesome, but it misses (I believe) the part of the joining the windows node to the microk8s node. How do you do it? Thanks for the help |
@organom When you start the kubelet service (towards the end), it connects by reading the kubeconfig file you wrote to the Windows node. |
@joedborg I see, didn't knew kubelet would accept it like that :) I will give it a try next week. |
@organom yeah, the kubeconfig contains all you need to reach and authenticate with the control plane. No problem, I'll close this issue. Please feel free to open a new one if you come across anything specific to the documentation. |
Just a fast update from my side. Worked like a charm. Thank you again for making the tutorial available |
Trying to work out if this can be done entirely from a Windows 10 (pro/ent) host. microk8s on WSL2 (ubuntu)
How are other people configuring this? |
There are 2 important concepts to separate here:
MicroK8s will run in windows correctly, having the linux node installed and running by default (https://microk8s.io/docs/install-alternatives). If the intention is to use Windows nodes (in order to run windows pods inside) (https://kubernetes.io/docs/setup/production-environment/windows/intro-windows-in-kubernetes/) then you need to use Windows Server 2019. Microk8s doesn't run windows nodes, but does accept windows nodes to be joined to an already existing microK8s cluster. So, answering your question, you can have microk8s installed in the win10 host directly (running the linux node it automatically starts with), and then connect to a VM (hyper-v, virtualbox, vmware player, etc), install there Windows server 2019 and the node side of https://discuss.kubernetes.io/t/add-a-windows-worker-node-to-microk8s/13782 and join it to the cluster. In my particular case, I use a 5 VMs setup inside virtualbox with 3 linux (for testing high availability) and 2 Windows Server 2019, this way i can easily pause the whole cluster and get back to it when needed. Hope it helps :) |
Thank you very much for such a detailed explanation. I'm definitely focusing on the Windows nodes side of things and given similarities between Windows 10 and Server 2019, I wondered if enough of the components were available to bend that requirement somewhat. Thanks again! |
Has anyone ever seen this error while rolling out a deployment that uses Windows containers?
I searched all over and finally found this section from the Calico docs. I essentially ended up having to do:
and then:
|
After some more investigation, I think I found the likely cause of the issue. Either it was:
Regardless, I think the documentation makes it implicit that Docker EE is required thanks to this link. |
@joedborg follow the whole step, but can't join the cluster. |
@organom I have install microk8s cluster successfully on window hyper-V and now want to add window node into microk8s cluster which have by default linux master node. But how can I move config file from linux node to window node using terminal? |
@hassanshamshir You first need to guarantee that both machines can reach each other, if they can't then no point on trying to make k8s work because it'll not. Then try to read/understand Hyper-V networking and virtual switches. Should be easy to make 2 VMs communicate to each other. VM to host communication could be more tricky to archive. |
@organom can you have an experience of creating cluster using VirtualBox? |
@organom I have created a window VM which have window server2019. |
@organom When I run ping google.com from both machine then they ping it fine. |
I have successfully added window node into my microk&8 cluster using hyper-V in window. |
@biiiipy @organom Now I have defined all the steps. 3: Create a second VM in window hyper-V Manager with OS window server 2019 and install docker inside it. 4: Install components on the Windows node You are now ready to install Calico on Windows VM. This will also install Kubernetes components required for a working node. 5: Create directory for Kubernetes mkdir C:\k First, download the script. Invoke-WebRequest https://docs.projectcalico.org/scripts/install-calico-windows.ps1 -OutFile C:\install-calico-windows.ps1 Register the Calico services. C:\CalicoWindows\install-calico.ps1 7:Verify that the Calico services are running. Get-Service -Name CalicoNode 8: start kubelet/kube-proxy service. Execute following PowerShell commands. 9:Verify kubelet/kube-proxy services are running. Get-Service -Name kubelet Congratulations! You now have a Kubernetes cluster with Calico for Windows and a Linux control node. Recommended Links |
@hassanshamshir thanks for this, excellent work! |
@hassanshamshir Thanks for the steps described, however using the microk8s 1.26 version the kubelet is constantly restarting on the Windows side. calico-node.log 2023-01-31 04:33:18.117 [INFO][9048] startup/startup.go 427: Early log level set to info Note: With version 1.19 everything worked. I need to test other versions. |
Is it possible to add Windows worker nodes to microk8s cluster? Haven't seen this topology mentioned anywhere.
So basically:
microk8s clusters in WSL2 and plain windows worker nodes with windows containers (without running the microk8s on the windows worker nodes, which would be linux containers).
The text was updated successfully, but these errors were encountered: