My current development environment includes:
- Cloudflare
- Azure API Management (APIM) for API routing
- DigitalOcean Kubernetes Cluster (DOKS) with services exposed via NGINX Ingress Controller
I have configured DNS A records in Cloudflare (e.g., stock-dev.example.com pointing to the ingress load balancer IP), which allows public access to services in the DigitalOcean Kubernetes Cluster(DOKS). While this setup works for development, I rightly noted that it’s not ideal for production. Now, when I call stock-dev.example.com/health, it responses 200.
Our developers have configured APIM to route requests to backend services (e.g., https://stock-dev.example.com, https://user-dev.example.com) via Cloudflare. This flow — APIM → Cloudflare → Backend Services — is currently functioning as expected. For example, in the Postman, I type APIM endpoint with the necessary headers and test it. It was success. This is just confirmation for current work flow.
However, I am now looking to reverse the flow to:
Cloudflare → APIM → Backend Services
To achieve this, I am seeking guidance on how to configure Cloudflare to route traffic to APIM (e.g., apis-dev.example.com → APIM endpoint), and what changes may be needed within APIM to support this architecture.
- I will call the https://apis-dev.example.com/dev/v1/member-service
- It should redirect to our backend service but now, I got the "HTTP Error 404. The requested resource is not found."
- I already configured APIM Endpoint in the Cloudflare DNS Record as CNAME( apis-dev.example.com >>> APIM Endpoint) but I got the error in the step 2.
So, what did I miss configure? Any correction! I did not find in the Google. Some are suggest to use Virtal Network (External) and then in the NSG, Azure APIM allow Cloudflare's IPs. I am not sure it is related the current issue. Thanks