How to Use Service Mesh (Istio, Linkerd) with Go Services

Integrate Istio or Linkerd with Go services by installing the control plane and enabling sidecar injection to handle traffic management automatically.

You integrate Istio or Linkerd with Go services by installing the service mesh control plane, injecting sidecar proxies into your pods, and configuring your Go application to use standard HTTP/2 or gRPC clients without code changes.

# Install Istio with sidecar injection enabled
istioctl install --set profile=default

# Label your namespace for automatic sidecar injection
kubectl label namespace default istio-injection=enabled

# Deploy your Go service (sidecar injects automatically)
kubectl apply -f deployment.yaml

For Linkerd, the process is similar but uses the linkerd CLI:

# Install Linkerd control plane
linkerd install | kubectl apply -f -

# Inject sidecar into your Go service manifest
linkerd inject deployment.yaml | kubectl apply -f -