How to Implement Least Privilege for Developers Using CloudNativePG?

0
11
Asked By TechieLizard42 On

Hello everyone! I'm part of the operations team overseeing some Kubernetes clusters. The development team has requested to install and manage the CloudNativePG operator within a specific namespace so they can deploy PostgreSQL for their development needs. However, this raises concerns regarding the necessary cluster role for managing the Custom Resource Definitions (CRDs), which is against our company's policy. I'm looking for alternative ways to enable the developers to self-manage the CloudNativePG operator while adhering to the least privilege principle. Any suggestions?

5 Answers

Answered By KubeNerd On

Consider leveraging tools like Kyverno or OPA to restrict the namespaces where they can deploy the CloudNativePG operator. This could help enforce your least privilege approach.

Answered By DevOpsWhiz On

I think it's best for your team to manage the operator. The developers should be focusing on utilizing it rather than operating it themselves.

Answered By PostgresPro On

Yes, the easy route is to limit their permissions to just the Custom Resources and ConfigMaps. This allows them to create and configure managed clusters without giving them broader access, and they won’t need to interact with the cnpg-system namespace either. You can handle the operator management while they just focus on their own resources.

Answered By CodeCrafter99 On

One option is to provide the developers with a 'fake' cluster that they can fully own without any access to the real one. At a previous company, we used vCluster to create virtual Kubernetes clusters for development teams. This way, they had the freedom to install CRDs and Operators without affecting the main cluster. It alleviates the headaches of managing multi-tenancy as they can do whatever they want on their virtual environment!

Answered By CloudGenius21 On

You don’t have to use the service account and cluster role that comes with the CloudNativePG Helm chart. You can create your own service account and attach it directly to the pod instead. This gives you more control over what they can access.

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.