Management access to the tenant cluster
Management access controls who can view, edit, or configure the tenant cluster object in the platform. It is separate from in-cluster access, which governs permissions inside the Kubernetes environment of the tenant cluster.
Default management access​
By default, the following users and roles have management access to a tenant cluster:
- Global administrators—Access all tenant clusters on the platform.
- Project administrators—Access all tenant clusters within their assigned projects.
- Tenant cluster owners—Automatically receive access to the specific tenant cluster they create or own.
- Users with physical cluster permissions—Any user or team with RBAC permissions on the underlying (physical) cluster and the
useverb on thevirtualclusterinstancesresource in themanagement.loft.shAPI group can access tenant clusters running on that cluster.
Grant management access using the UI​
To extend access to additional users or teams, use the Permissions section for each tenant cluster in the platform UI:
Open the Project dropdown in the top-left corner and select the project that contains the tenant cluster.
Click Tenant Clusters in the sidebar to view the list.
Click Edit on the target tenant cluster.
Open the Permissions tab.
Use the Add permission to field to select the user or team.
If the user or team does not appear, confirm that they have access to the project.
Choose a ClusterRole to assign (e.g.,
cluster-admin,edit, orview). This role determines the user's Kubernetes permissions inside the tenant cluster.Click Save changes.
The platform grants the selected user or team management access to the tenant cluster object.
vCluster roles​
vCluster roles define what users and teams can do inside the tenant cluster. Kubernetes RBAC governs this access.
Default cluster role assignment​
By default, the platform assigns the cluster-admin Kubernetes ClusterRole to users with tenant cluster access. This role grants full access in all namespaces.
Change the default cluster role​
Administrators can override the default role in the tenant cluster template or in the tenant cluster configuration.
Open the tenant cluster or template configuration.
Locate the Default Cluster Role field.
Enter a more limited role such as
editorview.Save the updated configuration.
Define custom role mapping rules​
Use mapping rules to assign specific users or teams to specific cluster roles.
- A user or team that matches at least one rule does not receive the default role.
- If multiple rules match, the system assigns all specified roles.
- If no rule matches, the system assigns the default role.
Open the tenant cluster or template YAML configuration.
Locate or create the
access.rulessection.List
subjectsfor each user or team.Define the ClusterRole for each rule.
Save and apply the configuration.
Example​
apiVersion: management.loft.sh/v1
kind: VirtualCluster
metadata:
name: example-vcluster
spec:
defaultClusterRole: cluster-admin
access:
rules:
- subjects:
- kind: User
name: Person 1
clusterRole: edit
- subjects:
- kind: Team
name: DevTeam
clusterRole: view
In this example:
- Person 1 receives the
editrole. - DevTeam receives the
viewrole. - Person 1, if part of DevTeam, receives both roles.
- All other users default to
cluster-admin.
Custom mapping rules allow more precise and secure access control inside the tenant cluster.