Example

Enterprise Kubernetes RBAC & Security Setup for AWS EKS

Scenario: Multi-Team Access Control in an Enterprise

An enterprise XYZ Corp is using AWS EKS for managing applications. They have multiple teams with different access levels:

Team
Responsibilities
Access Required

Platform Admins

Manage EKS, Nodes, Networking, Security

Full Cluster Admin

DevOps Engineers

Manage Deployments, CI/CD, Infra

Limited Admin (Can Deploy, Manage Nodes)

Developers

Deploy & Monitor Apps, No Infra Access

App Deployment Only

QA Testers

Run Tests, Debug, View Logs

Read-Only to Apps

Security Team

Monitor Logs, Audit Access

Read-Only to Everything

Solution: AWS IAM + Kubernetes RBAC

We'll use: ✅ AWS IAM roles for Authentication ✅ Kubernetes RBAC for Authorization ✅ Service Accounts for Secure App Access


Step 1: Define IAM Roles for Teams

🔹 1️⃣ Platform Admins IAM Role

aws iam create-role --role-name EKSPlatformAdmin \
    --assume-role-policy-document file://admin-trust-policy.json

🔹 2️⃣ DevOps Engineers IAM Role

🔹 3️⃣ Developers IAM Role

🔹 4️⃣ QA Testers IAM Role

🔹 5️⃣ Security Team IAM Role


Step 2: Map IAM Roles to Kubernetes RBAC

🔹 Edit the AWS Auth ConfigMap

Add IAM Role Mappings:

✅ Now, IAM users are mapped to Kubernetes RBAC groups.


Step 3: Create Kubernetes RBAC Roles & Bindings

1️⃣ Platform Admins (Full Cluster Access)

Platform Admins can manage everything.


2️⃣ DevOps Engineers (Limited Admin)

DevOps can manage applications, but not cluster settings.


3️⃣ Developers (Namespace-Scoped Access)

Developers can only access resources in the dev-team namespace.


4️⃣ QA Testers (Read-Only Access)

QA can only view applications, not modify them.


5️⃣ Security Team (Audit Logs & Read-Only to Everything)

Security team can audit logs but cannot modify anything.


Step 4: Verify Access for Teams

1️⃣ Check Platform Admin Access

Should return "yes"

2️⃣ Check Developer Access

Should return "yes"

3️⃣ Check QA Tester Access

Should return "no"


Conclusion: Secure & Organized Access

Admins manage the full clusterDevOps manages deployments, not core infraDevelopers deploy apps, but only in their namespaceQA team can read data but not modifySecurity team can monitor but not deploy


🚀 NEXT: Do you want to add Network Policies for this setup?

Last updated