Pivotal Knowledge Base


Application Container Unable to Resolve DNS in Google Cloud Platform


  • Pivotal Cloud Foundry (PCF) 1.8, 1.9, and 1.10
  • Elastic Runtime 1.8, 1.9, and 1.10
  • Google Cloud Platform (GCP)


After installing the PCF, the apps manager is able to log in but no information retrieved. Further investigation found application container fail to resolve Domain Name Server (DNS) from


In Elastic Runtime, the application container inherits its DNS configuration from BOSH network configuration. The "Installing Ops Manager" documentation suggests that you configure the Bosh Director's DNS as `,`. However, if you omit the second DNS entry, this will configure the Director and all Bosh Deployed virtual machines (VMs) to only use GCP's internal DNS.

This effectively gives Bosh deployed VMs a `/etc/resolv.conf` with the following:

nameserver is added by the consul job running on the Diego Cell VM as part of the service discovery function via DNS. is GCP's metadata endpoint and also functions as an internal DNS resolver.

As mentioned above, Elastic Runtime and your application containers inherit their DNS configuration from the Bosh Director's DNS configuration. If the Bosh Director's DNS is configured as suggested by the documentation, you'll end up with `,`. If you omit ``, you'll end up with just ``. The second situation, omitting `` (or some public DNS server) is what causes the issue described in this KB.

The reason for this is because of the Consul endpoint, `` is not added to the container's DNS list, and the metadata endpoint of cloud providers like AWS, Azure and Google Cloud Platform is not accessible from inside the container. If it were accessible, the endpoint would expose sensitive environment information about your GCP environment to potentially untrusted apps running in the container. Because this endpoint is blocked and because no public DNS server was specified, the application container does not have access to a DNS resolver.


A new field in Elastic Runtime -> Application Containers -> DNS Servers has been introduced in version 1.10 and above. This value overrides DNS servers to be used in containers. The user can specify in the BOSH DNS configuration, and then particularly specify in the application container DNS configuration to override the default value


Powered by Zendesk