Bird
0
0

Which Kubernetes pod specification snippet correctly integrates an Envoy sidecar container alongside an application container?

easy📝 Configuration Q3 of 15
Kubernetes - Service Mesh
Which Kubernetes pod specification snippet correctly integrates an Envoy sidecar container alongside an application container?
AinitContainers: - name: envoy image: envoyproxy/envoy:v1.18-latest containers: - name: app image: myapp:latest
Bcontainers: - name: envoy image: myapp:latest - name: app image: envoyproxy/envoy:v1.18-latest
Ccontainers: - name: app image: myapp:latest - name: envoy image: envoyproxy/envoy:v1.18-latest
Dcontainers: - name: app image: myapp:latest initContainers: - name: envoy image: envoyproxy/envoy:v1.18-latest
Step-by-Step Solution
Solution:
  1. Step 1: Identify sidecar container placement

    Sidecar proxies like Envoy run as regular containers alongside the app in the same pod.
  2. Step 2: Check container order and images

    containers: - name: app image: myapp:latest - name: envoy image: envoyproxy/envoy:v1.18-latest correctly lists 'app' and 'envoy' containers under 'containers' with proper images.
  3. Final Answer:

    containers: - name: app image: myapp:latest - name: envoy image: envoyproxy/envoy:v1.18-latest -> Option C
  4. Quick Check:

    Envoy should not be an initContainer for sidecar proxy usage. [OK]
Quick Trick: Envoy runs as a sidecar container, not an initContainer. [OK]
Common Mistakes:
  • Placing Envoy as an initContainer
  • Swapping container images
  • Omitting Envoy container from pod spec

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes