kubernetes-sigs / sig-windows-tools

Repository for tools and artifacts related to the sig-windows charter in Kubernetes. Scripts to assist kubeadm and wincat and flannel will be hosted here.
Apache License 2.0
124 stars 123 forks source link

Hyper-V Windows features still necessary? #296

Closed Mik4sa closed 1 year ago

Mik4sa commented 1 year ago

Is your feature request related to a problem? Please describe. Yesterday I wanted to create a new cluster for testing purposes on some new VPS I bought. The Linux part went straightforward without any errors and all ports were starting successfully. On the other hand I got an error while installing the required windows feature "Hyper-V" (from Install-Containerd.ps1 script) on my windows node. It said that my machine/CPU doesn't support that. Since this isn't my machine I couldn't fix that. Also I was always wondering why Hyper-V was necessary to install a container runtime. So I simply removed the "Hyper-V" and "Hyper-V-PowerShell" features from Install-Containerd.ps1 and tried it anyway. And it works (so far). The flannel pods are running successfully on my windows machine. Additionally I deployed the webserver described here https://kubernetes.io/docs/concepts/windows/user-guide/#getting-started-deploying-a-windows-container and even that is working. I could even reach the pod from outside (via node port).

Describe the solution you'd like Remove the windows features "Hyper-V" and "Hyper-V-PowerShell" from the Install-Containerd.ps1 script, so that they're not installed and no virtualization features are necessary.

Describe alternatives you've considered None.

Additional context None.

jsturtevant commented 1 year ago

There is a long thread on this topic at: https://kubernetes.slack.com/archives/C0SJ4AFB7/p1607619445072100

To summarize:

Given all that, I don't think we want to remove it completely but could make it configurable.

Mik4sa commented 1 year ago

Ah that's interesting to know. Thanks :) I think the documentation should atleast mention this so that those machines can use Kubernetes anyway

claudiubelu commented 1 year ago

Agreed, the documentation should mention this and I think Install-Containerd.ps1 should skip that step + display a WARNING if virtualization is not enabled. This would be helpful if people are trying Windows K8s nodes in a Public Cloud, where VMs with virtualization enabled costs more. It will make it more accessible.