API Proxy Deployment Issues
Problem Symptoms
API Proxy deployment issues usually manifest themselves with the following symptoms:
- Deployment operation failing
- API Proxy not being deployable
- API not working after deployment
- Version conflict errors
- Environment mismatch errors
Problem Causes
API Proxy deployment issues can usually be caused by the following factors:
- Configuration Errors: Errors in API Proxy configuration
- Environment Issues: Target environment not being ready
- Resource Insufficiency: Insufficient CPU, RAM, or storage
- Dependency Issues: Missing or incompatible dependencies
- Network Issues: Gateway access issues
- Policy Issues: Policies not being deployable
- Version Conflict: Version conflicts
Detection Methods
1. Deployment Log Analysis
Check deployment logs:
kubectl logs <gateway-pod-name> | grep -i "deploy"
kubectl logs <gateway-pod-name> | grep -i "error"
kubectl describe pod <gateway-pod-name>
2. Checking API Proxy Status
Follow the steps below to check API Proxy status:
- Check API Proxy's deployment status
- Check which environment it was deployed to
- Review deployment history
3. Environment Check
Check the target environment:
- Check that the environment is active
- Check that Gateway pods are running
- Check environment resources
Solution Recommendations
1. Configuration Check
Check API Proxy configuration:
- Endpoints: Are endpoint definitions correct?
- Policies: Are policies correctly configured?
- Upstream Targets: Are backend targets correct?
- Routing: Are routing rules correct?
2. Environment Preparation
Prepare the environment:
- Ensure the environment is active
- Check that Gateway pods are running
- Check that there are sufficient resources
- Check network connection
3. Resource Allocation
Ensure there are sufficient resources:
resources:
limits:
cpu: "2"
memory: "4Gi"
requests:
cpu: "1"
memory: "2Gi"
4. Dependency Check
Check dependencies:
- Are policies deployed?
- Are Connections defined?
- Are Identity Providers ready?
- Are Certificates loaded?
5. Version Management
Check version management:
- Check current version
- Resolve version conflicts
- Use rollback mechanism
6. Incremental Deployment
Perform incremental deployment:
- Deploy to test environment first
- Move to production after tests pass
- Use blue-green deployment
- Use canary deployment
Common Error Scenarios and Solutions
Scenario 1: Policy Deployment Error
Symptoms:
- "Policy deployment failed" error
- Policies not being applied
Solution:
- Check policy configuration
- Check policy syntax
- Check policy dependencies
Scenario 2: Environment Not Found
Symptoms:
- "Environment not found" error
- Deployment not finding target environment
Solution:
- Check environment name
- Check that environment is active
- Check environment access permissions
Scenario 3: Resource Exhaustion
Symptoms:
- "Insufficient resources" error
- Pods not being schedulable
Solution:
- Check cluster resources
- Reduce resource requests
- Enable auto-scaling
Scenario 4: Network Connectivity
Symptoms:
- "Connection refused" error
- Cannot access Gateway
Solution:
- Check network policies
- Check service endpoints
- Check DNS resolution
Scenario 5: The management screen shows "undeployed" but the API still responds
Symptoms:
- The environment appears as "undeployed" on the API Proxy screen, yet calling the same address through the Gateway returns
200 - Setting changes made in the Manager (backend address, policy, cache duration) never take effect on the calls
- No "redeploy required" warning ever appears
In this situation the Gateway Worker keeps serving the proxy with the configuration snapshot it received at deployment time; later changes made in the Manager never reach it.
Detection:
- The most direct way: call the Management API
route-healthendpoint for the environment in question. Aninconsistent: trueanswer means the manager record and the worker reality have drifted apart; the combinationdeployedInManager=false+routeActive=trueis exactly this situation - To verify by hand: call the Gateway address of a proxy that appears "undeployed" in the Manager. If it returns
200instead of404, the same conclusion holds. Do not guess the address; read it from theinvoke-infoendpoint — it returns the real invocation address even for records that appear undeployed
Solution:
- If the API Proxy still exists: redeploy it to the environment (which refreshes the configuration) or explicitly undeploy it (which removes the route immediately)
- If the API Proxy has been deleted: only restarting the affected Gateway Worker pod clears the route; the Worker reloads deployment records from the database at startup
The known causes of this inconsistency (updating with an invalid environment name, overriding import, promotion update) have been fixed, and deleting an API Proxy now sends an undeploy to every running environment regardless of its deployment record. Inconsistencies left over from earlier versions are cleared with the steps above.
Best Practices
1. Pre-Deployment Checklist
Pre-deployment checklist:
- Is API Proxy configuration correct?
- Are all policies deployed?
- Is environment ready?
- Are there sufficient resources?
- Did tests pass?
2. Deployment Strategy
Apply the following approaches for deployment strategy:
- Test First: Deploy to test environment first
- Gradual Rollout: Perform gradual rollout
- Monitoring: Monitor after deployment
- Rollback Plan: Prepare rollback plan
3. Monitoring
Track the following metrics for post-deployment monitoring:
- Monitor API Proxy status
- Check error rates
- Monitor response times
- Check resource usage