|
1 | 1 | ---
|
2 | 2 | title: "Troubleshoot common Azure Arc-enabled Kubernetes issues"
|
3 |
| -ms.date: 03/13/2023 |
| 3 | +ms.date: 03/28/2023 |
4 | 4 | ms.topic: how-to
|
5 | 5 | ms.custom: devx-track-azurecli
|
6 | 6 | description: "Learn how to resolve common issues with Azure Arc-enabled Kubernetes clusters and GitOps."
|
@@ -243,66 +243,6 @@ az extension add --name k8s-configuration
|
243 | 243 |
|
244 | 244 | ## GitOps management
|
245 | 245 |
|
246 |
| -### Flux v1 - General |
247 |
| - |
248 |
| -> [!NOTE] |
249 |
| -> Eventually Azure will stop supporting GitOps with Flux v1, so begin using [Flux v2](./tutorial-use-gitops-flux2.md) as soon as possible. |
250 |
| -
|
251 |
| -To help troubleshoot issues with `sourceControlConfigurations` resource (Flux v1), run these Azure CLI commands with `--debug` parameter specified: |
252 |
| - |
253 |
| -```azurecli |
254 |
| -az provider show -n Microsoft.KubernetesConfiguration --debug |
255 |
| -az k8s-configuration create <parameters> --debug |
256 |
| -``` |
257 |
| - |
258 |
| -### Flux v1 - Create configurations |
259 |
| - |
260 |
| -Write permissions on the Azure Arc-enabled Kubernetes resource (`Microsoft.Kubernetes/connectedClusters/Write`) are necessary and sufficient for creating configurations on that cluster. |
261 |
| - |
262 |
| -### `sourceControlConfigurations` remains `Pending` (Flux v1) |
263 |
| - |
264 |
| -```console |
265 |
| -kubectl -n azure-arc logs -l app.kubernetes.io/component=config-agent -c config-agent |
266 |
| -$ k -n pending get gitconfigs.clusterconfig.azure.com -o yaml |
267 |
| -apiVersion: v1 |
268 |
| -items: |
269 |
| -- apiVersion: clusterconfig.azure.com/v1beta1 |
270 |
| - kind: GitConfig |
271 |
| - metadata: |
272 |
| - creationTimestamp: "2020-04-13T20:37:25Z" |
273 |
| - generation: 1 |
274 |
| - name: pending |
275 |
| - namespace: pending |
276 |
| - resourceVersion: "10088301" |
277 |
| - selfLink: /apis/clusterconfig.azure.com/v1beta1/namespaces/pending/gitconfigs/pending |
278 |
| - uid: d9452407-ff53-4c02-9b5a-51d55e62f704 |
279 |
| - spec: |
280 |
| - correlationId: "" |
281 |
| - deleteOperator: false |
282 |
| - enableHelmOperator: false |
283 |
| - giturl: [email protected]:slack/cluster-config.git |
284 |
| - helmOperatorProperties: null |
285 |
| - operatorClientLocation: azurearcfork8s.azurecr.io/arc-preview/fluxctl:0.1.3 |
286 |
| - operatorInstanceName: pending |
287 |
| - operatorParams: '"--disable-registry-scanning"' |
288 |
| - operatorScope: cluster |
289 |
| - operatorType: flux |
290 |
| - status: |
291 |
| - configAppliedTime: "2020-04-13T20:38:43.081Z" |
292 |
| - isSyncedWithAzure: true |
293 |
| - lastPolledStatusTime: "" |
294 |
| - message: 'Error: {exit status 1} occurred while doing the operation : {Installing |
295 |
| - the operator} on the config' |
296 |
| - operatorPropertiesHashed: "" |
297 |
| - publicKey: "" |
298 |
| - retryCountPublicKey: 0 |
299 |
| - status: Installing the operator |
300 |
| -kind: List |
301 |
| -metadata: |
302 |
| - resourceVersion: "" |
303 |
| - selfLink: "" |
304 |
| -``` |
305 |
| - |
306 | 246 | ### Flux v2 - General
|
307 | 247 |
|
308 | 248 | To help troubleshoot issues with `fluxConfigurations` resource (Flux v2), run these Azure CLI commands with the `--debug` parameter specified:
|
@@ -451,6 +391,66 @@ The controllers installed in your Kubernetes cluster with the Microsoft Flux ext
|
451 | 391 |
|
452 | 392 | If you have enabled a custom or built-in Azure Gatekeeper Policy, such as `Kubernetes cluster containers CPU and memory resource limits should not exceed the specified limits`, that limits the resources for containers on Kubernetes clusters, you will need to either ensure that the resource limits on the policy are greater than the limits shown above or the `flux-system` namespace is part of the `excludedNamespaces` parameter in the policy assignment.
|
453 | 393 |
|
| 394 | +### Flux v1 |
| 395 | + |
| 396 | +> [!NOTE] |
| 397 | +> We recommend [migrating to Flux v2](conceptual-gitops-flux2.md#migrate-from-flux-v1) as soon as possible. Support for Flux v1-based cluster configuration resources created prior to May 1, 2023 will end on [May 24, 2025](https://azure.microsoft.com/updates/migrate-your-gitops-configurations-from-flux-v1-to-flux-v2-by-24-may-2025/). Starting on May 1, 2023, you won't be able to create new Flux v1-based cluster configuration resources. |
| 398 | +
|
| 399 | +To help troubleshoot issues with `sourceControlConfigurations` resource (Flux v1), run these Azure CLI commands with `--debug` parameter specified: |
| 400 | + |
| 401 | +```azurecli |
| 402 | +az provider show -n Microsoft.KubernetesConfiguration --debug |
| 403 | +az k8s-configuration create <parameters> --debug |
| 404 | +``` |
| 405 | + |
| 406 | +#### Flux v1 - Create configurations |
| 407 | + |
| 408 | +Write permissions on the Azure Arc-enabled Kubernetes resource (`Microsoft.Kubernetes/connectedClusters/Write`) are necessary and sufficient for creating configurations on that cluster. |
| 409 | + |
| 410 | +#### `sourceControlConfigurations` remains `Pending` (Flux v1) |
| 411 | + |
| 412 | +```console |
| 413 | +kubectl -n azure-arc logs -l app.kubernetes.io/component=config-agent -c config-agent |
| 414 | +$ k -n pending get gitconfigs.clusterconfig.azure.com -o yaml |
| 415 | +apiVersion: v1 |
| 416 | +items: |
| 417 | +- apiVersion: clusterconfig.azure.com/v1beta1 |
| 418 | + kind: GitConfig |
| 419 | + metadata: |
| 420 | + creationTimestamp: "2020-04-13T20:37:25Z" |
| 421 | + generation: 1 |
| 422 | + name: pending |
| 423 | + namespace: pending |
| 424 | + resourceVersion: "10088301" |
| 425 | + selfLink: /apis/clusterconfig.azure.com/v1beta1/namespaces/pending/gitconfigs/pending |
| 426 | + uid: d9452407-ff53-4c02-9b5a-51d55e62f704 |
| 427 | + spec: |
| 428 | + correlationId: "" |
| 429 | + deleteOperator: false |
| 430 | + enableHelmOperator: false |
| 431 | + giturl: [email protected]:slack/cluster-config.git |
| 432 | + helmOperatorProperties: null |
| 433 | + operatorClientLocation: azurearcfork8s.azurecr.io/arc-preview/fluxctl:0.1.3 |
| 434 | + operatorInstanceName: pending |
| 435 | + operatorParams: '"--disable-registry-scanning"' |
| 436 | + operatorScope: cluster |
| 437 | + operatorType: flux |
| 438 | + status: |
| 439 | + configAppliedTime: "2020-04-13T20:38:43.081Z" |
| 440 | + isSyncedWithAzure: true |
| 441 | + lastPolledStatusTime: "" |
| 442 | + message: 'Error: {exit status 1} occurred while doing the operation : {Installing |
| 443 | + the operator} on the config' |
| 444 | + operatorPropertiesHashed: "" |
| 445 | + publicKey: "" |
| 446 | + retryCountPublicKey: 0 |
| 447 | + status: Installing the operator |
| 448 | +kind: List |
| 449 | +metadata: |
| 450 | + resourceVersion: "" |
| 451 | + selfLink: "" |
| 452 | +``` |
| 453 | + |
454 | 454 | ## Monitoring
|
455 | 455 |
|
456 | 456 | Azure Monitor for Containers requires its DaemonSet to run in privileged mode. To successfully set up a Canonical Charmed Kubernetes cluster for monitoring, run the following command:
|
|
0 commit comments