Kubernetes RBAC Interview Questions

Reviewed by Mark Dickie · Last updated

11 questions on this page you can answer and see marked on the spot. Go to the first one

Kubernetes RBAC (Role-Based Access Control) is the built-in authorization model that determines which users and service accounts can perform which actions on which API resources. For interviews, you need to understand the four core RBAC objects — Role, ClusterRole, RoleBinding, and ClusterRoleBinding — how they differ in scope, and how Kubernetes resolves permissions when multiple bindings apply. You should also know how to read and write manifest YAML for these objects, how default service accounts work, and how to apply least-privilege principles in real cluster configurations.

What are the four core RBAC objects?

Roles and RoleBindings are namespaced: a Role grants permissions within a single namespace, and a RoleBinding attaches that Role to a subject (user, group, or service account) in the same namespace. ClusterRoles and ClusterRoleBindings operate cluster-wide and can also grant access to non-namespaced resources like nodes and persistent volumes.

ObjectScopeGrants permissions toApplies to resources
RoleSingle namespaceSubjects in that namespaceNamespaced resources in that namespace
ClusterRoleCluster-wideSubjects anywhereAny resource, namespaced or cluster-scoped
RoleBindingSingle namespaceSubjects in that namespaceA Role or ClusterRole (restricted to that namespace)
ClusterRoleBindingCluster-wideSubjects anywhereA ClusterRole (across all namespaces)

A ClusterRole can be referenced by a RoleBinding when you want to reuse a shared set of permissions but restrict them to one namespace. This is a common pattern in multi-tenant clusters.

How does Kubernetes decide if a request is allowed?

Authorization runs after authentication and before admission control. When an API request arrives, Kubernetes evaluates RBAC rules in a specific order. The decision is deterministic:

  1. The API server identifies the requesting user and groups from the authenticated identity.
  2. It collects all RoleBindings and ClusterRoleBindings that reference that user or any of its groups as a subject.
  3. Each binding contributes a set of rules (verbs + resources + resource names).
  4. If any single rule allows the requested verb on the requested resource, access is granted.
  5. If no rule matches, access is denied by default.

There is no explicit deny in RBAC. Permissions are purely additive. This means you cannot write a rule that revokes a permission granted elsewhere — you must instead remove or narrow the binding that grants it.

What do interviews commonly test about service accounts and RBAC?

Every pod runs under a service account. If you do not specify one, Kubernetes assigns the default service account in the pod's namespace. That account has no permissions beyond what an unauthenticated user gets (essentially none under RBAC). Interviews often probe whether you know how to create a dedicated service account, bind it to a Role with the minimum verbs needed, and reference it in a pod spec via serviceAccountName.

You should be able to explain:

  • The difference between get, list, and watch verbs and when each is needed.
  • Why cluster-admin should almost never be granted to application workloads.
  • How to use kubectl auth can-i to test whether a given subject can perform an action.
  • How resource names narrow a rule so a Role can grant access to one specific ConfigMap rather than all ConfigMaps.
  • How auditing RBAC decisions works through the API server audit log.

Key facts

  • Tarmac's Kubernetes interview questions cover 25 questions at difficulty 1–5 of 5.
  • Tarmac tracked 2,661 job postings asking for Kubernetes in September 2026.
  • Roles asking for Kubernetes advertise a median base salary of £80,000, across 807 job postings as of September 2026.
  • Tarmac last reviewed these Kubernetes interview questions on 13 October 2026.

At a glance

Questions25
Difficulty1–5 of 5
FormatsTrue / false, Short answer, Fill in the blank, Multiple choice, Flashcard

What you'll review

  1. rbac
  2. service accounts
  3. pod security

Practice questions

Try one before you open the answer. Pick an option and press Check; it's marked on the spot.

True or false: In Kubernetes RBAC, a Role is scoped to a single namespace, whereas a ClusterRole is not limited to any one namespace.#

Options

Show answer

True. In Kubernetes RBAC, a Role is a namespaced resource whose permissions apply only within the namespace where it is created, while a ClusterRole is cluster-scoped and is not confined to any single namespace. A ClusterRole can also be referenced by a RoleBinding to grant its permissions within just one namespace.

Why:

A Role is a namespaced RBAC resource, so the permissions it grants apply only inside the namespace where it is created. A ClusterRole is cluster-scoped, so it is not confined to any single namespace. It can define permissions that apply across all namespaces, or it can be referenced by a RoleBinding to grant those permissions within just one namespace. Because both halves of the statement hold, the statement is true.

In Kubernetes RBAC, which resource binds a Role or ClusterRole to a set of users, groups, or service accounts within a specific namespace?#

Show answer

RoleBinding. A RoleBinding grants the permissions defined in a Role (or a ClusterRole) to subjects within the namespace where the RoleBinding is created.

Why:

A RoleBinding is a namespaced resource that grants the permissions defined in a Role, or in a ClusterRole, to specified subjects within that RoleBinding's namespace. A ClusterRoleBinding grants across all namespaces. ServiceAccount is an identity, not a binding. Role only defines permissions; it does not bind them to subjects.

In Kubernetes RBAC, which resource defines a set of permissions scoped to a single namespace? Give the resource's kind name.#

Show answer

Role. A Role is a namespaced RBAC resource whose rules apply only within the namespace where it is created, in contrast to a ClusterRole, which is cluster-scoped.

Why:

A Role is the namespaced RBAC resource: its rules apply only within the namespace in which it is created. A ClusterRole is cluster-scoped and applies across the whole cluster. To grant a Role's permissions, you create a RoleBinding in that same namespace, or a RoleBinding that references a ClusterRole to scope it to one namespace.

In Kubernetes RBAC, a _____ defines permissions within a single namespace, while a _____ defines permissions across the entire cluster.#

Show answer

In Kubernetes RBAC, a Role defines permissions within a single namespace, while a ClusterRole defines permissions across the entire cluster.

Why:

Kubernetes RBAC has two role-resource types. A Role grants access to resources only in the namespace where it is created, while a ClusterRole grants access cluster-wide. A ClusterRole can also be referenced by a RoleBinding to apply its permissions within a single namespace, but the cluster-wide scope belongs to a ClusterRole used with a ClusterRoleBinding.

In Kubernetes RBAC, a ClusterRole grants get and list on pods. You want a ServiceAccount to have those permissions in every namespace across the cluster. Which binding configuration achieves this?#

Options

Show answer

A ClusterRoleBinding that references the ClusterRole and lists the ServiceAccount as a subject grants those permissions in every namespace. A RoleBinding, even one that references a ClusterRole, only applies within its own namespace, and RBAC has no namespace selector field.

Why:

A ClusterRole is a set of rules with no namespace scope, so whether its permissions apply cluster-wide or in one namespace depends on the binding. A ClusterRoleBinding grants the ClusterRole's permissions across all namespaces, which is what is needed here. A RoleBinding that references a ClusterRole narrows the grant to the RoleBinding's own namespace, so a RoleBinding in the default namespace or in kube-system only grants access there. Kubernetes RBAC has no namespaceSelector field on RoleBinding, so that configuration cannot be expressed.

In Kubernetes RBAC, a _____ defines a set of permissions (rules listing resources and verbs such as get, list, watch) within a single namespace, while a _____ binds that permission set to one or more subjects (users, groups, or ServiceAccounts) so those subjects receive the granted access.#

Show answer

In Kubernetes RBAC, a Role defines a set of permissions (rules listing resources and verbs such as get, list, watch) within a single namespace, while a RoleBinding binds that permission set to one or more subjects (users, groups, or ServiceAccounts) so those subjects receive the granted access.

Why:

A Role is namespaced and contains the permission rules, so it fills the first blank. A RoleBinding is the namespaced object that connects those rules to specific subjects, so it fills the second blank. Without the RoleBinding, the Role's permissions are inert because no subject receives them until the binding exists.

In Kubernetes RBAC, which statement about binding a ClusterRole is correct?#

Options

Show answer

A RoleBinding that references a ClusterRole grants that role's permissions only within the RoleBinding's own namespace. A ClusterRole is cluster-scoped and reusable, so a RoleBinding can apply it per namespace, while a ClusterRoleBinding is what grants it across all namespaces.

Why:

A ClusterRole is cluster-scoped, but the binding that references it determines the effective scope. A RoleBinding that references a ClusterRole confines the granted permissions to the namespace the RoleBinding lives in, which lets one reusable role definition be applied per namespace. A ClusterRoleBinding is the object that grants a ClusterRole across all namespaces, and it has no namespace of its own. The other statements are wrong: a RoleBinding can reference a ClusterRole, a ClusterRoleBinding is cluster-wide rather than namespace-bound, and a ClusterRole is never created inside a namespace.

In Kubernetes RBAC, what is the purpose of a RoleBinding?#

Show answer

A RoleBinding grants the permissions defined in a Role (or a ClusterRole) to a subject, such as a user, group, or ServiceAccount, within a specific namespace. The Role or ClusterRole defines the permission rules (verbs like get, list, and watch on resources like pods), and the RoleBinding connects those rules to the subject who should receive them. Without a RoleBinding, a Role's permissions are not assigned to anyone.

Why:

A Role or ClusterRole only defines a set of permission rules; it does not assign them to anyone. A RoleBinding is the object that links those rules to one or more subjects (users, groups, or ServiceAccounts) and scopes the grant to the namespace the RoleBinding lives in. A RoleBinding can reference either a Role or a ClusterRole, but in both cases the resulting access applies only within that namespace. The answer therefore centers on the RoleBinding's job of connecting permission rules to identities within a namespace.

In Kubernetes RBAC, a RoleBinding can reference a ClusterRole. When it does, the permissions from that ClusterRole are applied only within the namespace of the RoleBinding, not cluster-wide. True or false?#

Options

Show answer

A RoleBinding that references a ClusterRole grants that ClusterRole's permissions only within the RoleBinding's namespace, not cluster-wide. This lets administrators define a reusable ClusterRole once and bind it per namespace. Only a ClusterRoleBinding applies the referenced ClusterRole across the entire cluster.

Why:

This is true. A ClusterRole defines permissions that are not tied to a namespace, but when a namespace-scoped RoleBinding references it, the granted permissions apply only within the RoleBinding's namespace. This lets administrators define a reusable ClusterRole once and bind it in each namespace without duplicating the role. A ClusterRoleBinding, by contrast, applies the referenced ClusterRole across the whole cluster.

In a Kubernetes RBAC Role or ClusterRole, a policy rule grants verbs on resources. Which of the following values is not a standard Kubernetes RBAC verb?#

Options

Show answer

The value read is not a standard Kubernetes RBAC verb. Standard verbs include get, list, watch, create, update, patch, delete, deletecollection, and the wildcard *, so reading access is granted with get, list, or watch instead.

Why:

Kubernetes RBAC verbs map to API operations: get, list, watch, create, update, patch, delete, deletecollection, plus the wildcard *. The value read is not one of them, so a rule using it is invalid. Reading is expressed with get for a single object and list or watch for collections. The other three values, get, watch, and patch, are all standard verbs, so they are not the answer.

A platform team wants to grant the built-in view ClusterRole to a ServiceAccount named reader so that the permissions apply only within the namespace dev (not cluster-wide). Which single Kubernetes RBAC object, created in the dev namespace, accomplishes this?#

Options

Show answer

A RoleBinding created in the dev namespace is the single object that grants the built-in view ClusterRole to the reader ServiceAccount only within dev. Its roleRef can point at a ClusterRole, and the granted permissions are then limited to the binding's namespace. A ClusterRoleBinding would apply the same permissions across every namespace instead.

Why:

A RoleBinding may reference either a Role or a ClusterRole. When it references a ClusterRole, Kubernetes applies that ClusterRole's rules only within the RoleBinding's own namespace, which is the documented pattern for granting a cluster-defined role such as the built-in view role to one namespace. A ClusterRoleBinding applies its permissions across every namespace, which violates the requirement. A ClusterRole is cluster-scoped and cannot be created inside a namespace. A RoleBinding in kube-system would grant access in that namespace, not in dev.

You want a RoleBinding to grant permissions to a specific workload identity — the report-generator ServiceAccount in the batch namespace — rather than to a human user. Which subjects entry is correct?#

Options

Show answer

The correct subject block is kind: ServiceAccount with separate name: report-generator and namespace: batch fields — a RoleBinding references a ServiceAccount by its own kind, not by embedding the identity into a User or Group name string. Using kind: User with the bare name, or folding the namespace into name, never matches the ServiceAccount's actual authenticated identity.

Why:

A ServiceAccount subject needs its own kind: ServiceAccount plus separate name and namespace fields — that's how the binding resolves to the exact identity. kind: User with a bare report-generator never matches, because a ServiceAccount's actual authenticated username is the full system:serviceaccount:<namespace>:<name> string, not the bare name. kind: Group with batch:report-generator is malformed too — the real groups a ServiceAccount belongs to are system:serviceaccounts and system:serviceaccounts:<namespace>, not a <namespace>:<name> pair. And cramming the namespace into name (batch/report-generator) doesn't work either — namespace is always its own field on a ServiceAccount subject.

Pod Security Admission (PSA) replaces RBAC as the mechanism for controlling which users can create Pods in a namespace.#

Options

Show answer

False. Pod Security Admission replaced PodSecurityPolicy (removed in Kubernetes 1.25), not RBAC. RBAC governs which users or ServiceAccounts can call which API verbs and resources, while PSA governs what security posture a Pod's spec must have to be admitted into a namespace — a user with full RBAC rights to create Pods can still be blocked by PSA if the Pod doesn't meet the namespace's level. Both mechanisms remain necessary and operate independently.

Why:

False. PSA replaced PodSecurityPolicy (removed in Kubernetes 1.25) — it did not replace RBAC. RBAC governs which identities can call which API verbs and resources (can this user or ServiceAccount create a Pod at all?); PSA governs what security posture a Pod's spec must have to be admitted into a namespace, checked regardless of who created it. A user with full RBAC rights to create Pods in a namespace can still be blocked by PSA if the Pod's securityContext doesn't meet the namespace's configured level. Both mechanisms remain necessary and operate independently — treating one as a substitute for the other leaves a real gap.

A cluster runs RBAC as its only active authorization mode. The namespace staging already exists. An administrator saves the following two manifests and runs kubectl apply -f on them; the API server returns no errors.#

Show answer

Alice can only get and list pods in the staging namespace. A RoleBinding, even one whose roleRef points at a ClusterRole, is a namespaced object and scopes the granted permissions to the namespace in which the binding lives. The ClusterRole only supplies a reusable rule set; the RoleBinding determines the effective scope. Alice gets no permissions in other namespaces. Granting the same get/list cluster-wide would require a ClusterRoleBinding instead.

Why:

The ClusterRole pod-reader defines a reusable rule set granting get and list on pods. The RoleBinding pod-reader-binding is created in the staging namespace, references that ClusterRole, and binds the user alice. A RoleBinding is a namespaced object, so even when its roleRef names a ClusterRole, the grant only takes effect within the binding's own namespace. Therefore alice can get and list pods in staging only. A ClusterRoleBinding referencing the same ClusterRole would instead grant those permissions across all namespaces.

In Kubernetes RBAC, a RoleBinding can reference a ClusterRole rather than a namespace-local Role. Explain two things: (1) Why do the permissions from a ClusterRole referenced through a RoleBinding take effect only in the RoleBinding's own namespace instead of cluster-wide? (2) Why does setting automountServiceAccountToken: false on a ServiceAccount — and then explicitly mounting a token via a projected TokenRequest volume or a kubernetes.io/service-account-token Secret — improve token security compared to the default automount behavior?#

Show answer

(1) A ClusterRole defines a reusable set of permissions, but when a RoleBinding references it (as opposed to a ClusterRoleBinding), Kubernetes automatically scopes those permissions to the namespace in which the RoleBinding resides. The binding — not the role — determines the effective scope, so the same ClusterRole can be applied in multiple namespaces with different access per namespace without creating separate Role objects. (2) By default, Kubernetes injects a long-lived ServiceAccount token into every Pod that uses a given ServiceAccount. Setting automountServiceAccountToken: false on the ServiceAccount (or on the Pod spec) suppresses that automatic injection. You then explicitly provision a token — for example via a projected serviceAccountToken volume with a bounded TTL and a specific audience, or by creating a Secret of type kubernetes.io/service-account-token — and mount only that token into the Pod. This gives you control over token lifetime, audience scoping, and rotation policy, reducing the blast radius if a token is leaked or a Pod is compromised.

Why:

A RoleBinding grants the permissions of whatever role it references — including a ClusterRole — only within its own namespace; the binding, not the role object, determines the effective scope. Disabling default token automount prevents the kubelet from injecting a long-lived token into every Pod; explicitly provisioning a token via a projected TokenRequest volume or a service-account Secret lets you constrain the token's audience, lifetime, and rotation, which reduces exposure if a token leaks or a Pod is compromised.

In Kubernetes RBAC, what kubectl subcommand tests whether the currently authenticated user is authorized to perform a specific verb on a specific resource, and what underlying Authorization API resource does the API server create to evaluate that check?#

Show answer

The kubectl auth can-i <verb> <resource> subcommand performs the check. It creates a SelfSubjectAccessReview object, which the API server evaluates against its configured authorization modes (such as RBAC and Node) and returns with status.allowed set to true or false.

Why:

kubectl auth can-i is the standard CLI for ad-hoc authorization checks. For the current caller it submits a SelfSubjectAccessReview, and the API server evaluates that request against the active authorization modules, including RBAC, and returns whether the action is allowed. Knowing the underlying SelfSubjectAccessReview resource matters for programmatic RBAC audits and for building policy tooling that checks permissions without reading Role bindings directly.

A Kubernetes administrator applies the following two manifests in the staging namespace.#

Show answer

The request will be denied with a 403 Forbidden error. The Role pod-reader grants only the get and list verbs on the pods resource, and get on pods/log, all in the core API group (apiGroup ""). Creating a pod requires the create verb on pods, which no rule grants. The RoleBinding correctly binds the ci-runner ServiceAccount to the Role, so it receives exactly those permissions. Kubernetes RBAC denies by default, so the API server rejects the request because create was never explicitly granted.

Why:

The Role pod-reader has two rules. The first grants get and list on the pods resource in the core API group (the empty string). The second grants get on the pods/log subresource, also in the core API group. The RoleBinding binds the ci-runner ServiceAccount to this Role in the staging namespace, so the ServiceAccount inherits exactly those permissions and nothing more. Creating a pod requires the create verb on the pods resource, and neither rule grants it. Because Kubernetes RBAC denies by default and permits only explicitly listed verbs, the API server returns 403 Forbidden for the create request. The ServiceAccount can read pods and their logs but cannot create, update, or delete them.

A Kubernetes administrator applies the following two manifests.#

Show answer

The dev-sa service account can get, list, and watch pods, but only within the dev namespace. Although the permissions come from a ClusterRole, the RoleBinding (not a ClusterRoleBinding) scopes the ClusterRole's rules to the RoleBinding's own namespace, so they do not apply cluster-wide.

Why:

A RoleBinding that references a ClusterRole grants that ClusterRole's rules only within the RoleBinding's own namespace. The ClusterRole pod-reader grants get, list, and watch on pods, and the RoleBinding in the dev namespace binds it to the dev-sa service account. Because no ClusterRoleBinding is involved, the permissions do not extend beyond dev to other namespaces or to cluster-scoped resources.

You create a ClusterRole named pod-reader that grants get, list, and watch on pods. Then you create a RoleBinding in the namespace dev that binds the pod-reader ClusterRole to the ServiceAccount dev-sa. Which statement accurately describes the permissions granted to dev-sa?#

Options

Show answer

A RoleBinding that references a ClusterRole applies that ClusterRole's permissions only inside the RoleBinding's namespace. So the ServiceAccount dev-sa can get, list, and watch pods only in the dev namespace. Cluster-wide access would require a ClusterRoleBinding instead.

Why:

A RoleBinding can reference either a Role or a ClusterRole. When it references a ClusterRole, the ClusterRole's rules are applied only within the RoleBinding's namespace, so the ServiceAccount gets the pod verbs (get, list, watch) only in the dev namespace. Granting that access across all namespaces would require a ClusterRoleBinding, not a RoleBinding. The ClusterRole grants only pod verbs, so access to other resource types is not granted. The claim that no permissions are granted is wrong because a RoleBinding can validly reference a ClusterRole.

A ServiceAccount app-sa in namespace prod has no ClusterRoleBinding that names it directly, yet it can list pods in every namespace. Briefly explain two distinct mechanisms that could grant this cluster-wide access.#

Show answer

Kubernetes automatically places every ServiceAccount into built-in groups: system:serviceaccounts (all ServiceAccounts cluster-wide) and system:authenticated (all authenticated identities). A ClusterRoleBinding whose subject is the system:serviceaccounts group would grant every ServiceAccount, including app-sa, the bound ClusterRole's permissions cluster-wide. Likewise, a ClusterRoleBinding that subjects the system:authenticated group to a pod-list ClusterRole would also cover app-sa, because ServiceAccounts are authenticated identities.

Why:

The key insight is that Kubernetes RBAC subjects can be groups, not just individual ServiceAccounts. Every ServiceAccount is automatically a member of the built-in groups system:serviceaccounts and system:authenticated. A ClusterRoleBinding targeting either of those groups grants the bound ClusterRole's permissions cluster-wide to app-sa without any binding that references app-sa by name. A good answer names at least one of these group-based mechanisms and explains that the ClusterRoleBinding is what provides cluster-scoped access, since a RoleBinding would limit the grant to a single namespace.

You need to grant the ServiceAccount app-reader in namespace payments the ability to get and list pods in every namespace in the cluster. Which combination of RBAC resources achieves this correctly and with the narrowest scope of authority?#

Options

Show answer

A ClusterRole granting get and list on pods, attached with a ClusterRoleBinding whose subject is the app-reader ServiceAccount in payments, gives read access to pods in every namespace. A RoleBinding, even one referencing a ClusterRole, only applies within its own namespace, so it would confine access to payments.

Why:

A ClusterRole defines permissions at cluster scope, but those permissions only apply cluster-wide when attached through a ClusterRoleBinding. The ClusterRole granting get and list on pods, combined with a ClusterRoleBinding whose subject is the app-reader ServiceAccount in payments, grants read access to pods in all namespaces with no extra privileges. A RoleBinding, even one that references a ClusterRole, only applies within its own namespace, so the option pairing a ClusterRole with a RoleBinding in payments would limit access to that single namespace. A namespaced Role cannot be referenced by a ClusterRoleBinding, and a Role with a RoleBinding also stays confined to payments. Binding cluster-admin would work for reach but grants far more authority than needed, violating the narrowest-scope requirement.

In a Kubernetes cluster, a user alice has the following RBAC permissions granted via various RoleBindings and ClusterRoleBindings: create, update, and patch on rolebindings in namespace dev; get, list, watch on roles and clusterroles cluster-wide. Alice does not have the bind verb on any Role or ClusterRole, does not have the escalate verb on any Role or ClusterRole, and does not have any permissions on secrets in any namespace. Alice attempts to create a RoleBinding in namespace dev that binds the existing Role secrets-reader (which grants get, list, watch on secrets) to her own ServiceAccount alice-sa in namespace dev. What is the result?#

Show answer

The API server rejects the request with a 403 Forbidden error, so the RoleBinding is not created. Kubernetes RBAC has an escalation-prevention check: when a user creates or updates a RoleBinding or ClusterRoleBinding, the API server verifies that the user already holds every permission the referenced Role or ClusterRole grants, unless the user has the bind verb on that Role or ClusterRole. Alice lacks bind on secrets-reader and currently holds none of the get, list, or watch permissions on secrets, so the check fails. Her create permission on rolebindings is necessary but not sufficient. The escalate verb governs creating or modifying Roles and ClusterRoles to include permissions the user does not hold; it is not what allows or blocks binding an existing Role.

Why:

The RoleBinding creation is denied. Alice's create permission on rolebindings only passes the normal authorization check for the RoleBinding object itself. Kubernetes then applies escalation prevention: a user may bind a Role only if they already hold all permissions that Role grants, or hold the bind verb on that Role or ClusterRole. Alice holds neither the bind verb on secrets-reader nor the get, list, or watch permissions on secrets, so the API server returns 403 Forbidden. The escalate verb is the wrong lever here because it applies to creating or editing Roles and ClusterRoles, not to binding an existing Role.

A Kubernetes cluster administrator deletes the cluster-admin → system:masters ClusterRoleBinding to revoke superuser access for all members of the system:masters group. Despite this, users in the system:masters group still retain unrestricted access to every resource in the cluster. Briefly explain the mechanism responsible and why deleting the ClusterRoleBinding has no effect.#

Show answer

The system:masters group is hardcoded in the kube-apiserver as a superuser group. The API server's authorization logic short-circuits and unconditionally authorizes every request from a system:masters member before evaluating any RBAC rules. The cluster-admin ClusterRoleBinding to system:masters is therefore redundant — deleting it has no effect. To actually restrict a system:masters member you must remove them from the group at the authentication / identity-provider level; no RBAC resource can override the bypass.

Why:

The system:masters group is special-cased in the kube-apiserver authorization chain. The API server checks for system:masters membership early in request processing and short-circuits all authorization checks, unconditionally allowing the request without consulting any RBAC RoleBindings or ClusterRoleBindings. The cluster-admin ClusterRoleBinding that references system:masters is effectively redundant — it exists for discoverability but does not grant the access; the access is hardcoded. Deleting it therefore has no effect. To genuinely restrict a system:masters member, an administrator must remove the user from the group at the identity-provider or authentication-config level, because no RBAC policy can override or narrow the hardcoded bypass.

A service account in a Kubernetes cluster already holds the create, update, patch, and delete verbs on the roles resource in namespace app-prod. It tries to create a Role in that namespace granting the * verb on * resources, which are permissions the service account does not itself hold. The kube-apiserver rejects the create with 403 Forbidden. Which single additional RBAC verb, if granted on the roles resource, would allow this Role to be created?#

Options

Show answer

The escalate verb on the roles resource lets a principal create a Role that grants permissions it does not hold. Kubernetes RBAC normally blocks creating or updating a Role unless the creator already holds every permission in it, and escalate is the documented bypass for that check. The bind, impersonate, and get verbs do not bypass it.

Why:

By default Kubernetes RBAC prevents privilege escalation: when a principal creates or updates a Role or ClusterRole, the kube-apiserver verifies that the principal already holds every permission the new role grants, and returns 403 otherwise. The escalate verb on the roles (or clusterroles) resource is the documented escape hatch that bypasses this check, so a principal holding it can create a role containing permissions it does not itself have. The bind verb governs binding an existing role's permissions to subjects, not creating a role with new permissions. The impersonate verb lets one principal act as another user, and get is read-only. Neither of those bypasses the escalation check on role creation.

In Kubernetes RBAC (rbac.authorization.k8s.io/v1), what API resource kind defines a set of permission rules (verbs on resources) scoped to a single namespace, and what kind defines the equivalent rules at the cluster level? Name both resource kinds.#

Show answer

Role and ClusterRole. A Role defines a named collection of RBAC permission rules scoped to one namespace, while a ClusterRole defines the same kind of permission rules but applies cluster-wide across all namespaces.

Why:

In the rbac.authorization.k8s.io/v1 API group, Role is the namespace-scoped resource for defining a named set of permission rules (verbs on API resources), and ClusterRole is its cluster-scoped counterpart. A RoleBinding grants the rules in a Role to subjects within a namespace, and a ClusterRoleBinding grants a ClusterRole's rules cluster-wide; a RoleBinding may also reference a ClusterRole to grant namespace-scoped access to otherwise cluster-level rules. Knowing which kind carries which scope is foundational to designing any multi-tenant RBAC model on Kubernetes.

Related interview questions

Job market

See kubernetes salaries and hiring demand from live job postings.

Practise these until they stick

That's every question we hold on this topic, and the page marks what you pick. What it can't do is remember. A free account keeps every answer, and what you miss comes back until it's right: after a day, then at longer gaps.

Start with this topic

Free · the whole bank · 100 marked answers per 30 days · written feedback on the paid plan

Interview booked? Practise the job ad instead

What moved, monthly

One email a month when the bulletin comes out: what moved in the markets we track, and the new question topics we published. Confirm your address to join. Unsubscribe any time.