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.
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)- B92% (22)
- C4% (1)
- D4% (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.
OPA policies are written in Rego, a high-level declarative language, not Python.
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.
OPA policies can be tested locally using `opa test` command and various SDKs before being published or deployed.
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
Community Discussion
No community discussion yet for this question.