PROFESSIONAL-CLOUD-DEVOPS-ENGINEER practice question 17 of 25

[Building and implementing CI/CD pipelines for a service] Your company is developing applications that are deployed on Google Kubernetes Engine (GKE). Each team manages a different application. You need to create the development and production environments for each team, while minimizing costs. Different teams should not be able to access other teams’ environments. What should you do?

Full set: 205 questions
Answer options
A: Create one GCP Project per team. In each project, create a cluster for Development and one for Production. Grant the teams IAM access to their respective clusters.
B: Create one GCP Project per team. In each project, create a cluster with a Kubernetes namespace for Development and one for Production. Grant the teams IAM access to their respective clusters.
C: Create a Development and a Production GKE cluster in separate projects. In each cluster, create a Kubernetes namespace per team, and then configure Identity Aware Proxy so that each team can only access its own namespace.
D: Create a Development and a Production GKE cluster in separate projects. In each cluster, create a Kubernetes namespace per team, and then configure Kubernetes Role-based access control (RBAC) so that each team can only access its own namespace. Correct answer
Correct Answer:
D. Create a Development and a Production GKE cluster in separate projects. In each cluster, create a Kubernetes namespace per team, and then configure Kubernetes Role-based access control (RBAC) so that each team can only access its own namespace.
Explanation

This approach is the most cost-effective and follows Google's best practices for multi-tenancy and environment separation. Using a single cluster for development and another for production minimizes the overhead of managing multiple cluster control planes. Kubernetes namespaces provide logical isolation within a cluster, and Role-Based Access Control (RBAC) is the standard, granular way to enforce that teams can only interact with resources within their assigned namespace. Separating development and production into distinct projects adds a stronger security and billing boundary.

Why Incorrect

A. Creating two clusters per team is prohibitively expensive and does not align with the goal of minimizing costs.
B. Creating one cluster per team is more expensive than sharing clusters and provides an unnecessary level of isolation for this scenario.
C. Identity-Aware Proxy (IAP) is used to secure web application access, not to control kubectl access to Kubernetes resources within a cluster. RBAC is the correct tool for that purpose.

References

1. Google Cloud Documentation

GKE multi-tenancy: "For many use cases

you can assign each tenant their own namespace. You can then use Kubernetes policies and RBAC to keep tenant workloads isolated." (Section: "Namespaces")

2. Google Cloud Documentation

Best practices for enterprise multi-tenancy: "For strong isolation between tenants

we recommend that you provision each tenant in their own project... For weaker isolation

you can use a single cluster for multiple tenants. In this model

you can use namespaces and RBAC to logically isolate tenants from each other."

3. Kubernetes Documentation

Using RBAC Authorization: "Role-based access control (RBAC) is a method of regulating access to computer or network resources based on the roles of individual users within your organization... In Kubernetes

RBAC is enabled by default in GKE."

Scroll to Top