Our setup:
We have a master project A
, and two other projects, B
and C
. In project A
, we have a shared VPC with networks A
, B
, and C
(related to which project they're meant to serve). The VPC for B
is shared from project A
to project B
, and the VPC for C
is shared from project A
to project C
. The networks are peered with each other.
Within project A
, we have a private Cloud DNS zone which forwards to two DNS servers. One of these servers is in project A
and network A
, and one of them is in project B
on network B
. We have selected all networks (A
, B
, and C
) to be included in this DNS zone.
Our problem:
Cloud DNS appears not to be sharing properly across these networks. With experimentation, we have found that instances will be able to resolve records that are on a DNS server on the same network, but not on another network. ie:
An instance on network A
will be able to resolve a domain from the network A
DNS server, but not from a network B
DNS server, and vice versa. However, if you explicitly define the DNS server, it works as expected.
For example, let 10.0.0.1
have an A record for foo.com
, and 10.0.1.1
have an A record for bar.com
. They are hosted on network A
and network B
respectively:
On an instance from network A
:
- Running
nslookup foo.com
will resolve. - Running
nslookup bar.com
will returnSERVFAIL
. - Running
nslookup bar.com 10.0.1.1
will resolve.
Similarly, using an instance on network B
- Running
nslookup bar.com
will resolve - Running
nslookup foo.com
will returnSERVFAIL
- Running
nslookup foo.com 10.0.0.1
will resolve
And network C
:
- Running
nslookup foo.com
will returnSERVFAIL
- Running
nslookup bar.com
will returnSERVFAIL
- Running
nslookup foo.com 10.0.0.1
will resolve - Running
nslookup bar.com 10.0.1.1
will resolve
I'm unsure why this behaviour is as it is.
What has been tried/confirmed
- We have ensured all networks can communicate on TCP/UDP port 53, and that both nameservers can be seen from all networks
- We have tried adding policies (which gave a similar result, only failures returned
NXDOMAIN
rather thanSERVFAIL
) - We have looked into DNS peering, which is not applicable here
Any help here would be appreciated. I'm aware that private zones in Cloud DNS are still a Beta feature, but this setup should currently be possible according to the documentation.