azureblog.co.uk
← cd ~/roles
// roles/azure · containers

Azure Kubernetes Fleet Manager RBAC WriterAzure built-in role

Grants read/write access to most Kubernetes resources within a namespace in the fleet-managed hub cluster. This role does not allow viewing or modifying roles or role bindings. However, this role allows accessing Secrets as any ServiceAccount in the namespace, so it can be used to gain the API access levels of any ServiceAccount in the namespace. Applying this role at cluster scope will give access across all namespaces.

Role ID5af6afb3-c06c-4fa4-8848-71a8aee05683
CategoryContainers
Actions6
Data actions51

Before you assign it

  • It reaches the data, not just the resource. It has 51 data actions, such as reading blobs, secrets or messages.

What it can do

PermissionWhat it allows
Microsoft.Authorization/*/readAny read operation on anything under Microsoft.Authorization
Microsoft.Resources/subscriptions/operationresults/readGet the subscription operation results.
Microsoft.Resources/subscriptions/readGets the list of subscriptions.
Microsoft.Resources/subscriptions/resourceGroups/readGets or lists resource groups.
Microsoft.ContainerService/fleets/readGet fleet
Microsoft.ContainerService/fleets/listCredentials/actionList fleet credentials

Data actions

PermissionWhat it allows
Microsoft.ContainerService/fleets/apps/controllerrevisions/readReads controllerrevisions
Microsoft.ContainerService/fleets/apps/daemonsets/readReads daemonsets
Microsoft.ContainerService/fleets/apps/daemonsets/writeWrites daemonsets
Microsoft.ContainerService/fleets/apps/deployments/readReads deployments
Microsoft.ContainerService/fleets/apps/deployments/writeWrites deployments
Microsoft.ContainerService/fleets/apps/statefulsets/readReads statefulsets
Microsoft.ContainerService/fleets/apps/statefulsets/writeWrites statefulsets
Microsoft.ContainerService/fleets/autoscaling/horizontalpodautoscalers/readReads horizontalpodautoscalers
Microsoft.ContainerService/fleets/autoscaling/horizontalpodautoscalers/writeWrites horizontalpodautoscalers
Microsoft.ContainerService/fleets/batch/cronjobs/readReads cronjobs
Microsoft.ContainerService/fleets/batch/cronjobs/writeWrites cronjobs
Microsoft.ContainerService/fleets/batch/jobs/readReads jobs
Microsoft.ContainerService/fleets/batch/jobs/writeWrites jobs
Microsoft.ContainerService/fleets/configmaps/readReads configmaps
Microsoft.ContainerService/fleets/configmaps/writeWrites configmaps
Microsoft.ContainerService/fleets/endpoints/readReads endpoints
Microsoft.ContainerService/fleets/endpoints/writeWrites endpoints
Microsoft.ContainerService/fleets/events.k8s.io/events/readReads events
Microsoft.ContainerService/fleets/events/readReads events
Microsoft.ContainerService/fleets/extensions/daemonsets/readReads daemonsets
Microsoft.ContainerService/fleets/extensions/daemonsets/writeWrites daemonsets
Microsoft.ContainerService/fleets/extensions/deployments/readReads deployments
Microsoft.ContainerService/fleets/extensions/deployments/writeWrites deployments
Microsoft.ContainerService/fleets/extensions/ingresses/readReads ingresses
Microsoft.ContainerService/fleets/extensions/ingresses/writeWrites ingresses
Microsoft.ContainerService/fleets/extensions/networkpolicies/readReads networkpolicies
Microsoft.ContainerService/fleets/extensions/networkpolicies/writeWrites networkpolicies
Microsoft.ContainerService/fleets/limitranges/readReads limitranges
Microsoft.ContainerService/fleets/namespaces/readReads namespaces
Microsoft.ContainerService/fleets/networking.k8s.io/ingresses/readReads ingresses
Microsoft.ContainerService/fleets/networking.k8s.io/ingresses/writeWrites ingresses
Microsoft.ContainerService/fleets/networking.k8s.io/networkpolicies/readReads networkpolicies
Microsoft.ContainerService/fleets/networking.k8s.io/networkpolicies/writeWrites networkpolicies
Microsoft.ContainerService/fleets/persistentvolumeclaims/readReads persistentvolumeclaims
Microsoft.ContainerService/fleets/persistentvolumeclaims/writeWrites persistentvolumeclaims
Microsoft.ContainerService/fleets/policy/poddisruptionbudgets/readReads poddisruptionbudgets
Microsoft.ContainerService/fleets/policy/poddisruptionbudgets/writeWrites poddisruptionbudgets
Microsoft.ContainerService/fleets/replicationcontrollers/readReads replicationcontrollers
Microsoft.ContainerService/fleets/replicationcontrollers/writeWrites replicationcontrollers
Microsoft.ContainerService/fleets/resourcequotas/readReads resourcequotas
Microsoft.ContainerService/fleets/secrets/readReads secrets
Microsoft.ContainerService/fleets/secrets/writeWrites secrets
Microsoft.ContainerService/fleets/serviceaccounts/readReads serviceaccounts
Microsoft.ContainerService/fleets/serviceaccounts/writeWrites serviceaccounts
Microsoft.ContainerService/fleets/services/readReads services
Microsoft.ContainerService/fleets/services/writeWrites services
Microsoft.ContainerService/fleets/cluster.kubernetes-fleet.io/internalmemberclusters/readRead fleet internalmembercluster resource
Microsoft.ContainerService/fleets/placement.kubernetes-fleet.io/resourceoverrides/readRead fleet resourceoverride resource
Microsoft.ContainerService/fleets/placement.kubernetes-fleet.io/resourceoverrides/writeWrite fleet resourceoverride resource
Microsoft.ContainerService/fleets/placement.kubernetes-fleet.io/resourceoverridesnapshots/readRead fleet resourceoverridesnapshot resource
Microsoft.ContainerService/fleets/placement.kubernetes-fleet.io/works/readRead fleet work resource

Assign it

Scope it as tightly as you can: a resource or resource group rather than the whole subscription.

azure cli
az role assignment create \
  --assignee "jane.doe@contoso.com" \
  --role "Azure Kubernetes Fleet Manager RBAC Writer" \
  --scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
powershell3 lines
New-AzRoleAssignment -SignInName "jane.doe@contoso.com" `
  -RoleDefinitionName "Azure Kubernetes Fleet Manager RBAC Writer" `
  -Scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
bicep7 lines
resource assignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
  name: guid(resourceGroup().id, principalId, '5af6afb3-c06c-4fa4-8848-71a8aee05683')
  properties: {
    roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '5af6afb3-c06c-4fa4-8848-71a8aee05683')
    principalId: principalId
  }
}

Who already has it?

kql · azure resource graph
authorizationresources
| where type == "microsoft.authorization/roleassignments"
| where tostring(properties.roleDefinitionId) endswith "5af6afb3-c06c-4fa4-8848-71a8aee05683"
| project principalId = tostring(properties.principalId), principalType = tostring(properties.principalType), scope = tostring(properties.scope)

Other containers roles

Find the smallest role for a task →