# rpc error: code = Unavailable desc = last connection error: connection error: desc = "transport: Error while dialing: dial tcp: lookup grpc.example.com on 10.0.0.2:53: no such host"

- **ID:** `go/grpc-unavailable-subchannel-transient-failure`
- **Domain:** go
- **Category:** network_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

DNS resolution failed for the gRPC target. Common in Kubernetes when the service name is wrong, the DNS server is unreachable, or the pod's resolv.conf is misconfigured.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 1.30+ | active | — | — |

## Workarounds

1. **** (92% success)
   ```
   // Use <service>.<namespace>.svc.cluster.local
conn, _ := grpc.Dial("users.default.svc.cluster.local:50051", grpc.WithTransportCredentials(insecure.NewCredentials()))
   ```
2. **** (88% success)
   ```
   conn, _ := grpc.Dial("dns:///users.default.svc.cluster.local:50051",
  grpc.WithTransportCredentials(insecure.NewCredentials()),
  grpc.WithDefaultServiceConfig(`{"loadBalancingConfig":[{"round_robin":{}}]}`))
   ```

## Dead Ends

- **** — Breaks when the backend pod is rescheduled; loses load balancing across replicas (75% fail)
- **** — DNS NXDOMAIN returns immediately; a longer timeout does not make the name resolve (90% fail)
