Using Kubernetes, I'm trying to map *.api requests to *.
I found this thread which helps me how to achieve this and it's working by updating the CoreDNS configuration.
But I would like to do this via a yaml apply so it can be easily deployed to different environments. Also if the CoreDNS config changes in a later release, I won't be getting those changes.
So my question is, how could I apply a yaml file to achieve this:
rewrite stop {
name regex (.*)\.api {1}.some-namespace.svc.cluster.local
answer name (.*)\.some-namespace\.svc\.cluster\.local {1}.api
}
I found this article: https://docs.microsoft.com/en-us/azure/aks/coredns-custom
But I'm unable to figure out how I can use that example for my use-case.