Azure / Azure/azure-cli-extensions

AZ CLI Connectedk8s Error crd_cleanup_force_delete(kubectl_client_location, kube_config, kube_context)

Open
#6,637 11 comments 0 reactions 1 assignee Assigned to @TheOnlyWei View on GitHub
Auto-Assign bug Connected Kubernetes customer-reported Service Attention
Dominant language
Python
Stars
454
Forks
1.7k
Avg merge
2d 19h
Merged PRs (30d)
64

Description

### Describe the bug

Hi,

While trying to connect my Kubernetes cluster to azure arc is shows the errors related to custom.py.

![image](https://github.com/Azure/azure-cli-extensions/assets/131188996/d853dac4-8df3-4872-a851-61cfc9e51a49)

### Related command

az connectedk8s connect -g ARC-AKS-MicroK8 -n Arc-Data-Microk8s --kube-config "C:\Users\user\.kube\config" --kube-context $Env:KUBECONTEXT --correlation-id "d009f5dd-dba8-4ac7-bac9-b54ef3a6671a"

### Errors

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 663, in execute
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 726, 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 697, in _run_job
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 333, in __call__
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
File "C:\Users\arcdemo\.azure\cliextensions\connectedk8s\azext_connectedk8s\custom.py", line 334, in create_connectedk8s
crd_cleanup_force_delete(kubectl_client_location, kube_config, kube_context)
File "C:\Users\arcdemo\.azure\cliextensions\connectedk8s\azext_connectedk8s\custom.py", line 2410, in crd_cleanup_force_delete
response_helm_delete = Popen(cmd_helm_delete, stdout=PIPE, stderr=PIPE)
File "subprocess.py", line 971, in __init__
File "subprocess.py", line 1440, in _execute_child
FileNotFoundError: [WinError 2] The system cannot find the file specified

### Issue script & Debug output

[Debug AZ CLI Connectedk8s.txt](https://github.com/Azure/azure-cli-extensions/files/12322059/Debug.AZ.CLI.Connectedk8s.txt)

### Expected behavior

Should be Successful.

### Environment Summary

"azure-cli": "2.51.0",
"azure-cli-core": "2.51.0",
"azure-cli-telemetry": "1.1.0",
"extensions": {
"arcdata": "1.5.4",
"connectedk8s": "1.4.0",
"k8s-extension": "1.4.2"

Microk8s Running on Ubuntu machine and managed with Windows VM.

### 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.