Azure / Azure/azure-cli

Azure connected clusters fails, unable to connect cluster to Azure via arc as part of IoT Ops setup

Open
#30,943 5 comments 0 reactions 0 assignees View on GitHub
act-codegen-extensibility-squad Auto-Assign bug Configure Connected Kubernetes customer-reported Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### Describe the bug

Attempting to connect a cluster via connectedk8s as part of the Azure IoT Ops suite I'm getting stuck when connecting my local k3s cluster to Azure Arc.

### Related command

```
az connectedk8s connect -g -n -l westeurope --subscription --tags System.Object[] --disable-auto-upgrade --enable-oidc-issuer --enable-workload-identity
```

Same error with:
```
az connectedk8s connect -g -n -l westeurope --subscription --tags System.Object[] --disable-auto-upgrade
```

### Errors

``` Preview version of extension is disabled by default for extension installation, enabled for modules without stable versions. Please run 'az config set extension.dynamic_install_allow_preview=true or false' to config it specifically. The command requires the extension connectedk8s. Do you want to install it now? The command will continue to run after the extension is installed. (Y/n): y Run 'az config set extension.use_dynamic_install=yes_without_prompt' to allow installing extensions without prompt. Argument '--enable-oidc-issuer' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus Argument '--enable-workload-identity' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus This operation might take a while... Step: 2025-03-04T12-26-37Z: Validating custom access token Step: 2025-03-04T12-26-37Z: Checking Provider Registrations Step: 2025-03-04T12-26-37Z: Setting KubeConfig Step: 2025-03-04T12-26-37Z: Escape Proxy Settings, if passed in Step: 2025-03-04T12-26-37Z: Checking Connectivity to Cluster Step: 2025-03-04T12-26-37Z: Do node validations Step: 2025-03-04T12-26-37Z: Install Kubectl client if it does not exist Downloading kubectl client for first time. This can take few minutes... Step: 2025-03-04T12-26-38Z: Install Helm client if it does not exist Step: 2025-03-04T12-26-38Z: Starting Pre-onboarding-check Step: 2025-03-04T12-26-38Z: Creating folder for Cluster Diagnostic Checks Logs Step: 2025-03-04T12-26-38Z: Get namespace of release: cluster-diagnostic-checks Step: 2025-03-04T12-26-38Z: Determine Helmchart Export Path Step: 2025-03-04T12-26-38Z: Pulling HelmChart: mcr.microsoft.com/azurearck8s/helmchart/stable/clusterdiagnosticchecks, Version: 0.2.2 Step: 2025-03-04T12-26-39Z: Chart path for Cluster Diagnostic Checks Job: C:\Users\AdminH861984\.azure\PreOnboardingChecksCharts\clusterdiagnosticchecks Step: 2025-03-04T12-26-39Z: Creating Cluster Diagnostic Checks job Step: 2025-03-04T12-26-47Z: The required pre-checks for onboarding have succeeded. Step: 2025-03-04T12-26-47Z: Checking if user can create ClusterRoleBindings Step: 2025-03-04T12-26-47Z: Determining Cluster Distribution and Infrastructure Step: 2025-03-04T12-26-47Z: Checking Connect RP is available in the Location passed in. Step: 2025-03-04T12-26-47Z: Check if an earlier azure-arc release exists Step: 2025-03-04T12-26-47Z: Get namespace of release: azure-arc Step: 2025-03-04T12-26-48Z: Deleting Arc CRDs The command failed with an unexpected error. Here is the traceback: [WinError 2] The system cannot find the file specified Traceback (most recent call last): File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 666, in execute File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 734, in _run_jobs_serially File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 703, in _run_job File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 336, in __call__ File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 120, in handler File "C:\Users\\.azure\cliextensions\connectedk8s\azext_connectedk8s\custom.py", line 776, in create_connectedk8s crd_cleanup_force_delete(kubectl_client_location, kube_config, kube_context) File "C:\Users\\.azure\cliextensions\connectedk8s\azext_connectedk8s\custom.py", line 4388, in crd_cleanup_force_delete response_helm_delete = Popen(cmd_helm_delete, stdout=PIPE, stderr=PIPE) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "subprocess.py", line 1026, in __init__ File "subprocess.py", line 1538, in _execute_child FileNotFoundError: [WinError 2] The system cannot find the file specified To check existing issues, please visit: https://github.com/Azure/azure-cli/issues
```

### Issue script & Debug output

[debug.txt](https://github.com/user-attachments/files/19071014/debug.txt)

### Expected behavior

The cluster is connected via Arc and shows up in the Azure portal.

### Environment Summary

azure-cli 2.70.0 core 2.70.0 telemetry 1.1.0 Extensions: azure-iot-ops 1.2.0 connectedk8s 1.10.6 k8s-extension 1.6.3 ssh 2.0.6 Dependencies: msal 1.31.2b1 azure-mgmt-resource 23.1.1 Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe' Config directory 'C:\Users\\.azure' Extensions directory 'C:\Users\\.azure\cliextensions' Python (Windows) 3.12.8 (tags/v3.12.8:2dc476b, Dec 3 2024, 19:30:04) [MSC v.1942 64 bit (AMD64)] Legal docs and information: aka.ms/AzureCliLegal Your CLI is up-to-date.

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.