Score:2

Calico network policy in Kubernetes based on Domain name Regex Matching

ar flag

I have a application running with kubernetes orchestrator. I want to implement calico network policy based on domain name Regex matching. I am seeing in calico doc that they are using ip range(CIDR) to control incoming and outgoing calls.
Can same thing be done using domain name regex matching instead of CIDR ? Some example would be helpful.

For instance I want my calico network policy to allow ingress call for domain:

"^.+\\.app\\.ubuntu\\.net$ ^.+\\.aws-tools.org$ ^local\\.aws-tools\\.org$"
Score:1
jp flag

As per the official Calico documentation regex matching is only used for interface selection: interface=INTERFACE-REGEX and skip-interface=INTERFACE-REGEX. Considering that regex matching for interface selection has been implemented after a feature request you can always create a feature request for domain name regex matching here.

Wytrzymały Wiktor avatar
it flag
Hello @solveit. Does this [answer your question](https://stackoverflow.com/help/someone-answers)?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.