Skip to content

Commit 89105c2

Browse files
authored
Merge pull request #15317 from sethmanheim/akstsg6-13
Add new AKS Arc known issue
2 parents 54fd768 + 7f2b406 commit 89105c2

File tree

1 file changed

+66
-37
lines changed

1 file changed

+66
-37
lines changed

AKS-Hybrid/known-issues-arc.yml

Lines changed: 66 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ metadata:
77
ms.service: azure-stack
88
ms.subservice: aks-hci
99
ms.topic: faq
10-
ms.date: 07/10/2023
10+
ms.date: 6/13/2024
1111

1212
title: Resolve errors when enabling or disabling Azure Arc on your AKS workload clusters in AKS enabled by Arc
1313
summary: |
14-
**Applies to: AKS on Azure Stack HCI, AKS on Windows Server**
14+
Applies to: AKS on Azure Stack HCI, AKS on Windows Server
1515
16-
This article describes errors you may encounter (and their workarounds) while connecting or disconnecting your AKS workload clusters to Azure Arc using the PowerShell cmdlets [Enable-AksHciArcConnection](./reference/ps/enable-akshciarcconnection.md) and [Disable-AksHciArcConnection](./reference/ps/disable-akshciarcconnection.md) in AKS Arc. For issues that are not covered in this article, see [Troubleshooting Arc enabled Kubernetes](/azure/azure-arc/kubernetes/troubleshooting).
16+
This article describes errors you might encounter (and their workarounds) while connecting or disconnecting your AKS workload clusters to Azure Arc using the PowerShell cmdlets [`Enable-AksHciArcConnection`](./reference/ps/enable-akshciarcconnection.md) and [`Disable-AksHciArcConnection`](./reference/ps/disable-akshciarcconnection.md) in AKS Arc. For issues that are not covered in this article, see [Troubleshooting Arc enabled Kubernetes](/azure/azure-arc/kubernetes/troubleshooting).
1717
18-
You can also [open a support issue](./help-support.md) if none of the workarounds listed below apply to you.
18+
You can also [open a support issue](./help-support.md) if none of the listed workarounds apply to you.
1919
2020
sections:
2121
- name: Single section - ignored
@@ -24,7 +24,7 @@ sections:
2424
Error: "A workload cluster with the name 'my-aks-cluster' was not found"
2525
2626
answer: |
27-
This error means that you have not created the workload cluster, or you have incorrectly spelled the name of the workload cluster.
27+
This error means that you have not created the workload cluster, or you incorrectly spelled the name of the workload cluster.
2828
2929
Run [Get-AksHciCluster](./reference/ps/get-akshcicluster.md) to ensure you have the correct name or that the cluster you want to connect to Arc exists.
3030
@@ -42,10 +42,10 @@ sections:
4242
- Option 2: In PowerShell, check if the cluster has been successfully created by running the [Get-AksHciCluster](./reference/ps/get-akshcicluster.md) command, and then use [Enable-AksHciArcConnection](./reference/ps/enable-akshciarcconnection.md) to connect your cluster to Arc.
4343
4444
- question: |
45-
Enable-AksHciArcConnection fails if Connect-AzAccount is used to sign in to Azure
45+
`Enable-AksHciArcConnection` fails if `Connect-AzAccount` is used to sign in to Azure
4646
4747
answer: |
48-
When you use [Connect-AzAccount](/powershell/module/az.accounts/connect-azaccount?view=azps-6.4.0&preserve-view=true) to sign in to Azure, you might set a different subscription as your default context than the one that you gave as an input to [Set-AksHciRegistration](./reference/ps/set-akshciregistration.md). When you then run [Enable-AksHciArcConnection](./reference/ps/enable-akshciarcconnection.md), the command expects the subscription used in `Set-AksHciRegistration`. However, `Enable-AksHciArcConnection` gets the default subscription set using the `Connect-AzAccount`, and therefore, might cause an error.
48+
When you use [`Connect-AzAccount`](/powershell/module/az.accounts/connect-azaccount?view=azps-6.4.0&preserve-view=true) to sign in to Azure, you might set a different subscription as your default context than the one that you gave as an input to [`Set-AksHciRegistration`](./reference/ps/set-akshciregistration.md). When you then run [`Enable-AksHciArcConnection`](./reference/ps/enable-akshciarcconnection.md), the command expects the subscription used in `Set-AksHciRegistration`. However, `Enable-AksHciArcConnection` gets the default subscription set using the `Connect-AzAccount`, and therefore, might cause an error.
4949
5050
To prevent this error, follow one of the options below:
5151
@@ -58,7 +58,7 @@ sections:
5858
answer: |
5959
This error usually points to one of the following issues:
6060
61-
- The clusters were created in an Azure VM in a virtualized environment, or you were deploying AKS on Azure Stack HCI on multiple levels of virtualization.
61+
- The clusters were created in an Azure VM in a virtualized environment, or you deployed AKS on Azure Stack HCI on multiple levels of virtualization.
6262
- A slow internet caused the timeout.
6363
6464
If one of the above scenarios applies to you, run [Disable-AksHciArcConnection](./reference/ps/disable-akshciarcconnection.md), and try connecting again. If the above scenario doesn't apply to you, [open a support issue](./help-support.md) for AKS on Azure Stack HCI.
@@ -68,75 +68,104 @@ sections:
6868
answer: |
6969
This error indicates that your Kubernetes API server could not be reached.
7070
71-
Try running the [Disable-AksHciArcConnection](./reference/ps/disable-akshciarcconnection.md) command again, and then go to the [Azure portal](https://portal.azure.com) to confirm that your `connectedCluster` resource has actually been deleted. You can also run `kubectl get ns -A` to confirm that the namespace, `azure-arc`, does not exist on your cluster.
72-
73-
- question: |
74-
Error: 'Error while updating agents for enabling features'
75-
76-
answer: |
77-
If you enable the *custom location* and *cluster connect* features on an AKS cluster that is connected to Azure Arc, you may see the following error:
78-
79-
`Error while updating agents for enabling features. Please run "kubectl get pods -n azure-arc" to check the pods in case of timeout error. Error: Error: UPGRADE FAILED: timed out waiting for the condition`
80-
81-
This is a known issue with the September release and is fixed in the October release. New AKS clusters created using the October release and connected to Arc using [Enable-AksHciArcConnection](./reference/ps/enable-akshciarcconnection.md) do not experience this issue. Update your AKS Arc deployment to the October release and then reconnect your existing clusters to Arc for a workaround to this issue.
82-
71+
Try running the [`Disable-AksHciArcConnection`](./reference/ps/disable-akshciarcconnection.md) command again, and then go to the [Azure portal](https://portal.azure.com) to confirm that your `connectedCluster` resource was actually deleted. You can also run `kubectl get ns -A` to confirm that the namespace, `azure-arc`, does not exist on your cluster.
72+
8373
- question: |
84-
Error: 'Connection to Azure failed. Please run 'Set-AksHciRegistration' and try again'
74+
Error: "Connection to Azure failed. Please run 'Set-AksHciRegistration' and try again"
8575
8676
answer: |
8777
This error means that your login credentials to Azure have expired.
8878
89-
Use [Set-AksHciRegistration](./reference/ps/set-akshciregistration.md) to log in to Azure before running the [Enable-AksHciArcConnection](./reference/ps/enable-akshciarcconnection.md) command again. When rerunning `Set-AksHciRegistration`, make sure you use the same subscription and resource group details you used when you first registered the AKS host to Azure for billing. If you rerun the command with a different subscription or resource group, they will not be registered. Once the subscription and resource group are set in `Set-AksHciRegistration`, they cannot be changed without uninstalling AKS Arc.
79+
Use [`Set-AksHciRegistration`](./reference/ps/set-akshciregistration.md) to log in to Azure before running the [`Enable-AksHciArcConnection`](./reference/ps/enable-akshciarcconnection.md) command again. When rerunning `Set-AksHciRegistration`, make sure you use the same subscription and resource group details you used when you first registered the AKS host to Azure for billing. If you rerun the command with a different subscription or resource group, they will not be registered. Once the subscription and resource group are set in `Set-AksHciRegistration`, they cannot be changed without uninstalling AKS Arc.
9080
9181
- question: |
92-
Error: ''My-Cluster' is not a valid cluster name. Names must be lowercase and match the regular expression pattern: '^[a-z0-9][a-z0-9-]*[a-z0-9]$''
82+
Error: "'My-Cluster' is not a valid cluster name. Names must be lowercase and match the regular expression pattern: '^[a-z0-9][a-z0-9-]*[a-z0-9]$'"
9383
9484
answer: |
9585
This error indicates that the workload cluster does not follow the Kubernetes naming convention.
9686
9787
As the error suggests, make sure the cluster name is lowercase and matches the regular expression pattern: '^[a-z0-9][a-z0-9-]*[a-z0-9]$'.
9888
9989
- question: |
100-
Error: 'addons.msft.microsoft "demo-arc-onboarding" already exists'
90+
Error: "addons.msft.microsoft "demo-arc-onboarding" already exists"
10191
10292
answer: |
103-
This error usually means that you have already connected your AKS cluster to Arc-enabled Kubernetes.
104-
To confirm it's connected, go to the [Azure portal](https://portal.azure.com) and check under the subscription and resource group you provided when running [Set-AksHciRegistration](./reference/ps/set-akshciregistration.md) (if you've used default values) or [Enable-AksHciArcConnection](./reference/ps/enable-akshciarcconnection.md) (if you haven't used default values). You can also confirm if your AKS on Azure Stack HCI cluster is connected to Azure by running the [az connectedk8s show ](/cli/azure/connectedk8s#az-connectedk8s-show) Azure CLI command. If you do not see your workload cluster, run `Disable-AksHciArcConnection` and try again.
93+
This error usually means that you already connected your AKS cluster to Arc-enabled Kubernetes.
94+
To confirm it's connected, go to the [Azure portal](https://portal.azure.com) and check under the subscription and resource group you provided when you ran [`Set-AksHciRegistration`](./reference/ps/set-akshciregistration.md) (if you used default values) or [`Enable-AksHciArcConnection`](./reference/ps/enable-akshciarcconnection.md) (if you didn't use default values). You can also confirm if your AKS on Azure Stack HCI cluster is connected to Azure by running the [`az connectedk8s show` ](/cli/azure/connectedk8s#az-connectedk8s-show) Azure CLI command. If you don't see your workload cluster, run `Disable-AksHciArcConnection` and try again.
10595
10696
10797
- question: |
108-
Error: 'autorest/azure: Service returned an error. Status=404 Code="ResourceNotFound"...'
98+
Error: "autorest/azure: Service returned an error. Status=404 Code="ResourceNotFound"..."
10999
110100
answer: |
111-
The error below means that Azure could not find the `connectedCluster` ARM resource associated with your cluster:
101+
This error means that Azure can't find the `connectedCluster` Azure Resource Manager resource associated with your cluster:
112102
113-
`autorest/azure: Service returned an error. Status=404 Code="ResourceNotFound" Message="The Resource 'Microsoft.Kubernetes/connectedClusters/my-workload-cluster' under resource group 'AKS-HCI2' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix"]`
103+
"autorest/azure: Service returned an error. Status=404 Code="ResourceNotFound" Message="The Resource 'Microsoft.Kubernetes/connectedClusters/my-workload-cluster' under resource group 'AKS-HCI2' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix"]"
114104
115105
You may encounter this error if:
116106
117107
- You supplied an incorrect resource group or subscription while running the `Disable-AksHciArcConnection` cmdlet.
118108
- You manually deleted the resource on the Azure portal.
119-
- ARM cannot find your Azure resource.
109+
- Azure Resource Manager cannot find your Azure resource.
120110
121111
To resolve this error, as indicated in the error message, see [resolve resource not found errors](/azure/azure-resource-manager/templates/error-not-found).
122112
- question: |
123-
Error: 'Cluster addons arc uninstall Error: namespaces "azure-arc" not found'
113+
Error: "Cluster addons arc uninstall Error: namespaces "azure-arc" not found"
124114
125115
answer: |
126-
This error usually means that you have already uninstalled Arc agents from your workload cluster, or you have manually deleted the `azure-arc` namespace using the `kubectl` command.
116+
This error usually means that you already uninstalled Arc agents from your workload cluster, or you manually deleted the `azure-arc` namespace using the `kubectl` command.
127117
128-
Go to the [Azure portal](https://portal.azure.com) to confirm that you do not have any leaked resources. For example, verify that you do not see a `connectedCluster` resource in the subscription and resource group.
118+
Go to the [Azure portal](https://portal.azure.com) to confirm that you don't have any leaked resources. For example, verify that you don't see a `connectedCluster` resource in the subscription and resource group.
129119
130120
- question: |
131-
Error: 'Azure subscription is not properly configured'
121+
Error: "Azure subscription is not properly configured"
132122
133123
answer: |
134-
You may encounter this issue if you have not configured your Azure subscription with the Arc-enabled Kubernetes resource providers. We currently check that `Microsoft.Kubernetes` and `Microsoft.KubernetesConfiguration` are configured.
124+
You may encounter this issue if you haven't configured your Azure subscription with the Arc-enabled Kubernetes resource providers. We currently check that `Microsoft.Kubernetes` and `Microsoft.KubernetesConfiguration` are configured.
135125
136126
For more information about enabling these resource providers, see [Register providers for Arc-enabled Kubernetes](/azure/azure-arc/kubernetes/quickstart-connect-cluster?tabs=azure-cli#register-providers-for-azure-arc-enabled-kubernetes).
137-
138-
127+
- question: |
128+
Error: "Unable to read ConfigMap 'azure-clusterconfig' in 'azure-arc' namespace"
139129
130+
answer: |
131+
You may encounter this issue when trying to re-enable the Arc connection on an AKS cluster after disabling an existing connection. The error is due to a change to the namespace in which Azure Arc secrets are stored.
132+
133+
The steps that lead to the error are:
134+
135+
1. Connect a workload cluster to Azure Arc with `Enable-AksHciArcConnection -name $clusterName`.
136+
1. Disconnect the cluster from Azure Arc: `Disable-AksHciArcConnection -name $clusterName`.
137+
1. Connect the workload cluster to Azure Arc with this command again: `Enable-AksHciArcConnection -name $clusterName`.
138+
139+
The error is:
140+
141+
```output
142+
returned a non zero exit code 1 [Error: Job azure-arc-onboarding terminated with Failed to run CLI command: Error from server (NotFound): namespaces "azure-arc"
143+
not found
144+
System.Management.Automation.RemoteException
145+
ERROR: Unable to read ConfigMap 'azure-clusterconfig' in 'azure-arc' namespace:
146+
Error Response: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"configmaps \"azure-clusterconfig\" not
147+
found","reason":"NotFound","details":{"name":"azure-clusterconfig","kind":"configmaps"},"code":404}
148+
System.Management.Automation.RemoteException
149+
System.Management.Automation.RemoteException
150+
: Job Failed Condition
151+
```
152+
153+
`Enable-AksHciArcConnection` always fails, and after you run `Disable-AksHciArcConnection`, there is a remaining secret in the azure-arc-release namespace. To check if the secret exists, you can run the following command and ensure that no secret is listed:
154+
155+
```powershell
156+
kubectl get secret -nazure-arc-release sh.helm.release.v1.azure-arc.v1
157+
```
158+
159+
To work around this issue, delete the azure-arc-release namespace after running `Disable-AksHciArcConnection`:
160+
161+
```powershell
162+
$clusterName = "<name of cluster>"
163+
Get-AksHciCredential -name $clusterName
164+
kubectl delete namespace azure-arc-release
165+
Disable-AksHciArcConnection -name $clusterName
166+
Enable-AksHciArcConnection -name $clusterName
167+
```
168+
140169
additionalContent: |
141170
## Next steps
142171

0 commit comments

Comments
 (0)