Study. uk . com
  1. Home
  2. All questions
  3. Question 590

CKA study material · question 590 of 1000

A user has list on configmaps restricted by resourceNames to my-config, yet plain kubectl get configmaps is denied. What must they do?

  1. Request the object by name with kubectl get configmap my-config only
  2. Include a metadata.name field selector matching the permitted name
  3. Add --all-namespaces to the command
  4. Nothing; list can never be restricted by resource name
Show the answer

Answer: B. Include a metadata.name field selector matching the permitted name

When list or watch is restricted by resourceNames, the client must send a matching metadata.name field selector for the request to be authorized.

Source: Using RBAC Authorization (Kubernetes) — Referring to resources

Challenge yourself on this topic → Study as cards