nerdexam
Linux_Foundation

KCNA · Question #198

Which of the following statements is correct concerning Open Policy Agent (OPA)?

The correct answer is B. Kubernetes can use it to validate requests and apply policies. Open Policy Agent (OPA) is a general-purpose policy engine that Kubernetes can leverage to validate admission requests and enforce various policies.

Submitted by sofia.br· May 4, 2026Kubernetes Fundamentals

Question

Which of the following statements is correct concerning Open Policy Agent (OPA)?

Options

  • AThe policies must be written in Python language.
  • BKubernetes can use it to validate requests and apply policies.
  • CPolicies can only be tested when published.
  • DIt cannot be used outside Kubernetes.

How the community answered

(24 responses)
  • B
    92% (22)
  • C
    4% (1)
  • D
    4% (1)

Why each option

Open Policy Agent (OPA) is a general-purpose policy engine that Kubernetes can leverage to validate admission requests and enforce various policies.

AThe policies must be written in Python language.

OPA policies are written in Rego, a high-level declarative language, not Python.

BKubernetes can use it to validate requests and apply policies.Correct

OPA can be integrated with Kubernetes as an admission controller to intercept API requests and enforce custom policies before objects are persisted. This allows for fine-grained control over resource creation, modification, and deletion, ensuring compliance with security, governance, and operational best practices.

CPolicies can only be tested when published.

OPA policies can be tested locally using `opa test` command and various SDKs before being published or deployed.

DIt cannot be used outside Kubernetes.

OPA is a general-purpose policy engine designed to be used across the entire cloud native stack, including microservices, APIs, CI/CD pipelines, and more, not just within Kubernetes.

Concept tested: Open Policy Agent (OPA) use cases

Source: https://www.openpolicyagent.org/docs/latest/kubernetes-admission-control/

Topics

#Open Policy Agent (OPA)#Policy Enforcement#Kubernetes Admission Controller

Community Discussion

No community discussion yet for this question.

Full KCNA Practice