User Profile (kubeflow-user-example-com)
Basic information
Section titled “Basic information”| Item | Value |
|---|---|
| Version | Not applicable (community-distribution release-26.03.1 user namespace example + dev overlay) |
| Official docs | Kubeflow Profiles |
| Upstream source | common/user-namespace/base |
Concepts and characteristics
Section titled “Concepts and characteristics”A Profile is the user unit of Kubeflow multi-tenancy. A single Profile CR is the declaration “prepare this namespace for this user,” and the profile-controller reconciles it into the actual namespace and permission resources. This repository uses the upstream example Profile as is, but bundles the human admin permission, the platform-api ServiceAccount, a permanent token, the serving AuthorizationPolicy, and a PodSecurity label hook needed for dev operation into the same profile directory.
The profile does not merely create a namespace. Around that namespace, the overlay also adds development conveniences and machine-access wiring that the upstream example does not include by default.
What the component establishes
Section titled “What the component establishes”- Profile CR: The
kubeflow-user-example-comProfile. The owner isUseruser@example.com. - Profile namespace: The profile-controller creates the namespace of the same name,
kubeflow-user-example-com. - Human admin RBAC: Binds
user@example.comtocluster-adminfor dev convenience. - platform-api M2M credential: The
platform-apiServiceAccount, a non-expiring legacy token Secret, and thekubeflow-adminClusterRoleBinding. - Serving predictor access:
platform-api-serving-accessletsplatform-apipass the KServe predictor sidecar AuthorizationPolicy. - Profile namespace PodSecurity label: Because the Profile namespace is created asynchronously, a retrying PSS labeler Job applies the
pod-security.kubernetes.io/enforce=baselinelabel. It carries an ArgoCD hook annotation, but in the dev manual apply it is created immediately as a normal Job.
Role in Kubeflow
Section titled “Role in Kubeflow”Background
Section titled “Background”At the Dashboard stage, the Profile CRD and controller are ready, but no actual user namespace exists yet. When this stage applies the Profile CR, the profile-controller creates the namespace, and Dashboard/KFAM can show this namespace to the user. After that, components such as Notebooks, Pipelines, KServe, and Model Registry create user workloads or per-user resources on the premise that this Profile namespace exists.
This step is where Kubeflow’s multi-tenant control plane becomes a concrete workspace for a specific user. This overlay takes Kubeflow’s abstract profile machinery and turns it into an actual, usable user workspace. It also shows the real-world additions that often surround an example profile in practice: machine credentials, serving exceptions, and post-reconcile operational fixups.
Key contributions
Section titled “Key contributions”- Materializing the user namespace: The
kubeflow-user-example-comnamespace is created, providing a space to receive later user workloads and namespace-scoped resources. - Multi-user RBAC wiring: The owner
user@example.comis registered as the Profile owner, and the Profile controller creates the default RoleBindings and Istio AuthorizationPolicy. - Automation credential: Provides the
platform-apitoken so that an external backend/CI can call Kubeflow APIs through the gateway. - Serving M2M correction: Adds a separate ALLOW policy so that the
kubeflow-useridofplatform-apipasses the predictor sidecar authz on the KServe serving 2-hop path. - Prerequisite for later components: Model Registry is installed in the profile namespace
kubeflow-user-example-com, so this stage must be reconciled first.
Deployment structure
Section titled “Deployment structure”Overlay layout
Section titled “Overlay layout”The top-level overlay is an index that collects per-profile subdirectories. When a new Profile is needed, add a directory with the same structure and put it in the resources of overlays/dev/kubeflow-profile/kustomization.yaml.
overlays/dev/kubeflow-profile -> kubeflow-user-example-com -> common/user-namespace/base -> profile/postsync-pss-label.yaml -> rbac/user-clusterrolebinding.yaml -> platform-api/platform-api-token.yaml -> platform-api/serving-authorizationpolicy.yamlWhat the profile-controller creates
Section titled “What the profile-controller creates”common/user-namespace/base contains only the Profile CR. The rest is reconciled by the profile-controller. This split is important: Git applies the intent, and the controller materializes the concrete namespace objects asynchronously.
| Created by | Resource | Name / scope | Role |
|---|---|---|---|
| Git overlay | Profile | kubeflow-user-example-com | Declares owner user@example.com |
| profile-controller | Namespace | kubeflow-user-example-com | User workload namespace |
| profile-controller | ServiceAccount | default-editor, default-viewer | Default SAs of the user namespace |
| profile-controller | RoleBinding | Inside the namespace | Binds permissions for the owner and default SAs |
| profile-controller | AuthorizationPolicy | ns-owner-access-istio and others | Owner-based Istio access |
What this repository adds
Section titled “What this repository adds”| File | Resource | Role |
|---|---|---|
rbac/user-clusterrolebinding.yaml | ClusterRoleBinding kubeflow-user-example-com-cluster-admin | Grants dev cluster-admin to user@example.com |
platform-api/platform-api-token.yaml | ServiceAccount platform-api | Identity for API automation |
platform-api/platform-api-token.yaml | Secret platform-api-token | Non-expiring legacy ServiceAccount token |
platform-api/platform-api-token.yaml | ClusterRoleBinding platform-api-kubeflow-admin | Grants platform-api admin rights on Kubeflow resources across all profiles |
platform-api/serving-authorizationpolicy.yaml | AuthorizationPolicy platform-api-serving-access | Allows platform-api calls at the predictor sidecar |
profile/postsync-pss-label.yaml | PSS labeler Job/RBAC | Waits for the Profile namespace, then applies the PodSecurity baseline label |
The cluster-admin binding for user@example.com is explicitly a dev choice, not a production best practice. The platform-api token is intended for backend or CI use through the gateway.
KServe serving traffic has a special authorization wrinkle. The profile owner’s usual allow policy expects the interactive user’s identity, often based on email. But the platform-api ServiceAccount identifies itself as system:serviceaccount:kubeflow-user-example-com:platform-api. That identity does not match the profile owner’s email-based rule, so predictor-side authorization would reject it unless an additional allow policy exists. platform-api/serving-authorizationpolicy.yaml adds platform-api-serving-access for that reason.
Security trade-off of the platform-api credential
Section titled “Security trade-off of the platform-api credential”The legacy token Secret itself also has problems.
- Kubernetes 1.29+ enables
LegacyServiceAccountTokenCleanUpby default, which automatically deletes legacy token Secrets that have not been used for one year. An automation credential that is not called regularly can silently disappear one day. - Legacy tokens issued by the
kubernetes/serviceaccountissuer have noaudclaim. Therefore audience validation is impossible at the gateway or sidecar, and the token can be reused as is against endpoints it was never intended for.
The recommended path is to obtain a bound token with a specified audience through the TokenRequest API. It has an expiry, it carries aud so the receiver can validate the audience, and it is bound to a target object so it is easy to revoke.
Deployment view
Section titled “Deployment view”Resource Placement
Section titled “Resource Placement”| Namespace | Resource | Name | Role |
|---|---|---|---|
| (cluster) | Profile | kubeflow-user-example-com | Profile declaration for owner user@example.com |
| (cluster) | Namespace | kubeflow-user-example-com | User namespace created by the profile-controller |
| (cluster) | ClusterRoleBinding | kubeflow-user-example-com-cluster-admin | Human admin permission |
kubeflow-user-example-com | ServiceAccount | platform-api | M2M API caller |
kubeflow-user-example-com | Secret | platform-api-token | Legacy SA token credential |
| (cluster) | ClusterRoleBinding | platform-api-kubeflow-admin | platform-api rights on Kubeflow resources across all profiles |
kubeflow-user-example-com | AuthorizationPolicy | platform-api-serving-access | Allows KServe predictor calls |
kubeflow | Job + SA/RBAC | kubeflow-user-example-com-pss-labeler | Applies the PodSecurity label after namespace creation |
Diagram
Section titled “Diagram”PlantUML source:
Runtime flow
Section titled “Runtime flow”Profile reconcile
Section titled “Profile reconcile”When this overlay applies Profile/kubeflow-user-example-com, the profile-controller detects it and creates the namespace of the same name and the default permissions. Because the namespace is created asynchronously, the PSS labeler Job retries while applying the PodSecurity label. In dev, this resource is applied manually as a normal Job and does not depend on the ArgoCD hook lifecycle in the annotation.
PlantUML source:
Dependencies and interactions
Section titled “Dependencies and interactions”Prerequisites / downstream
Section titled “Prerequisites / downstream”- Prerequisite:
07-dashboardmust be installed so that theprofiles.kubeflow.orgCRD and the profile-controller are ready. To use M2M calls as well, theoauth2-proxyM2M RequestAuthentication and thecluster-local-gateway-jwtlegacy issuer patch must also be in place first. - Downstream: Notebooks, Pipelines user workloads, KServe user namespace resources, Model Registry, and any automation that uses the
platform-apiidentity. In particular, Model Registry Pods start properly only if thekubeflow-user-example-comnamespace exists first.
Runtime interactions
Section titled “Runtime interactions”When the Profile CR is applied, the profile-controller creates the namespace and default permissions asynchronously. The PSS labeler Job retries until this asynchronous creation finishes and applies the PodSecurity label. An external backend sends platform-api-token as a Bearer token in the Authorization header, and the gateway RequestAuthentication maps the token’s sub to kubeflow-userid. KServe serving calls validate the JWT again at the cluster-local-gateway and then pass the platform-api-serving-access policy at the predictor sidecar.
Key resources
Section titled “Key resources”Profile/kubeflow-user-example-com: The declaration that creates the user namespace. The owner isuser@example.com.kubeflow-user-example-com-cluster-admin: Human admin permission in the dev environment. In production, the scope of this permission should be reduced.platform-api+platform-api-token: M2M credential for automation. Because it is a legacy token, it does not expire and requires secure storage and rotation.platform-api-serving-access: A minimal ALLOW policy that lets a ServiceAccount subject that is not the profile owner call the KServe predictor.kubeflow-user-example-com-pss-labeler: A retrying Job and minimal RBAC that correct the PodSecurity label after the asynchronous creation of the Profile namespace. Because profile namespace creation is asynchronous, post-create fixup jobs are sometimes necessary even when the base Profile resource looks simple.
References
Section titled “References”- Overlay:
overlays/dev/kubeflow-profile - Profile overlay:
overlays/dev/kubeflow-profile/kubeflow-user-example-com - Upstream Profile:
common/user-namespace/base - Related documents: