This is unreleased documentation for SUSE® Virtualization v1.8 (Dev).

Cluster Pod Security Standards

Starting with v1.8.0, SUSE Virtualization enables cluster administrators to apply Kubernetes Pod Security Standards (PSS) using a global setting. PSS define policies that can be applied to clusters and namespaces to control and restrict how workloads are executed.

Background

If you run bare-metal workloads in large multi-tenant environments, you must prevent privilege escalation. One way to do this is to manually apply PSS by following the steps in this Knowledge Base article. The new cluster-pod-security-standard setting simplifies this setup by allowing cluster-wide enforcement. This setting is disabled by default.

{
  "enabled":false,
  "whitelistedNamespacesList":"",
  "privilegedNamespacesList":"",
  "restrictedNamespacesList":""
}

The setting includes the following fields:

Configuring Pod Security Standards

Cluster-wide PSS can be applied using the cluster-pod-security-standard setting.

  1. Check the current value of the setting.

    kubectl get settings.harvesterhci.io cluster-pod-security-standard
    NAME                            VALUE
    cluster-pod-security-standard
  2. Update the setting as follows:

    kubectl patch settings.harvesterhci.io cluster-pod-security-standard --type='json' -p='[{"op": "replace", "path": "/value", "value": "{\"enabled\":true,\"whitelistedNamespacesList\":\"default\",\"restrictedNamespacesList\":\"demo,restricted-ns\",\"privilegedNamespacesList\":\"demo2,privileged-ns\"}"}]'
  3. Verify that the setting was applied.

    kubectl get settings.harvesterhci.io cluster-pod-security-standard
    NAME                            VALUE
    cluster-pod-security-standard   {"enabled":true,"whitelistedNamespacesList":"default","restrictedNamespacesList":"demo,restricted-ns","privilegedNamespacesList":"demo2,privileged-ns"}