Front door rules for AKS by subdomains name

p.shapurau 16 Reputation points
2021-11-19T11:44:56.657+00:00

I have a question about the possibilities of using the Front door service in conjunction with my Kubernates clusters.
Front door routing rules, as I understand it, do not support subdomain names and virtual hosts?
I see that it is possible to make routing rules like '/ *', but then my Kubernates cluster will not understand this.
The Kubernates cluster expects to receive a request in the form of a subdomain name (eg service1.mydomain.com, service2.mydomain.com, etc.), not a request like '/'.
Is it possible to configure the routing rules for the Front door service to my Kubernates cluster using domain names? I want to make a dns record like *.mydomain.com configured for the Front door service and so that all subdomains (for example, service1.mydomain.com, service2.mydomain.com, etc.) are automatically sent to the records of my ingress controller in the Kubernetes cluster ( and then make several such clusters and adjust the traffic distribution on the Front door service).

Thus, I will repeat once again so that you understand the main idea: my ingress controller on the Kubernetes cluster does not understand links and requests of the form mydomain.com/something* (for example), my ingress controller is configured and it is necessary for our business to accept only links of the form service1.mydomain.com , service2.mydomain.com, etc. (it's subdomain names). How can I set up the Front door service so that my ingress controller receives requests from the Front door service not in the form of "/" and simply to a IP address, but in the form of subdomain names?

Azure Front Door
Azure Front Door
An Azure service that provides a cloud content delivery network with threat protection.
861 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. p.shapurau 16 Reputation points
    2021-12-01T14:24:46.26+00:00

    The question is completely different. But I have already found the answer and it seems to be useful for everyone. If you need to make a redirect for all subdomains to 1 address (host) on which the subdomain names are matched, then in this case, when creating a backend pool and specifying the IP address of the pool, the "Server component host header" field must be left blank, not specifying no IP addresses (as is the case by default) and not specifying a domain or subdomain name. Here's the solution!

    2 people found this answer helpful.
    0 comments No comments

  2. SaiKishor-MSFT 17,336 Reputation points
    2021-11-26T12:08:41.477+00:00

    @p.shapurau We apologize for the delay in response regarding this question.

    As mentioned in this document here, a Front Door routing rule configuration is composed of two major parts: a "left-hand side" and a "right-hand side". We match the incoming request to the left-hand side of the route while the right-hand side defines how we process the request.

    The following properties determine whether the incoming request matches the routing rule (or left-hand side):

    1. HTTP Protocols (HTTP/HTTPS)
    2. Hosts (for example, www.foo.com, *.bar.com)
    3. Paths (for example, /, /users/, /file.gif)

    These properties are expanded out internally so that every combination of Protocol/Host/Path is a potential match set.

    As mentioned, AFD will receive a request based on all the three things mentioned above and therefore, the path cannot be removed. Hope this helps.

    Please let us know if you have any further questions and we will be glad to assist you further. Thank you!

    Remember:

    Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.

    Want a reminder to come back and check responses? Here is how to subscribe to a notification.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.