0
0
Kubernetesdevops~10 mins

Sidecar proxy concept (Envoy) in Kubernetes - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to add Envoy as a sidecar container in a Kubernetes Pod spec.

Kubernetes
containers:
  - name: app-container
    image: myapp:latest
  - name: envoy-proxy
    image: [1]
Drag options to blanks, or click blank then click option'
Abusybox
Bnginx:latest
Credis:alpine
Denvoyproxy/envoy:v1.22.0
Attempts:
3 left
💡 Hint
Common Mistakes
Using unrelated container images like nginx or redis for Envoy.
2fill in blank
medium

Complete the Envoy container spec to expose the admin interface on port 9901.

Kubernetes
containers:
  - name: envoy-proxy
    image: envoyproxy/envoy:v1.22.0
    ports:
      - containerPort: [1]
Drag options to blanks, or click blank then click option'
A8080
B9901
C443
D15000
Attempts:
3 left
💡 Hint
Common Mistakes
Using port 8080 or 443 which are common for app traffic, not admin.
3fill in blank
hard

Fix the error in the Envoy sidecar container args to specify the config file path.

Kubernetes
containers:
  - name: envoy-proxy
    image: envoyproxy/envoy:v1.22.0
    args: ["-c", [1]]
Drag options to blanks, or click blank then click option'
A'/etc/envoy/envoy.yaml'
B/etc/envoy/envoy.yaml
C"/etc/envoy/envoy.yaml"
D/etc/envoy/envoy.yml
Attempts:
3 left
💡 Hint
Common Mistakes
Missing quotes causing YAML parsing errors.
Using wrong file extension '.yml' instead of '.yaml'.
4fill in blank
hard

Fill both blanks to define a Kubernetes Pod annotation and Envoy container env var for proxying.

Kubernetes
metadata:
  annotations:
    sidecar.istio.io/inject: [1]
containers:
  - name: envoy-proxy
    env:
      - name: PROXY_MODE
        value: [2]
Drag options to blanks, or click blank then click option'
A"false"
B"true"
C"default"
D"enabled"
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing 'true' and 'false' for injection.
Using incorrect env var values.
5fill in blank
hard

Fill all three blanks to create an Envoy bootstrap config map with keys for node id, cluster, and admin port.

Kubernetes
apiVersion: v1
kind: ConfigMap
metadata:
  name: envoy-bootstrap
data:
  node_id: [1]
  cluster: [2]
  admin_port: "[3]"
Drag options to blanks, or click blank then click option'
A"sidecar~10.0.0.1~pod-123~default.svc.cluster.local"
B"service-cluster"
C9901
D15090
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong port numbers or missing quotes for strings.