Introduction
Linkerd proxy injector webhook is unreachable when service or certificate is misconfigured. This guide provides step-by-step diagnosis and resolution with specific commands and configuration examples.
Symptoms
Typical symptoms and error messages when this issue occurs:
Service mesh error: operation failed
Check proxy and control plane logs
kubectl logs -n istio-system deployment/istiodObservable indicators: - Service mesh proxy logs show configuration errors - Control plane reports validation failures - Traffic routing does not match expected behavior
Common Causes
- 1.Sidecar injection failures are caused by:
- 2.Injection disabled by namespace label
- 3.Pod annotation "sidecar.istio.io/inject: false"
- 4.Injector webhook unreachable or timing out
- 5.Resource quota preventing container creation
Step-by-Step Fix
Step 1: Check Current State
linkerd checkStep 2: Identify Root Cause
linkerd viz stat deploy -n <namespace>Step 3: Apply Primary Fix
```yaml # Enable Linkerd injection for namespace kubectl annotate namespace my-namespace linkerd.io/inject=enabled
# Verify injection kubectl get pods -n my-namespace -o jsonpath='{.items[*].spec.containers[*].name}'
# Should show: app linkerd-proxy ```
Apply this configuration:
kubectl apply -f virtualservice.yamlStep 4: Apply Alternative Fix (If Needed)
```bash # Verify configuration istioctl analyze
# Check proxy status istioctl proxy-status
# View effective configuration istioctl proxy-config all <pod-name> ```
Step 5: Verify the Fix
After applying the fix, verify with:
linkerd check && linkerd viz stat deploy -n <namespace>Expected output should show healthy proxies and correct routing.
Common Pitfalls
- Missing namespace annotation
- Identity issuer certificate expired
- CNI plugin not installed correctly
- Proxy resource limits too low
Best Practices
- Use linkerd check for health verification
- Configure proxy resources appropriately
- Enable mTLS for all services
- Use service profiles for routing
Related Issues
- Linkerd Proxy Injection Label Missing
- Linkerd Identity Issuer Error
- Linkerd Service Profile Not Working
- Linkerd TLS Not Enabled