# Troubleshooting Guide Common issues and solutions for API Gateway deployment. ## Gateway Issues ### Gateway Pods Not Starting **Symptoms**: - Gateway pods in `CrashLoopBackOff` or `Error` state - Pods continuously restarting **Diagnosis**: ```bash # Check pod status kubectl get pods -n -l app.kubernetes.io/name=gateway # View pod logs kubectl logs -n # Describe pod for events kubectl describe pod -n ``` **Common Causes & Solutions**: **1. Configuration Store Connection Failure** ```bash # Check Data Plane Manager is running kubectl get pods -n -l app=dp-manager # Verify configuration endpoint kubectl get configmap -n -o yaml | grep endpoint # Expected: Configuration store endpoint URL ``` **2. TLS Certificate Issues** ```bash # Verify TLS secret exists kubectl get secret -n # Check certificate validity kubectl get secret -n -o jsonpath='{.data.tls\.crt}' | base64 -d | openssl x509 -noout -dates ``` **3. Configuration Error** ```bash # Check gateway ConfigMap kubectl get configmap -n -o yaml # Validate YAML syntax kubectl get configmap -n -o yaml | yq eval '.' ``` ### Gateway Returns 404 for All Routes **Symptoms**: - All requests return HTTP 404 - Routes configured but not working **Diagnosis**: ```bash # Check if routes are published in Dashboard # Navigate: Services → → Routes # Verify: Route status shows "Published" # Check gateway logs for route loading kubectl logs -n -l app.kubernetes.io/name=gateway --tail=100 | grep -i route ``` **Solutions**: **1. Routes Not Published** - Routes synced via CLI are NOT active until published - Publish each route in Dashboard: - Services → Select service → Routes tab - Click "Publish" for each route - Select appropriate gateway group **2. Wrong Gateway Group** ```bash # Verify gateway group kubectl get deployment -n -o yaml | grep GATEWAY_GROUP # Expected: Configured group name ``` **3. Host Header Mismatch** ```bash # Test with correct Host header curl -H "Host: app.domain.com" http:/// # Check route configuration dump --server --token ``` ### Gateway Service Unavailable (503) **Symptoms**: - Requests return HTTP 503 - Gateway is running but can't reach backends **Diagnosis**: ```bash # Check backend service exists kubectl get svc -n # Check backend endpoints kubectl get endpoints -n # Check gateway logs kubectl logs -n -l app.kubernetes.io/name=gateway --tail=100 | grep -i "503\|upstream" ``` **Solutions**: **1. Backend Service Not Found** ```bash # Verify service exists kubectl get svc -n # Check service name in route config matches dump --server --token | grep -A 5 upstream ``` **2. No Healthy Endpoints** ```bash # Check if pods are running kubectl get pods -n -l app= # Verify endpoints exist kubectl get endpoints -n # If empty, check service selector kubectl get svc -n -o yaml | grep -A 3 selector kubectl get pods -n --show-labels | grep