last sync: 2021-Jul-23 16:37:57 UTC

Azure Policy definition

Kubernetes cluster containers should run with a read only root file system

Name Kubernetes cluster containers should run with a read only root file system
Azure Portal
Id df49d893-a74c-421d-bc95-c663042e5b80
Version 3.0.0
details on versioning
Category Kubernetes
Microsoft docs
Description Run containers with a read only root file system to protect from changes at run-time with malicious binaries being added to PATH in a Kubernetes cluster. This policy is generally available for Kubernetes Service (AKS), and preview for AKS Engine and Azure Arc enabled Kubernetes. For more information, see
Mode Microsoft.Kubernetes.Data
Type BuiltIn
Preview FALSE
Deprecated FALSE
Effect Default: audit
Allowed: (audit, deny, disabled)
Used RBAC Role none
Date/Time (UTC ymd) (i) Change type Change detail
2021-03-02 15:11:40 change Major (2.0.1 > 3.0.0)
2020-12-11 15:42:52 change Major (1.0.1 > 2.0.1)
2020-09-15 14:06:41 change Previous DisplayName: [Preview]: Kubernetes cluster containers should run with a read only root file system
2020-07-08 14:28:08 add df49d893-a74c-421d-bc95-c663042e5b80
Used in Initiatives
Initiative DisplayName Initiative Id Initiative Category State
[Deprecated]: Azure Security Benchmark v2 bb522ac1-bc39-4957-b194-429bcd3bcb0b Regulatory Compliance Deprecated
[Preview]: NIST SP 800-53 Rev. 5 179d1daa-458f-4e47-8086-2a68d0d6c38f Regulatory Compliance Preview
Azure Security Benchmark 1f3afdf9-d0c9-4c3d-847f-89da613e70a8 Security Center GA
FedRAMP High d5264498-16f4-418a-b659-fa7ef418175f Regulatory Compliance GA
FedRAMP Moderate e95f5a9f-57ad-4d03-bb0b-b1d16db93693 Regulatory Compliance GA
NIST SP 800-53 Rev. 4 cf25b9c1-bd23-4eb6-bd2c-f4f3ac644a5f Regulatory Compliance GA
JSON Changes

  "properties": {
    "displayName": "Kubernetes cluster services should only use allowed external IPs",
    "policyType": "BuiltIn",
    "mode": "Microsoft.Kubernetes.Data",
    "description": "Use allowed external IPs to avoid the potential attack (CVE-2020-8554) in a Kubernetes cluster. For more information, see",
    "metadata": {
      "version": "3.0.0",
      "category": "Kubernetes"
    "parameters": {
      "effect": {
        "type": "String",
        "metadata": {
          "displayName": "Effect",
          "description": "'Audit' allows a non-compliant resource to be created or updated, but flags it as non-compliant. 'Deny' blocks the non-compliant resource creation or update. 'Disabled' turns off the policy."
        "allowedValues": [
        "defaultValue": "audit"
      "excludedNamespaces": {
        "type": "Array",
        "metadata": {
          "displayName": "Namespace exclusions",
          "description": "List of Kubernetes namespaces to exclude from policy evaluation. Providing a value for this parameter is optional."
        "defaultValue": [
      "namespaces": {
        "type": "Array",
        "metadata": {
          "displayName": "Namespace inclusions",
          "description": "List of Kubernetes namespaces to only include in policy evaluation. An empty list means the policy is applied to all resources in all namespaces."
        "defaultValue": [
      "labelSelector": {
        "type": "Object",
        "metadata": {
          "displayName": "Kubernetes label selector",
          "description": "Label query to select Kubernetes resources for policy evaluation. An empty label selector matches all Kubernetes resources."
        "defaultValue": {
      "allowedExternalIPs": {
        "type": "Array",
        "metadata": {
          "displayName": "Allowed External IPs",
          "description": "List of External IPs that services are allowed to use. Empty array means all external IPs are disallowed."
        "defaultValue": [
    "policyRule": {
      "if": {
        "field": "type",
        "in": [
          "AKS Engine",
      "then": {
      "effect": "[parameters('effect')]",
        "details": {
          "constraintTemplate": "",
          "constraint": "",
        "excludedNamespaces": "[parameters('excludedNamespaces')]",
        "namespaces": "[parameters('namespaces')]",
        "labelSelector": "[parameters('labelSelector')]",
          "values": {
          "allowedExternalIPs": "[parameters('allowedExternalIPs')]"
  "id": "/providers/Microsoft.Authorization/policyDefinitions/d46c275d-1680-448d-b2ec-e495a3b6cc89",
  "type": "Microsoft.Authorization/policyDefinitions",
  "name": "d46c275d-1680-448d-b2ec-e495a3b6cc89"