How Can We Implement RBAC for CloudNativePG with Least Privilege?

0
23
Asked By TechieTurtle84 On

Hey everyone! I'm part of the ops team that's managing a few Kubernetes clusters. The development team has requested permission to install and handle the CloudNativePG operator in a specific namespace for deploying PostgreSQL in their development area. However, creating a cluster role for managing the Custom Resource Definitions (CRDs) goes against our company's policy. I'm wondering if there are other ways we can allow the developers to manage the CloudNativePG operator themselves while adhering to the principle of least privilege?

5 Answers

Answered By K8sNinja44 On

Consider using tools like Kyverno or OPA to establish restrictions on which namespaces they can deploy to. This way, you maintain control while still giving them a degree of autonomy.

Answered By DatabaseDynamo21 On

From my perspective, managing the CloudNativePG operator is your responsibility. The dev team should receive just enough permissions to create and manage CloudNativePG clusters in their namespaces, without needing access to anything else.

Answered By CloudGuru77 On

Honestly, it's not really the development team's role to manage the operator; that falls under the ops team. Their focus should be on utilizing it, not operating it.

Answered By SRE_Sammy On

You don’t necessarily have to use the service account and cluster role specified in the CloudNativePG Helm chart. Instead, create a new service account with tailored permissions and assign it to the pod instead.

Answered By DevOpsWizard92 On

One option could be to set up a separate, pseudo cluster just for the developers. This way, they would have ownership without risking any impact on the real cluster. At a previous company, we implemented vCluster to create virtual Kubernetes clusters for development teams. It allows them to install CRDs and operators freely while we handle the main cluster's management.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.