Kubernetes and Cloud Native Associate (KCNA) — Question 174
Which of the following is a valid PromQL query?
Answer options
- A. SELECT * from http_requests_total WHERE job=apiserver
- B. http_requests_total WHERE (job="apiserver")
- C. SELECT * from http_requests_total
- D. http_requests_total(job="apiserver")
Correct answer: D
Explanation
The correct answer is D because it accurately follows the PromQL syntax for querying metrics with specific labels. Options A and C use SQL-like syntax which is not valid in PromQL, while option B incorrectly uses a WHERE clause that is not part of the PromQL query structure.