This site will be decommissioned on December 31st 2024. After that date content will be available at techdocs.broadcom.com.

Topic provided by VMware

This topic describes how to enable the SecurityContextDeny admission controller for VMware Tanzu Kubernetes Grid Integrated Edition (TKGI) clusters.

About the SecurityContextDeny Admission Plugin

The SecurityContextDeny admission controller plugin will deny any pod that attempts to set certain escalating Security Context fields.

In Kubernetes, a security context defines privilege and access control settings for a pod or container. The securityContext field is a PodSecurityContext object. For more information, see Set the security context for a Pod in the Kubernetes documentation.

When to Enable the SecurityContextDeny Admission Plugin

The SecurityContextDeny admission plugin should be enabled if a cluster does not use pod security policies (PSPs) to restrict the set of values a security context can take. See Enabling and Using Pod Security Policies for more information.

PSPs are the preferred method for providing a more secure Kubernetes environment. However, PSPs have administrative overhead. Enabling the SecurityContextDeny is a stopgap method of providing a more secure Kubernetes environment when it is not feasible to use PSPs. If you plan to use PSPs in the future, consider enabling the SecurityContextDeny admission plugin as an interim security measure.

Impact of Enabling the SecurityContextDeny Admission Plugin

This section describes the impact of enabling the SecurityContextDeny admission control plugin for new and existing cluster plans.

New Cluster. If you enable the SecurityContextDeny admission plugin in a plan and deploy a new Kubernetes cluster based on that plan, cluster users will not be able to create securityContext capabilities on that cluster.

Existing Cluster. If you enable the SecurityContextDeny admission plugin in a plan and update a Kubernetes cluster, cluster users will no longer be able to create securityContext capabilities on that cluster. This assumes you enable Upgrade all clusters errand or update your cluster individually through the TKGI Command Line Interface (TKGI CLI).

Enabling the SecurityContextDeny Admission Plugin

To enable the SecurityContextDeny admission plugin:

  1. In the TKGI tile, select the desired Plan, such as Plan 1.
  2. At the bottom of the configuration panel, select the SecurityContextDeny option.
    Enabling SecurityContextDeny
  3. Click Save.
  4. On the Installation Dashboard, click Review Pending Changes.
  5. For Tanzu Kubernetes Grid Integrated Edition, verify that Upgrade all clusters errand is enabled.
  6. Click Apply Changes to deploy the cluster with the admission plugin enabled.

Alternatively, instead of enabling Upgrade all clusters errand, you can upgrade individual Kubernetes clusters through the TKGI Command Line Interface (TKGI CLI). For instructions on upgrading individual Kubernetes clusters, see Upgrading Clusters.

check-circle-line exclamation-circle-line close-line
Scroll to top icon