Kubernetes Simulator
intermediate · ~10 min
Moved out
Ticket from Priya Raman, senior backend developer
cart calls the payment gateway as http://paygate. Platform is moving the gateway to our provider this morning, at api.paygate.example.
I'd rather not rebuild and redeploy cart for a hostname. Can the cluster keep answering paygate for us?
ExternalName Services
A Service with type: ExternalName is a DNS alias: cluster DNS answers its name with a CNAME to externalName. No cluster IP, no endpoints, no proxying — the client connects straight to the outside host, and the Host header it sends still says the alias, which some providers reject. Docs
Objectives
- paygate resolves to api.paygate.example inside the cluster
- Bonus: Leave cart's own config untouched
Best on a computer with a keyboard. It works on a phone, with shortcuts under the terminal.