Closed HugoRh closed 4 years ago
Hi,
I decided to try the Microsoft way: https://docs.microsoft.com/en-us/virtualization/windowscontainers/kubernetes/joining-windows-workers?tabs=ManagementIP
It's also interesting has it is less automation and more explanation.
As I said earlier I'm far from being good with Windows or Powershell :)
So, my issue happens because Get-NetIPAddress does not get all expected info, it does impact the creation of the HNSNetwork later ( which in turn prevent flanneld to be installed). All because my VM has multiple network interface (called Ethernet or "vEthernet (nat) , etc...).
Yet KubeClusterHelper.psm1 assumes $InterfaceName = "Ethernet" So for example below code fails:
function Get-InterfaceIpAddress()
{
Param (
[Parameter(Mandatory=$false)] [String] $InterfaceName = "Ethernet"
)
return (Get-NetIPAddress -InterfaceAlias "$InterfaceName" -AddressFamily IPv4).IPAddress
}
I propose to implement a parameter of the script or ask the user the question of which interface is to be used:
(Get-NetIPAddress).InterfaceAlias
Loopback Pseudo-Interface 1
vEthernet (Ethernet) 22
vEthernet (nat)
Loopback Pseudo-Interface 1
With the correct name, correct IP will be catched:
PS C:\Users\user> function Get-InterfaceIpAddress()
>> {
>> Param (
>> [Parameter(Mandatory=$false)] [String] $InterfaceName = "vEthernet (Ethernet) 22"
>> )
>> return (Get-NetIPAddress -InterfaceAlias "$InterfaceName" -AddressFamily IPv4).IPAddress
>> }
PS C:\Users\user> Get-InterfaceIpAddress
123.123.123.123
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale
As part of the move to the new kubeadm on Windows approach with 1.18 we are closing issues related to the previous alpha. /close
@benmoss: Closing this issue.
Hi,
I'm struggling with adding a windows node to my cluster. I'm following the procedure on https://kubernetes.io/docs/setup/production-environment/windows/user-guide-windows-nodes/
I'm running windows server 2019 (1809 build:17763.805) on a virtual machine , I plan on using vxlan ( and already patched my cluster accordingly).
Here's my Kubeclustervxlan.json
The install script does not seem to retrieve the needed info from the ethernet interface , but it does not prevent the install either :
Then the join part fails
The join fails to create the Kubelet service because it can get the ManagementIP adress.
I'm a bit confused by that part... which IP is it supposed to be? I'm do not see it in Get-NetIPAddress for interface Ethernet... I tried hard code the IP address of that interface but still got error ( I really suck at powershell and windows :( )
Any idea would be very welcome !! Thanks !!!