Hello!
I using this template for oldest project with managed routing agent.
apiVersion: networking.doks.digitalocean.com/v1alpha1
kind: Route
metadata:
name: nat-gateway-route
spec:
destinations:
- 0.0.0.0/0
gateways:
- 1.2.3.4
I tried this in fresh cluster, and this template broke the ingress traffic.
I need to access a service with a fixed IP address. Unfortunately, they don’t tell me exactly what IP addresses their service can be accessed from. Is there a way to route all traffic to the nat gateway like before?
thanks!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
I changed the load balancer type from REGIONAL_NETWORK to REGIONAL. That’s solved my problem.
Hi there,
As far as I understand, you should still be able to route all outbound traffic through a specific gateway using the routing agent by setting 0.0.0.0/0 as the destination, but there are a few things to keep in mind.
If your DOKS cluster uses VPC-native networking, this setup should work fine and let you send all egress traffic through your NAT gateway. However, on older clusters or ones using Network Load Balancers for ingress, overriding the default route can break ingress routing. In those cases, you can use a nodeSelector in your route definition to exclude ingress nodes from the default route override.
Here’s the full guide from the docs that walks through this setup: https://docs.digitalocean.com/products/kubernetes/how-to/use-routing-agent/
If you’re not sure whether your cluster supports this configuration, I’d suggest reaching out to support so they can confirm and make sure everything’s set up safely: https://cloudsupport.digitalocean.com/
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.