- Pivotal Cloud Foundry (PCF) Versions 1.8, 1.9, and 1.10
- Elastic Runtime Versions 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 `169.254.169.254, 188.8.131.52`. 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 127.0.0.1 nameserver 169.254.169.254
127.0.0.1 is added by the consul job running on the Diego Cell VM as part of the service discovery function via DNS. 169.254.169.254 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 `169.254.169.254, 184.108.40.206`. If you omit `220.127.116.11`, you'll end up with just `169.254.169.254`. The second situation, omitting `18.104.22.168` (or some public DNS server) is what causes the issue described in this KB.
The reason for this is because of the Consul endpoint, `127.0.0.1` 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
169.254.169.254 in the BOSH DNS configuration, and then particularly specify
22.214.171.124 in the application container DNS configuration to override the default value