Kubernetes and Cloud Native Associate (KCNA) — Question 10
Which of the following statements is correct concerning Open Policy Agent (OPA)?
Answer options
- A. The policies must be written in Python language.
- B. Kubernetes can use it to validate requests and apply policies.
- C. Policies can only be tested when published.
- D. It cannot be used outside Kubernetes.
Correct answer: B
Explanation
The correct answer is B because Open Policy Agent can indeed be integrated with Kubernetes to validate incoming requests and enforce specific policies. Option A is incorrect as OPA policies are typically written in Rego, not Python. Option C is false because policies can be tested locally before being published. Option D is also incorrect since OPA can be used in various environments beyond just Kubernetes.