Does running an app on gke allow you to build a SaaS where customers use their own domains?

2/25/2018

If my application runs on GKE, will this give me the flexibilty to run a SaaS product where customers use their own domain names?

The one thing I need to confirm is that I want my customers to be able to use their own custom domains and point them (A-record and CNAME) to my service's IP address.

Example, say I am creating a SaaS product that is a CMS. Customers will use their own domain name and point it to my service's IP like:

My SaaS runs on example.com

Customers will have their own domain and do the following DNS changes:

  1. A record 1.2.3.4
  2. CNAME to myservice.example.com

Will I need to do anything else to allow my customers to use their domain name? This has to scale to tens of thousands of domains (in theory).

I'm not sure when I run a GKE cluster, do I get a static IP address?

-- Blankman
dns
google-cloud-platform
google-kubernetes-engine

1 Answer

2/26/2018

You can use an ingress resource, which is an HTTP(S) Load Balancer, to expose your application in GKE using a global static IP. If you have your application deployed, the next steps are:

  • Create a global static IP.

gcloud compute addresses create your-static-ip-name --global

  • Once you have it reserved, create an ingress resource with:

kind: Ingress metadata: annotations: kubernetes.io/ingress.global-static-ip-name: your-static-ip-name

You can get more detailed information in the official docs to Configure Domain Names with Static IP Addresses

-- cryotek
Source: StackOverflow