You are troubleshooting a microservice on OKE that is experiencing intermittent 502 Bad Gateway errors when communicating with another internal service. The application uses Kubernetes ClusterIP services for discovery. You suspect DNS resolution failure within the cluster. Which diagnostic tool and approach should you use inside the OKE cluster?
Trap 1: Check the OCI VCN internet gateway route table.
An internet gateway route table governs egress to public endpoints, not in-cluster ClusterIP DNS resolution, so it cannot reveal why service names fail to resolve. It is tempting because VCN routing underpins OKE networking, but ClusterIP traffic stays internal and never traverses that gateway.
Trap 2: Review OCI Cloud Guard threat detection policies.
Cloud Guard detects misconfigurations and threats across OCI tenancies; it does not resolve in-cluster DNS queries or surface CoreDNS failures. It is tempting because it is a security diagnostic service, but intermittent 502s from name resolution require querying CoreDNS directly from a pod.
Trap 3: Restart the OCI API Gateway service.
OCI API Gateway fronts external HTTP traffic into the cluster; restarting it cannot fix internal ClusterIP DNS lookups between pods. It is tempting because 502 errors often implicate gateways, but the failing path here is service-name resolution inside the cluster, not the ingress tier.
- A
Check the OCI VCN internet gateway route table.
Why it fails: An internet gateway route table governs egress to public endpoints, not in-cluster ClusterIP DNS resolution, so it cannot reveal why service names fail to resolve. It is tempting because VCN routing underpins OKE networking, but ClusterIP traffic stays internal and never traverses that gateway.
- B
Deploy a temporary diagnostic container pod (such as netshoot) and test DNS resolution using nslookup against CoreDNS.
A temporary netshoot pod runs inside the cluster, inheriting the same CoreDNS configuration and network namespace as application pods. Querying CoreDNS with nslookup from there isolates whether intermittent 502s stem from in-cluster DNS resolution failures.
- C
Review OCI Cloud Guard threat detection policies.
Why it fails: Cloud Guard detects misconfigurations and threats across OCI tenancies; it does not resolve in-cluster DNS queries or surface CoreDNS failures. It is tempting because it is a security diagnostic service, but intermittent 502s from name resolution require querying CoreDNS directly from a pod.
- D
Restart the OCI API Gateway service.
Why it fails: OCI API Gateway fronts external HTTP traffic into the cluster; restarting it cannot fix internal ClusterIP DNS lookups between pods. It is tempting because 502 errors often implicate gateways, but the failing path here is service-name resolution inside the cluster, not the ingress tier.