Skip to content

Commit e592aa6

Browse files
Merge pull request #261611 from davidsmatlak/ds-policy-anchors
Remove HTML anchor from Policy AKS doc
2 parents f23bd78 + 66fef59 commit e592aa6

File tree

1 file changed

+33
-32
lines changed

1 file changed

+33
-32
lines changed

articles/governance/policy/concepts/policy-for-kubernetes.md

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,23 @@ author: davidsmatlak
1212
Azure Policy extends [Gatekeeper](https://open-policy-agent.github.io/gatekeeper) v3, an _admission
1313
controller webhook_ for [Open Policy Agent](https://www.openpolicyagent.org/) (OPA), to apply at-scale enforcements and safeguards on your cluster components in a centralized, consistent manner. Cluster components include pods, containers, and namespaces.
1414

15-
Azure Policy makes it possible to manage and report on the compliance state of your Kubernetes cluster components from one place. By using Azure Policy's Add-On or Extension, governing your cluster components is enhanced with Azure Policy features, like the ability to use [selectors](./assignment-structure.md#resource-selectors-preview) and [overrides](./assignment-structure.md#overrides-preview) for safe policy rollout and rollback.
15+
Azure Policy makes it possible to manage and report on the compliance state of your Kubernetes cluster components from one place. By using Azure Policy's Add-On or Extension, governing your cluster components is enhanced with Azure Policy features, like the ability to use [selectors](./assignment-structure.md#resource-selectors-preview) and [overrides](./assignment-structure.md#overrides-preview) for safe policy rollout and rollback.
1616

1717
Azure Policy for Kubernetes supports the following cluster environments:
1818

19-
- [Azure Kubernetes Service (AKS)](../../../aks/intro-kubernetes.md), through **Azure Policys **Add-On** for AKS**
20-
- [Azure Arc enabled Kubernetes](../../../azure-arc/kubernetes/overview.md), through **Azure Policys **Extension** for Arc**
19+
- [Azure Kubernetes Service (AKS)](../../../aks/intro-kubernetes.md), through **Azure Policy's **Add-On** for AKS**
20+
- [Azure Arc enabled Kubernetes](../../../azure-arc/kubernetes/overview.md), through **Azure Policy's **Extension** for Arc**
2121

2222
> [!IMPORTANT]
2323
> The Azure Policy Add-on Helm model and the add-on for AKS Engine have been _deprecated_. Follow the instructions to [remove the add-ons](#remove-the-add-on).
2424
2525
## Overview
2626

27-
By installing Azure Policys add-on or extension on your Kubernetes clusters, Azure Policy enacts the following functions:
27+
By installing Azure Policy's add-on or extension on your Kubernetes clusters, Azure Policy enacts the following functions:
2828

29-
- Checks with Azure Policy service for policy assignments to the cluster.
30-
- Deploys policy definitions into the cluster as [constraint template](https://open-policy-agent.github.io/gatekeeper/website/docs/howto/#constraint-templates) and [constraint](https://open-policy-agent.github.io/gatekeeper/website/docs/howto/#constraints) custom resources or as a mutation template resource (depending on policy definition content).
31-
- Reports auditing and compliance details back to Azure Policy service.
29+
- Checks with Azure Policy service for policy assignments to the cluster.
30+
- Deploys policy definitions into the cluster as [constraint template](https://open-policy-agent.github.io/gatekeeper/website/docs/howto/#constraint-templates) and [constraint](https://open-policy-agent.github.io/gatekeeper/website/docs/howto/#constraints) custom resources or as a mutation template resource (depending on policy definition content).
31+
- Reports auditing and compliance details back to Azure Policy service.
3232

3333
To enable and use Azure Policy with your Kubernetes cluster, take the following actions:
3434

@@ -68,7 +68,7 @@ To enable and use Azure Policy with your Kubernetes cluster, take the following
6868
1. You need the Azure CLI version 2.12.0 or later installed and configured. Run `az --version` to
6969
find the version. If you need to install or upgrade, see
7070
[Install the Azure CLI](../../../azure-resource-manager/management/resource-providers-and-types.md#azure-cli).
71-
71+
7272
1. The AKS cluster must be a [supported Kubernetes version in Azure Kubernetes Service (AKS)](../../../aks/supported-kubernetes-versions.md). Use the following script to validate your AKS
7373
cluster version:
7474
@@ -134,9 +134,10 @@ similar to the following output:
134134
"identity": null
135135
}
136136
```
137-
## <a name="install-azure-policy-extension-for-azure-arc-enabled-kubernetes"></a>Install Azure Policy Extension for Azure Arc enabled Kubernetes
138137

139-
[Azure Policy for Kubernetes](./policy-for-kubernetes.md) makes it possible to manage and report on the compliance state of your Kubernetes clusters from one place. With Azure Policy's Extension for Arc-enabled Kubernetes clusters, you can govern your Arc-enabled Kubernetes cluster components, like pods and containers.
138+
## Install Azure Policy Extension for Azure Arc enabled Kubernetes
139+
140+
[Azure Policy for Kubernetes](./policy-for-kubernetes.md) makes it possible to manage and report on the compliance state of your Kubernetes clusters from one place. With Azure Policy's Extension for Arc-enabled Kubernetes clusters, you can govern your Arc-enabled Kubernetes cluster components, like pods and containers.
140141

141142
This article describes how to [create](#create-azure-policy-extension), [show extension status](#show-azure-policy-extension), and [delete](#delete-azure-policy-extension) the Azure Policy for Kubernetes extension.
142143

@@ -285,12 +286,12 @@ az k8s-extension delete --cluster-type connectedClusters --cluster-name <CLUSTER
285286
## Create a policy definition
286287

287288
The Azure Policy language structure for managing Kubernetes follows that of existing policy
288-
definitions. There are sample definition files available to assign in [Azure Policy's built-in policy library](../samples/built-in-policies.md) that can be used to govern your cluster components.
289+
definitions. There are sample definition files available to assign in [Azure Policy's built-in policy library](../samples/built-in-policies.md) that can be used to govern your cluster components.
289290

290291
Azure Policy for Kubernetes also support custom definition creation at the component-level for both Azure Kubernetes Service clusters and Azure Arc-enabled Kubernetes clusters. Constraint template and mutation template samples are available in the [Gatekeeper community library](https://github.com/open-policy-agent/gatekeeper-library/tree/master). [Azure Policy's VS Code Extension](../how-to/extension-for-vscode.md#create-policy-definition-from-a-constraint-template-or-mutation-template) can be used to help translate an existing constraint template or mutation template to a custom Azure Policy policy definition.
291292

292293
With a [Resource Provider mode](./definition-structure.md#resource-provider-modes) of
293-
`Microsoft.Kubernetes.Data`, the effects [audit](./effects.md#audit), [deny](./effects.md#deny), [disabled](./effects.md#disabled), and [mutate](./effects.md#mutate-preview) are used to manage your Kubernetes clusters.
294+
`Microsoft.Kubernetes.Data`, the effects [audit](./effects.md#audit), [deny](./effects.md#deny), [disabled](./effects.md#disabled), and [mutate](./effects.md#mutate-preview) are used to manage your Kubernetes clusters.
294295

295296
_Audit_ and _deny_ must provide **details** properties
296297
specific to working with
@@ -574,39 +575,39 @@ For Azure Policy related issues, go to:
574575
- [General troubleshooting for Azure Policy on Kubernetes](../troubleshoot/general.md#add-on-for-kubernetes-general-errors)
575576
576577
## Azure Policy Add-On for AKS Changelog
577-
Azure Policys Add-On for AKS has a version number that indicates the image version of add-on. As feature support is newly introduced on the Add-On, the version number is increased.
578+
Azure Policy's Add-On for AKS has a version number that indicates the image version of add-on. As feature support is newly introduced on the Add-On, the version number is increased.
578579
579580
This section will help you identify which Add-On version is installed on your cluster and also share a historical table of the Azure Policy Add-On version installed per AKS cluster.
580581
581-
### Identify which Add-On version is installed on your cluster
582+
### Identify which Add-On version is installed on your cluster
582583
583584
The Azure Policy Add-On uses the standard [Semantic Versioning](https://semver.org/) schema for each version. To identify the Azure Policy Add-On version being used, you can run the following command:
584-
`kubectl get pod azure-policy-<unique-pod-identifier> -n kube-system -o json | jq '.spec.containers[0].image'`
585+
`kubectl get pod azure-policy-<unique-pod-identifier> -n kube-system -o json | jq '.spec.containers[0].image'`
585586

586-
To identify the Gatekeeper version that your Azure Policy Add-On is using, you can run the following command:
587+
To identify the Gatekeeper version that your Azure Policy Add-On is using, you can run the following command:
587588
`kubectl get pod gatekeeper-controller-<unique-pod-identifier> -n gatekeeper-system -o json | jq '.spec.containers[0].image' `
588589

589590
Finally, to identify the AKS cluster version that you are using, follow the linked AKS guidance for this.
590591

591592
### Add-On versions available per each AKS cluster version
592593

593-
#### 1.2.1
594-
- Released October 2023
595-
- Kubernetes 1.25+
594+
#### 1.2.1
595+
- Released October 2023
596+
- Kubernetes 1.25+
596597
- Gatekeeper 3.13.3
597598

598-
#### 1.1.0
599-
- Released July 2023
600-
- Kubernetes 1.27+
601-
- Gatekeeper 3.11.1
599+
#### 1.1.0
600+
- Released July 2023
601+
- Kubernetes 1.27+
602+
- Gatekeeper 3.11.1
602603

603-
#### 1.0.1
604-
- Released June 2023
605-
- Kubernetes 1.24+
606-
- Gatekeeper 3.11.1
604+
#### 1.0.1
605+
- Released June 2023
606+
- Kubernetes 1.24+
607+
- Gatekeeper 3.11.1
607608

608609
#### 1.0.0
609-
Azure Policy for Kubernetes now supports mutation to remediate AKS clusters at-scale!
610+
Azure Policy for Kubernetes now supports mutation to remediate AKS clusters at-scale!
610611

611612
## Remove the add-on
612613

@@ -681,11 +682,11 @@ aligns with how the add-on was installed:
681682
- Maximum number of Non-compliant records per subscription: **1 million**
682683
- Installations of Gatekeeper outside of the Azure Policy Add-on aren't supported. Uninstall any components installed by a previous Gatekeeper installation before enabling the Azure Policy Add-on.
683684
- [Reasons for non-compliance](../how-to/determine-non-compliance.md#compliance-reasons) aren't available for the Microsoft.Kubernetes.Data [Resource Provider mode](./definition-structure.md#resource-provider-modes). Use [Component details](../how-to/determine-non-compliance.md#component-details-for-resource-provider-modes).
684-
- Component-level [exemptions](./exemption-structure.md) arent supported for [Resource Provider modes](./definition-structure.md#resource-provider-modes). Parameters support is available in Azure Policy definitions to exclude and include particular namespaces.
685+
- Component-level [exemptions](./exemption-structure.md) aren't supported for [Resource Provider modes](./definition-structure.md#resource-provider-modes). Parameters support is available in Azure Policy definitions to exclude and include particular namespaces.
685686

686687
The following limitations apply only to the Azure Policy Add-on for AKS:
687-
- [AKS Pod security policy](../../../aks/use-pod-security-policies.md) and the Azure Policy Add-on for AKS can't both be enabled. For more information, see [AKS pod security limitation](../../../aks/use-azure-policy.md).
688-
- Namespaces automatically excluded by Azure Policy Add-on for evaluation: kube-system and gatekeeper-system.
688+
- [AKS Pod security policy](../../../aks/use-pod-security-policies.md) and the Azure Policy Add-on for AKS can't both be enabled. For more information, see [AKS pod security limitation](../../../aks/use-azure-policy.md).
689+
- Namespaces automatically excluded by Azure Policy Add-on for evaluation: kube-system and gatekeeper-system.
689690

690691
## Frequently asked questions
691692

@@ -726,7 +727,7 @@ collected:
726727
evaluation
727728
- Number of Gatekeeper policy definitions not installed by Azure Policy Add-on
728729

729-
### What are general best practices to keep in mind when installing the Azure Policy Add-On?
730+
### What are general best practices to keep in mind when installing the Azure Policy Add-On?
730731
- Use system node pool with CriticalAddonsOnly taint to schedule Gatekeeper pods. For more information, see [Using system node pools](../../../aks/use-system-pools.md#system-and-user-node-pools).
731732
- Secure outbound traffic from your AKS clusters. For more information, see [Control egress traffic](../../../aks/limit-egress-traffic.md) for cluster nodes.
732733
- If the cluster has aad-pod-identity enabled, Node Managed Identity (NMI) pods modify the nodes' iptables to intercept calls to the Azure Instance Metadata endpoint. This configuration means any request made to the Metadata endpoint is intercepted by NMI even if the pod doesn't use aad-pod-identity.

0 commit comments

Comments
 (0)