Bird
0
0

Which of the following is the correct syntax to enable Prometheus metrics scraping in Istio's sidecar proxy configuration?

easy📝 Syntax Q3 of 15
Kubernetes - Service Mesh
Which of the following is the correct syntax to enable Prometheus metrics scraping in Istio's sidecar proxy configuration?
AenableMetrics: true
BprometheusScrape: enabled
Cprometheus.io/scrape: 'true'
Dmetrics.enabled: true
Step-by-Step Solution
Solution:
  1. Step 1: Recall Istio annotation for Prometheus scraping

    Istio uses Kubernetes pod annotations like 'prometheus.io/scrape: "true"' to enable Prometheus scraping on pods.
  2. Step 2: Verify other options

    enableMetrics: true, prometheusScrape: enabled, and metrics.enabled: true are not valid Kubernetes annotations or Istio configuration keys for enabling Prometheus scraping.
  3. Final Answer:

    prometheus.io/scrape: 'true' -> Option C
  4. Quick Check:

    Prometheus scraping annotation = prometheus.io/scrape: 'true' [OK]
Quick Trick: Use prometheus.io/scrape: 'true' annotation for scraping [OK]
Common Mistakes:
  • Using incorrect or non-existent config keys
  • Confusing config flags with annotations
  • Missing quotes around 'true'

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes