Sidecar Proxy
Automatic Sidecar Injection
kubectl label namespace default istio-injection=enabledkubectl apply -f k8s/deployment.yamlkubectl get podsPOD_NAME=$(kubectl get pods -lapp=helloworld -o jsonpath='{.items[0].metadata.name}')
kubectl logs ${POD_NAME} -c helloworld
kubectl logs ${POD_NAME} -c istio-proxyapiVersion: apps/v1
kind: Deployment
metadata:
name: helloworld
...
spec:
template:
metadata:
labels:
...
annotations:
# Explicitly turn off automatic sidecar injection
sidecar.istio.io/inject: "false"
spec:
...
Manual Sidecar Injection
Last updated
Was this helpful?