Azure / AKS-Edge

Welcome to the Azure Kubernetes Service (AKS) Edge repo.
MIT License
53 stars 34 forks source link

[Question] Failed to determine k3s control plane endpoint IP or port for Linux node type #168

Open ma-hua opened 6 months ago

ma-hua commented 6 months ago

Describe scenario Hi, I'm trying to deploy AKS EE in my laptop( Windows 10 Enterprise 19045.3803). I use New-AksEdgeDeployment -JsonConfigFilePath .\aksedge-config.json command in PowerShell 5.1 in the offline way. Everything seems to be going well, but when it comes to AksEdge - copying Kubeconfig into the host. step, it throw an exception: - Warning: Could not determine proper endpoint IP for the node's cluster - Failed to determine k3s control plane endpoint IP or port for Linux node type(s) (AksEdge.psm1: line 5735) I have posted the installation log and my aksedge-config.json

[01/11/2024 17:57:03] All required host features are installed

[01/11/2024 17:57:03] Attention - Azure Arc properties are specified. These will not be used. The cluster currently needs to be connected in a separate step after deployment via Connect-AksEdgeArc

[01/11/2024 17:57:03] Validating AksEdge network parameters...

[01/11/2024 17:57:03] *** 0 errors found in the deployment configuration.

[01/11/2024 17:57:16] Checking the required certificates for offline installation...

[01/11/2024 17:57:16] Verifying Host Requirements for Linux node(s)

[01/11/2024 17:57:16] Verifying Host OS can support requested configuration [01/11/2024 17:57:16] Verifying required storage, RAM and number of cores are available - Drive 'C:' has 213 GB free

[01/11/2024 17:57:17] AksEdge - deploying a new Linux single machine k3s cluster [01/11/2024 17:58:27] Creating single machine cluster hcs network - AksEdge - private network carved: Name : ip4PrefixLength Value : 24
Name : LinuxVmIp4Address Value : 192.168.0.2

Name : ServiceIPRangeStart Value : 192.168.0.4

Name : ip4GatewayAddress Value : 192.168.0.1

Name : ip4Subnet Value : 192.168.0.0

Name : WindowsVmIp4Address Value : 192.168.0.3

Name : ServiceIPRangeEnd Value : 192.168.0.4

[01/11/2024 17:58:28] Deploying AKS Edge Essentials - K3s

[01/11/2024 17:58:28] Step 1: Preparing host for AKS Edge Essentials - K3s

[01/11/2024 17:58:28] Enabling Microsoft Update. This will allow AKS Edge Essentials - K3s to receive updates.

[01/11/2024 17:58:28] Checking for virtual switch with name 'aksedgesw-int'

[01/11/2024 17:58:29] Associating wssdagent service with nodectl

[01/11/2024 17:59:03] Creating vnet (name: aksedgesw-int)

[01/11/2024 17:59:03] Deploying AKS Edge Essentials - K3s

[01/11/2024 17:59:03] Step 1: Skipped host preparation

[01/11/2024 17:59:03] Step 2: Verifying AKS Edge Essentials - K3s installation

[01/11/2024 17:59:03] Verifying installation

[01/11/2024 17:59:18] Step 3: Runtime configuration complete. Creating virtual machine

[01/11/2024 17:59:18] Extracting Linux VHD

[01/11/2024 17:59:24] Setting dynamically expanding virtual hard disk maximum size to 90.4 GB

[01/11/2024 17:59:52] Virtual machine created successfully.

[01/11/2024 18:00:04] Successfully created virtual machine

[01/11/2024 18:00:04] Virtual machine hostname: cnsl71t97g3-ledge

[01/11/2024 18:00:04] Testing SSH connection...

[01/11/2024 18:00:59] ...successfully connected to the Linux VM

[01/11/2024 18:00:59] Querying IP and MAC addresses from virtual machine (cnsl71t97g3-ledge)

[01/11/2024 18:01:00] Deployment successful

[01/11/2024 18:01:00] Initializing kubernetes runtime in Linux node.

**[01/11/2024 18:01:42] AksEdge - copying Kubeconfig into the host.

[01/11/2024 18:01:43] Exception Caught!!!

[01/11/2024 18:01:43] Exception Caught!!!

aksedge-config.json { "Arc": { "ClientId": null, "ClientSecret": null, "ClusterName": null, "Location": null, "ResourceGroupName": null, "SubscriptionId": null, "TenantId": null }, "DeploymentType": "SingleMachineCluster", "Init": { "ServiceIPRangeSize": 1 }, "Machines": [ { "LinuxNode": { "CpuCount": 8, "DataSizeInGB": 68, "MemoryInMB": 16384, "SecondaryNetworks": [ { "Ip4Address": null, "Ip4GatewayAddress": null, "Ip4PrefixLength": null, "VMSwitchName": null } ], "TimeoutSeconds": 300, "TpmPassthrough": false } } ], "Network": { "InternetDisabled": true, "Ip4AddressPrefix": "192.168.0.0/24", "NetworkPlugin": "flannel", "Proxy": { "Http": null, "Https": null, "No": "localhost,127.0.0.0/8,192.168.0.0/16,172.17.0.0/16,10.42.0.0/16,10.43.0.0/16,10.96.0.0/12,10.244.0.0/16,.svc" }, "SkipAddressFreeCheck": true, "SkipDnsCheck": false }, "SchemaVersion": "1.9", "User": { "AcceptEula": true, "AcceptOptionalTelemetry": true, "VolumeLicense": { "EnrollmentID": null, "PartNumber": null } }, "Version": "1.0" }

jinrongchi commented 2 months ago

Any solution on this one? I got the same issue which failed to copy the Kubeconfig, the cmd Get-AksEdgeKubeConfig returns the same error

[05/15/2024 09:29:30] AksEdge - copying Kubeconfig into the host.

 - Warning: Could not determine proper endpoint IP for the node's cluster

[05/15/2024 09:29:32] Exception Caught!!!

 - Failed to determine k3s control plane endpoint IP or port for Linux node type(s) (AksEdge.psm1: line 5829)

[05/15/2024 09:29:32] Exception Caught!!!

 - Failed to determine k3s control plane endpoint IP or port for Linux node type(s) (AksEdge.psm1: line 5829)
jinrongchi commented 2 months ago

Any solution on this one? I got the same issue which failed to copy the Kubeconfig, the cmd Get-AksEdgeKubeConfig returns the same error

[05/15/2024 09:29:30] AksEdge - copying Kubeconfig into the host.

 - Warning: Could not determine proper endpoint IP for the node's cluster

[05/15/2024 09:29:32] Exception Caught!!!

 - Failed to determine k3s control plane endpoint IP or port for Linux node type(s) (AksEdge.psm1: line 5829)

[05/15/2024 09:29:32] Exception Caught!!!

 - Failed to determine k3s control plane endpoint IP or port for Linux node type(s) (AksEdge.psm1: line 5829)

Seems like this issue only exists in k3s, when I switched to use k8s, I can config sucessfully.

see-dz commented 1 month ago

Is there any update to this? I am getting same error it happened after rebooting machine.

abhilashaagarwala commented 2 weeks ago

Quick update - Actively working on this, sincere apologies for the delay.

see-dz commented 2 weeks ago

I was able to find a fix/workaround.