Bird
0
0

Which of the following is the correct way to define a sidecar container for Envoy in a Kubernetes pod spec?

easy📝 Configuration Q12 of 15
Kubernetes - Service Mesh
Which of the following is the correct way to define a sidecar container for Envoy in a Kubernetes pod spec?
Acontainers: - name: app - image: envoyproxy/envoy
Bcontainers: - name: envoy - image: envoyproxy/envoy
Ccontainers: - name: envoy - image: nginx
Dcontainers: - name: envoyproxy - image: envoyproxy/envoy
Step-by-Step Solution
Solution:
  1. Step 1: Identify the correct container name and image

    The sidecar container should be named clearly (e.g., 'envoy') and use the official Envoy image 'envoyproxy/envoy'.
  2. Step 2: Check the options for correctness

    containers: - name: envoy - image: envoyproxy/envoy correctly names the container 'envoy' and uses the right image. containers: - name: app - image: envoyproxy/envoy misnames the container as 'app'. containers: - name: envoy - image: nginx uses the wrong image 'nginx'. containers: - name: envoyproxy - image: envoyproxy/envoy uses a different container name but correct image.
  3. Final Answer:

    containers: - name: envoy - image: envoyproxy/envoy -> Option B
  4. Quick Check:

    Envoy container name and image must match [OK]
Quick Trick: Sidecar container name 'envoy' with image 'envoyproxy/envoy' [OK]
Common Mistakes:
  • Using wrong container name for Envoy
  • Using incorrect image like nginx
  • Mixing app container with sidecar container

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes