Course contentsShow
← Cloud and Infrastructure
Lesson 1385 of 2,98928. Kubernetes SecurityFree lesson

Default ClusterRoles

Explore built-in ClusterRoles like cluster-admin, admin, edit, and view.

Default ClusterRoles

What you'll learn: Understand Kubernetes' built-in ClusterRoles and when to use each one.

The Built-In Security Framework

Kubernetes ships with several pre-configured ClusterRoles that cover common access patterns, saving you from writing RBAC rules from scratch. Think of these as "security templates" that handle typical use cases—from full cluster administration to read-only viewing. These default ClusterRoles are production-ready and follow security best practices.

The Four Primary Default ClusterRoles

cluster-admin — The superuser role with unrestricted access to all resources across the entire cluster. Use this sparingly and only for actual cluster administrators. Binding this to a ServiceAccount or user grants complete control.

admin — Namespace-scoped administrative access. Users with this role can read and write most resources within a namespace, including Roles and RoleBindings. However, they cannot modify the namespace itself or access cluster-wide resources. Perfect for application team leads managing their own namespace.

edit — Similar to admin but without RBAC modification privileges. Users can create, update, and delete application resources (Deployments, Services, ConfigMaps) but cannot change security policies or grant permissions. Ideal for developers actively working on applications.

view — Read-only access to most resources in a namespace. Users can see Deployments, Pods, Services, and ConfigMaps but cannot make changes. Excludes viewing Secrets and Roles to prevent information leakage. Great for auditors, junior developers, or monitoring tools.

Choosing the Right Role

The hierarchy follows the principle of least privilege: view < edit < admin < cluster-admin. Start users with the minimum permissions needed, then escalate only when justified.

Key Takeaway: Kubernetes provides four essential default ClusterRoles (cluster-admin, admin, edit, view) that cover most access scenarios without requiring custom RBAC configurations—use them as building blocks for secure, role-based access control.