# Enforcing Policies with Gatekeeper in Kubernetes

DevFeed: [Enforcing Policies with Gatekeeper in Kubernetes](<https://devfeed.tech/articles/enforcing-policies-with-gatekeeper-in-kubernetes-17693.md>)

Original publisher: [Read original article](<https://blog.container-solutions.com/enforcing-policies-with-gatekeeper-in-kubernetes>)

Author: Cameron Wood, Elieser Pereira, Rodrigo Martinez

Published: 2022-06-30T13:34:38Z

Content type: tutorial

Language: en

Sources: [Blog - Container Solutions](<https://devfeed.tech/sources/blog-container-solutions.md>)

Topics: [Kubernetes](<https://devfeed.tech/topics/kubernetes.md>), [Security](<https://devfeed.tech/topics/security.md>), [Open Policy Agent](<https://devfeed.tech/topics/open-policy-agent.md>), [Authorization](<https://devfeed.tech/topics/authorization.md>)

Tags: [best-practices](<https://devfeed.tech/tags/best-practices.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [kubernetes](<https://devfeed.tech/tags/kubernetes.md>), [open-policy-agent](<https://devfeed.tech/tags/open-policy-agent.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [policy](<https://devfeed.tech/tags/policy.md>), [security](<https://devfeed.tech/tags/security.md>), [security-policies](<https://devfeed.tech/tags/security-policies.md>), [wtf-is-cloud-native](<https://devfeed.tech/tags/wtf-is-cloud-native.md>)

## AI overview

This tutorial explains how Gatekeeper works with Kubernetes RBAC to enforce authorization rules and pod security policies. It presents Gatekeeper, based on Open Policy Agent, as a way to add deny rules, protect namespaces, and replace deprecated Pod Security Policies.

## Source excerpt

When managing Kubernetes clusters, cluster administrators need to ensure the overall stability of the system. To accomplish this it is necessary to avoid disruptions to the control plane, and also avoid any risks of users being able to escalate their privileges thus causing further problems. With this in mind, protecting the kube-system namespace and enforcing pod security policies to run payloads with just the necessary access is a must.