Azure / Azure/azure-cli-extensions

az connectedk8s connect - mcr.microsoft.us issue

Open
#9,170 2 comments 0 reactions 0 assignees 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

For context, I am using the gov cloud and based off looking at the code , I feel like the issue is around the domain used.

when following the instructions seen [here](https://learn.microsoft.com/en-us/azure/azure-arc/kubernetes/quickstart-connect-cluster?tabs=azure-cli#connect-a-cluster)

I noticed that once it got to the point where I run this command but in my own terminal

```bash
az connectedk8s connect --name AzureArcTest1 --resource-group AzureArcTest
```

I saw this output

```
Downloading helm client for first time. This can take few minutes...
An exception has occured while trying to perform kubectl or helm install: Failed to download helm client: HTTPSConnectionPool(host='mcr.microsoft.us', port=443): Max retries exceeded with url: /v2/azurearck8s/helm/manifests/helm-v3.12.2-linux-amd64 (Caused by NameResolutionError(": Failed to resolve 'mcr.microsoft.us' ([Errno -2] Name or service not known)"))
```

and when I run this basic nslookup, I cant help but think this is a bug in the connectedk8s extension and that it just needs to use the .com tld for obtaining the oci artifacts and helm charts

```bash
 nslookup mcr.microsoft.com
Server: 10.255.255.254
Address: 10.255.255.254#53

Non-authoritative answer:
mcr.microsoft.com canonical name = mcr.trafficmanager.net.
mcr.trafficmanager.net canonical name = mcr-0001.mcr-msedge.net.
Name: mcr-0001.mcr-msedge.net
Address: 150.171.69.10
Name: mcr-0001.mcr-msedge.net
Address: 150.171.70.10
Name: mcr-0001.mcr-msedge.net
Address: 2603:1061:f:101::10
Name: mcr-0001.mcr-msedge.net
Address: 2603:1061:f:100::10

```

and also

```bash
 nslookup mcr.microsoft.us
Server: 10.255.255.254
Address: 10.255.255.254#53

** server can't find mcr.microsoft.us: SERVFAIL
```

### Related command

`az connectedk8s connect`

### Errors

Downloading helm client for first time. This can take few minutes...
An exception has occured while trying to perform kubectl or helm install: Failed to download helm client: HTTPSConnectionPool(host='mcr.microsoft.us', port=443): Max retries exceeded with url: /v2/azurearck8s/helm/manifests/helm-v3.12.2-linux-amd64 (Caused by NameResolutionError(": Failed to resolve 'mcr.microsoft.us' ([Errno -2] Name or service not known)"))

### Issue script & Debug output

cli.azext_connectedk8s.custom: Downloading helm client for first time. This can take few minutes...
oras.logger: Retrying in 3 seconds - error: HTTPSConnectionPool(host='mcr.microsoft.us', port=443): Max retries exceeded with url: /v2/azurearck8s/helm/manifests/helm-v3.12.2-linux-amd64 (Caused by NameResolutionError(": Failed to resolve 'mcr.microsoft.us' ([Errno -2] Name or service not known)"))
oras.logger: Retrying in 5 seconds - error: HTTPSConnectionPool(host='mcr.microsoft.us', port=443): Max retries exceeded with url: /v2/azurearck8s/helm/manifests/helm-v3.12.2-linux-amd64 (Caused by NameResolutionError(": Failed to resolve 'mcr.microsoft.us' ([Errno -2] Name or service not known)"))
oras.logger: Retrying in 11 seconds - error: HTTPSConnectionPool(host='mcr.microsoft.us', port=443): Max retries exceeded with url: /v2/azurearck8s/helm/manifests/helm-v3.12.2-linux-amd64 (Caused by NameResolutionError(": Failed to resolve 'mcr.microsoft.us' ([Errno -2] Name or service not known)"))

### Expected behavior

for it to install the helm binary and then install the chart

### Environment Summary

 az --version
azure-cli 2.71.0 *

core 2.71.0 *
telemetry 1.1.0

Extensions:
application-insights 1.2.3
azure-devops 1.0.1
connectedk8s 1.10.8
k8s-extension 1.7.0
resource-graph 2.1.1

Dependencies:
msal 1.31.2b1
azure-mgmt-resource 23.1.1

Python (Linux) 3.9.21 (main, Jun 27 2025, 00:00:00)
[GCC 11.5.0 20240719 (Red Hat 11.5.0-5)]

Legal docs and information: aka.ms/AzureCliLegal

### Additional context

when I read the code and wrote a bash script to download the helm file and put it in the dir that the cli will check as a work around( so somewhere in the .azure folder) and got it to move past this step, I ran into errors with the helm chart that is was trying to pull as well. So it seems like solving the top level domain part of this will help the rest work just fine.

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.