Skip to content

Commit ed8e81f

Browse files
committed
restructure sections
1 parent a4dfcf1 commit ed8e81f

File tree

1 file changed

+36
-26
lines changed

1 file changed

+36
-26
lines changed

articles/azure-arc/kubernetes/use-azure-policy-flux-2.md

Lines changed: 36 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Deploy applications consistently at scale using Flux v2 configurations and Azure Policy"
3-
ms.date: 06/02/2023
3+
ms.date: 12/13/2023
44
ms.topic: how-to
55
description: "Use Azure Policy to apply Flux v2 configurations at scale on Azure Arc-enabled Kubernetes or AKS clusters."
66
---
@@ -9,34 +9,38 @@ description: "Use Azure Policy to apply Flux v2 configurations at scale on Azure
99

1010
You can use Azure Policy to apply Flux v2 configurations (`Microsoft.KubernetesConfiguration/fluxConfigurations` resource type) at scale on Azure Arc-enabled Kubernetes (`Microsoft.Kubernetes/connectedClusters`) or AKS (`Microsoft.ContainerService/managedClusters`) clusters.
1111

12-
To use Azure Policy, select a built-in policy definition and create a policy assignment. You can search for **flux** to find all of the Flux v2 policy definitions. When creating the policy assignment:
12+
To use Azure Policy, select a built-in policy definition and create a policy assignment. When creating the policy assignment:
1313

1414
1. Set the scope for the assignment to all resource groups in a subscription or management group, or to specific resource groups.
1515
2. Set the parameters for the Flux v2 configuration that will be created.
1616

1717
Once the assignment is created, the Azure Policy engine identifies all Azure Arc-enabled Kubernetes clusters located within the scope and applies the GitOps configuration to each cluster.
1818

19-
To enable separation of concerns, you can create multiple policy assignments, each with a different Flux v2 configuration pointing to a different source. For example, one git repository may be used by cluster admins and other repositories may be used by application teams.
19+
To enable separation of concerns, you can create multiple policy assignments, each with a different Flux v2 configuration pointing to a different source. For example, one Git repository may be used by cluster admins and other repositories may be used by application teams.
2020

21-
> [!TIP]
22-
> There are [built-in policy definitions](policy-reference.md) for these scenarios:
23-
>
24-
> * Flux extension install (required for all scenarios): `Configure installation of Flux extension on Kubernetes cluster`
25-
> * Flux configuration using public Git repository (generally a test scenario): `Configure Kubernetes clusters with Flux v2 configuration using public Git repository`
26-
> * Flux configuration using private Git repository with SSH auth: `Configure Kubernetes clusters with Flux v2 configuration using Git repository and SSH secrets`
27-
> * Flux configuration using private Git repository with HTTPS auth: `Configure Kubernetes clusters with Flux v2 configuration using Git repository and HTTPS secrets`
28-
> * Flux configuration using private Git repository with HTTPS CA cert auth: `Configure Kubernetes clusters with Flux v2 configuration using Git repository and HTTPS CA Certificate`
29-
> * Flux configuration using private Git repository with local K8s secret: `Configure Kubernetes clusters with Flux v2 configuration using Git repository and local secrets`
30-
> * Flux configuration using private Bucket source and KeyVault secrets: `Configure Kubernetes clusters with Flux v2 configuration using Bucket source and secrets in KeyVault`
31-
> * Flux configuration using private Bucket source and local K8s secret: `Configure Kubernetes clusters with specified Flux v2 Bucket source using local secrets`
21+
## Built-in policy definitions
22+
23+
The following [built-in policy definitions](policy-reference.md) provide support for these scenarios:
24+
25+
* Flux extension install (required for all scenarios): `Configure installation of Flux extension on Kubernetes cluster`
26+
* Flux configuration using public Git repository (generally a test scenario): `Configure Kubernetes clusters with Flux v2 configuration using public Git repository`
27+
* Flux configuration using private Git repository with SSH auth: `Configure Kubernetes clusters with Flux v2 configuration using Git repository and SSH secrets`
28+
* Flux configuration using private Git repository with HTTPS auth: `Configure Kubernetes clusters with Flux v2 configuration using Git repository and HTTPS secrets`
29+
* Flux configuration using private Git repository with HTTPS CA cert auth: `Configure Kubernetes clusters with Flux v2 configuration using Git repository and HTTPS CA Certificate`
30+
* Flux configuration using private Git repository with local K8s secret: `Configure Kubernetes clusters with Flux v2 configuration using Git repository and local secrets`
31+
* Flux configuration using private Bucket source and KeyVault secrets: `Configure Kubernetes clusters with Flux v2 configuration using Bucket source and secrets in KeyVault`
32+
* Flux configuration using private Bucket source and local K8s secret: `Configure Kubernetes clusters with specified Flux v2 Bucket source using local secrets`
33+
34+
To find all of the Flux v2 policy definitions, search for **flux**.
3235

3336
## Prerequisites
3437

35-
Verify you have `Microsoft.Authorization/policyAssignments/write` permissions on the scope (subscription or resource group) where you'll create this policy assignment.
38+
* One or more Arc-enabled Kubernetes clusters and/or AKS clusters.
39+
* `Microsoft.Authorization/policyAssignments/write` permissions on the scope (subscription or resource group) where you'll create the policy assignments.
3640

37-
## Create a policy assignment
41+
## Create a policy assignment to install the Flux exension
3842

39-
In order for a policy to apply Flux v2 configurations to a cluster, the Flux extension must be installed on each cluster. You can ensure this by assigning the **Configure installation of Flux extension on Kubernetes cluster** policy definition to the desired scope.
43+
In order for a policy to apply Flux v2 configurations to a cluster, the Flux extension must first be installed on the cluster. To ensure that the extension is installed to each of your clusters, assign the **Configure installation of Flux extension on Kubernetes cluster** policy definition to the desired scope.
4044

4145
1. In the Azure portal, navigate to **Policy**.
4246
1. In the **Authoring** section of the sidebar, select **Definitions**.
@@ -48,12 +52,14 @@ In order for a policy to apply Flux v2 configurations to a cluster, the Flux ext
4852
1. Ensure **Policy enforcement** is set to **Enabled**.
4953
1. Select **Review + create**, then select **Create**.
5054

51-
Next, return to the **Definitions** list to apply the configuration policy definition to the same scope.
55+
## Create a policy assignment to apply Flux configurations
56+
57+
Next, return to the **Definitions** list (in the **Authoring** section of **Policy**) to apply the configuration policy definition to the same scope.
5258

5359
1. In the "Kubernetes" category, select the **Configure Kubernetes clusters with Flux v2 configuration using public Git repository**
54-
built-in policy definition.
60+
built-in policy definition, or another policy definition from the list above.
5561
1. Select **Assign**.
56-
1. Set the **Scope** to the same scope that you selected when assigning the first policy, including any exceptions.
62+
1. Set the **Scope** to the same scope that you selected when assigning the first policy, including any exclusions.
5763
1. Give the policy assignment an easily identifiable **Assignment name** and **Description**.
5864
1. Ensure **Policy enforcement** is set to **Enabled**.
5965
1. Select **Next**, then select **Next** again to open the **Parameters** tab.
@@ -63,23 +69,27 @@ built-in policy definition.
6369
1. Select **Next** to open the **Remediation** task.
6470
1. Enable **Create a remediation task**.
6571
1. Verify that **Create a Managed Identity** is checked, and that the identity will have **Contributor** permissions.
66-
* For more information, see [Quickstart: Create a policy assignment to identify non-compliant resources](../../governance/policy/assign-policy-portal.md) and [Remediate non-compliant resources with Azure Policy](../../governance/policy/how-to/remediate-resources.md).
72+
73+
For more information, see [Quickstart: Create a policy assignment to identify non-compliant resources](../../governance/policy/assign-policy-portal.md) and [Remediate non-compliant resources with Azure Policy](../../governance/policy/how-to/remediate-resources.md).
74+
6775
1. Select **Review + create**, then select **Create**.
6876

6977
After creating the policy assignments, the configuration is applied to new Azure Arc-enabled Kubernetes or AKS clusters created within the scope of policy assignment.
7078

7179
For existing clusters, you may need to manually run a remediation task. This task typically takes 10 to 20 minutes for the policy assignment to take effect.
7280

73-
## Verify a policy assignment
81+
## Verify the policy assignment
7482

7583
1. In the Azure portal, navigate to one of your Azure Arc-enabled Kubernetes or AKS clusters.
7684
1. In the **Settings** section of the sidebar, select **GitOps**.
77-
* In the configurations list, you should see the configuration created by the policy assignment.
85+
86+
In the configurations list, you should see the configuration created by the policy assignment.
87+
7888
1. In the **Kubernetes resources** section of the sidebar, select **Namespaces** and **Workloads**.
79-
* You should see the namespace and artifacts that were created by the Flux configuration.
80-
* You should see the objects described by the manifests in the Git repo deployed on the cluster.
8189

82-
## Customizing a policy
90+
You should see the namespace and artifacts that were created by the Flux configuration. You should also see the objects described by the manifests in the Git repo deployed on the cluster.
91+
92+
## Customize a policy
8393

8494
The built-in policies cover the main scenarios for using GitOps with Flux v2 in your Kubernetes clusters. However, due to limitations on the number of parameters allowed in Azure Policy assignments (max of 20), not all parameters are present in the built-in policies. Also, to fit within the 20-parameter limit, only a single Kustomization can be created with the built-in policies.
8595

0 commit comments

Comments
 (0)