Reputation: 16903
Google AppEngine apps are automatically accessible via DNS at a predictable location (appname.appspot.com
). Is the same true for Google Container Engine instances?
It's simple to give GKE instances a public IP, but this doesn't work well if you want to share demo links (without worrying that they'll change) or use Google OAuth (which does not allow static IPs as callback URLs).
I can register a domain and configure subdomains to point at the IP for each container engine instance using Google Cloud DNS. But it would be simpler if GKE did this already!
Upvotes: 7
Views: 1106
Reputation: 18200
Google Container Engine does not automatically associate a DNS hostname with either the master endpoint nor any application that you launch in your cluster.
Instances (VMs) in the cluster have public IPs (and you can open firewall rules to make them publicly accessible), but you should generally be contacting services (which represent applications) rather than instances directly.
Services for which you create an external load balancer (L3 or L7) will have a public IP but do not automatically get an associated DNS name.
App Engine promotes a 1:1 relationship between an App (where you are select a globally unique name upon creation if you want an appspot.com domain) and your deployed code.
Container Engine allows you to deploy multiple "apps" in a single cluster, and doesn't require registering a globally unique name when creating the cluster or creating a service. This gives you more flexibility, but also means that if you want to map a DNS name to your application you must do it yourself.
It wouldn't be unreasonable to expect the Ingress controller (used to create L7 services) to help streamline this process, but it doesn't do that today. Feel free to file a feature request on github.
Upvotes: 7