Kubeflow Roles (aggregated RBAC)
Basic information
Section titled “Basic information”| Item | Value |
|---|---|
| Version | Not versioned separately; based on the community-distribution release-26.03.1 default Kubeflow ClusterRoles |
| Official docs | Kubernetes RBAC, ClusterRole aggregation |
| Upstream source | common/kubeflow-roles/base |
Concepts and characteristics
Section titled “Concepts and characteristics”Kubeflow creates a Profile namespace per user and grants permissions so that the user can work with resources such as Notebook, Pipeline, and InferenceService inside that namespace. Instead of writing every app permission directly into one giant role, it uses Kubernetes ClusterRole aggregation. kubeflow-admin, kubeflow-edit, and kubeflow-view are empty containers, and the rules of other ClusterRoles with specific labels are merged into them automatically by a Kubernetes controller.
A ClusterRole normally lists its permissions directly in rules, but these anchor roles have empty rules and only a label condition (aggregationRule). The Kubernetes RBAC aggregation controller finds the rules of other ClusterRoles with that label and copies them into the empty role automatically. So a component only needs to add one label line to its own ClusterRole, and its permissions are absorbed without modifying the central role.
# 빈 그릇: 권한을 직접 적지 않고 "이 label 붙은 role 을 합쳐라"만 선언한다kind: ClusterRolemetadata: name: kubeflow-adminaggregationRule: clusterRoleSelectors: - matchLabels: rbac.authorization.kubeflow.org/aggregate-to-kubeflow-admin: "true"rules: [] # controller 가 자동으로 채운다---# component 는 이 label 한 줄만 붙이면 권한이 kubeflow-admin 으로 자동 흡수된다kind: ClusterRolemetadata: name: kubeflow-kserve-admin labels: rbac.authorization.kubeflow.org/aggregate-to-kubeflow-admin: "true"rules: - apiGroups: ["serving.kserve.io"] resources: ["inferenceservices"] verbs: ["*"]Once the second role exists, Kubernetes automatically folds its rules into kubeflow-admin. Users do not work directly against the whole cluster; they work inside profile namespaces, so the platform needs a stable RBAC vocabulary for “admin”, “edit”, and “view” within a Kubeflow profile.
What the component establishes
Section titled “What the component establishes”- Three anchor ClusterRoles:
kubeflow-admin,kubeflow-edit,kubeflow-view. Each role has only anaggregationRule. - Three base Kubernetes permission roles:
kubeflow-kubernetes-admin,kubeflow-kubernetes-edit,kubeflow-kubernetes-view. They provide admin/edit/view permissions for ordinary Kubernetes resources such as Pod, Deployment, Service, PVC, Secret, and NetworkPolicy. - Inheritance structure:
kubeflow-viewis merged intokubeflow-edit, andkubeflow-editis merged intokubeflow-admin. So admin includes the permissions of the edit/view layers.
So an admin automatically includes edit and view behavior, and an editor automatically includes view behavior. This inheritance is implemented by labels on the roles themselves, not by a separate custom mechanism.
Role in Kubeflow
Section titled “Role in Kubeflow”Background
Section titled “Background”When the Profile controller and KFAM connect a user to a Profile namespace, they create RoleBindings based on the Kubeflow roles. Without the ClusterRoles from this stage, later components that extend their permissions by label would have nothing to merge into. In other words, this component first creates the common vocabulary for user namespace RBAC.
Key contributions
Section titled “Key contributions”- Multi-tenancy permission baseline: provides the base hierarchy of what a user can view, create, and manage within their own Profile namespace.
- Extension point for component permissions: Istio, Knative, KServe, Katib, Pipelines, Notebooks, Trainer, and others add permissions to these anchor roles by attaching
aggregate-to-kubeflow-*labels to their own ClusterRoles. - Basis for Profile owner permissions: when a Profile is reconciled, namespace-scoped RoleBindings are created for the owner and the default ServiceAccounts, and the common ClusterRole system those RoleBindings can reference is prepared at this stage.
If all permissions were maintained in one giant static ClusterRole, every component would have to coordinate direct edits to the same file. Aggregation avoids that coupling, and Kubeflow’s core roles grow automatically as new components are installed. This component does not grant every final permission by itself, but it defines the durable role hierarchy that the rest of the platform plugs into.
Deployment structure
Section titled “Deployment structure”Overlay composition
Section titled “Overlay composition”overlays/dev/kubeflow/common/roles references common/kubeflow-roles/base as is. There is no separate patch.
overlays/dev/kubeflow/common/roles -> common/kubeflow-roles/base -> cluster-roles.yamlThis stage creates no workloads. It only creates cluster-scoped RBAC resources that do not depend on any namespace.
Aggregation label rules
Section titled “Aggregation label rules”| Merge target | Selector label | Representative contributors |
|---|---|---|
kubeflow-admin | rbac.authorization.kubeflow.org/aggregate-to-kubeflow-admin: "true" | kubeflow-kubernetes-admin, kubeflow-istio-admin, per-component admin roles |
kubeflow-edit | rbac.authorization.kubeflow.org/aggregate-to-kubeflow-edit: "true" | kubeflow-kubernetes-edit, kubeflow-kserve-edit, per-component edit roles |
kubeflow-view | rbac.authorization.kubeflow.org/aggregate-to-kubeflow-view: "true" | kubeflow-kubernetes-view, kubeflow-kserve-view, per-component view roles |
kubeflow-edit itself carries the aggregate-to-kubeflow-admin: "true" label, and kubeflow-view itself carries the aggregate-to-kubeflow-edit: "true" label. Because of these labels, view permissions are included in edit, and edit permissions in admin, step by step.
Deployment view
Section titled “Deployment view”Resource placement
Section titled “Resource placement”| Namespace | Resource | Name | Purpose |
|---|---|---|---|
| (cluster) | ClusterRole | kubeflow-admin | Anchor role that aggregates admin permissions |
| (cluster) | ClusterRole | kubeflow-edit | Anchor role that aggregates edit permissions and is included in admin |
| (cluster) | ClusterRole | kubeflow-view | Anchor role that aggregates view permissions and is included in edit |
| (cluster) | ClusterRole | kubeflow-kubernetes-admin | Permissions to manage Role/RoleBinding and create access reviews |
| (cluster) | ClusterRole | kubeflow-kubernetes-edit | Permissions to create/update/delete namespace resources such as Pod, workload, Service, Secret, PVC |
| (cluster) | ClusterRole | kubeflow-kubernetes-view | Permissions to read namespace resources such as Pod, workload, Service, PVC, event, status |
Diagram
Section titled “Diagram”PlantUML source:
Dependencies and interactions
Section titled “Dependencies and interactions”Upstream / downstream
Section titled “Upstream / downstream”- Upstream: none. It only creates cluster-scoped RBAC, so it can be applied without any namespace or workload.
- Downstream (extends these roles): per-component user-facing ClusterRoles such as kubeflow-istio-resources, Knative, KServe, Katib, Pipelines, Notebooks, and Trainer.
- Downstream (binds these roles): Dashboard/Profiles/KFAM and user Profiles. After a Profile is reconciled, users receive permissions in their own namespace through these anchor roles.
Runtime interaction
Section titled “Runtime interaction”This component itself creates no Pods. The Kubernetes RBAC aggregation controller continuously evaluates label selectors and updates the effective rules of kubeflow-admin, kubeflow-edit, and kubeflow-view. When a new component is installed later and adds a ClusterRole with a label such as aggregate-to-kubeflow-view, its permissions are reflected in the existing Kubeflow roles without any manual merge.
That means the RBAC surface of an existing profile can grow as new Kubeflow components are installed, even without rewriting the original core roles.
Key resources
Section titled “Key resources”kubeflow-admin/kubeflow-edit/kubeflow-view: anchor ClusterRoles that users reference directly. Their rules are empty and they are built from an aggregationRule.kubeflow-kubernetes-admin: provides the admin layer with permissions to manage Role/RoleBinding within the namespace and to createLocalSubjectAccessReview.kubeflow-kubernetes-edit: provides the edit layer with write permissions for ordinary namespace resources such as Pod exec/portforward, Secret, Service, PVC, Deployment, Job, and NetworkPolicy.kubeflow-kubernetes-view: provides the view layer with read permissions for ordinary namespace resources such as Pod, log, Service, PVC, workload status, and event.
References
Section titled “References”- Overlay:
overlays/dev/kubeflow/common/roles - Related documents: