Skip to content

Azure Arc can't enabled on kubernetes cluster which created on Azure #31075

@dlsyliu

Description

@dlsyliu

Describe the bug

Hi team,
When i executed the below command use local machine Azure CLI for enable Arc, it can't executed due to my local "Permission denied" issue, i also tried "sudo az connectedk8s connect --resource-group AzureArcTest1 --name poc" still same error, could you help to guide how to fix that? Thank you very much.

  • az aks get-credentials --resource-group AzureArcTest1 --name poc
  • az connectedk8s connect --resource-group AzureArcTest1 --name poc

Related command

az connectedk8s connect --resource-group AzureArcTest1 --name poc

Errors

The command failed with an unexpected error. Here is the traceback:
[Errno 13] Permission denied: '/Users/shiyangliu/.azure/kubectl-client/kubectl'
Traceback (most recent call last):
File "/opt/homebrew/Cellar/azure-cli/2.70.0/libexec/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.70.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 666, in execute
raise ex
File "/opt/homebrew/Cellar/azure-cli/2.70.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 734, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.70.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 703, in _run_job
result = cmd_copy(params)
^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.70.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 336, in call
return self.handler(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.70.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 120, in handler
return op(**command_args)
^^^^^^^^^^^^^^^^^^
File "/Users/shiyangliu/.azure/cliextensions/connectedk8s/azext_connectedk8s/custom.py", line 776, in create_connectedk8s
crd_cleanup_force_delete(kubectl_client_location, kube_config, kube_context)
File "/Users/shiyangliu/.azure/cliextensions/connectedk8s/azext_connectedk8s/custom.py", line 4414, in crd_cleanup_force_delete
response_helm_delete = Popen(cmd_helm_delete, stdout=PIPE, stderr=PIPE)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.12/3.12.9/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py", line 1028, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/opt/homebrew/Cellar/python@3.12/3.12.9/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py", line 1963, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: '/Users/shiyangliu/.azure/kubectl-client/kubectl'

Issue script & Debug output

Get namespace of release: azure-arc.log

Expected behavior

Deploys the Azure Arc agents to the cluster, I can connect an existing Kubernetes cluster

Environment Summary

azure-cli: 2.70.0
Extensions:

  • connectedk8s, "version": "1.10.7"
  • k8s-extension, "version": "1.6.4"
  • connectedmachine , "version": "1.0.0"

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    AKSaz aks/acs/openshiftAuto-AssignAuto assign by botService AttentionThis issue is responsible by Azure service team.bugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions