Complete the code to deploy a service mesh sidecar proxy in Kubernetes.
apiVersion: v1
kind: Pod
metadata:
name: myapp-pod
spec:
containers:
- name: myapp
image: myapp:latest
- name: [1]
image: envoyproxy/envoy:v1.18-latestThe sidecar proxy container is added alongside the application container to handle service mesh traffic.
Complete the statement to describe a library-based approach in microservices.
In a library-based approach, the application code includes a [1] to handle networking and security.
The library is embedded in the application to provide features like networking and security without a separate proxy.
Fix the error in the description of service mesh benefits.
Service mesh provides [1] management, observability, and security without changing application code.
Service mesh automatically manages traffic and security, so developers don't need to change application code.
Fill both blanks to complete the comparison between service mesh and library-based approach.
Service mesh uses a [1] proxy, while library-based approach embeds [2] in the application code.
Service mesh uses a sidecar proxy container, while library-based approach uses a library embedded in the app code.
Fill all three blanks to complete the Kubernetes manifest snippet for injecting a service mesh sidecar.
apiVersion: apps/v1
kind: Deployment
metadata:
name: myapp
spec:
template:
metadata:
annotations:
[1]: "enabled"
spec:
containers:
- name: myapp
image: myapp:latest
- name: [2]
image: [3]The annotation 'sidecar.istio.io/inject' enables sidecar injection. The sidecar container is named 'istio-proxy' and uses the Envoy image.