I have created a standard GKE cluster, I want to change default domain “cluster.local” to something which is accessible from internet so that I can implement IMS (project clearwater) to be accessible on internet.
Kubernetes version: 1.12-1.13
Cloud being used: GCP
Installation method: GKE
You need to expose your application using either a Type
Service or use an
Ingress that will deploy a Google Global Load Balancer.
Check this documentation for more information Using a Service to Expose Your App | Kubernetes.
I know there are ways to expose applications, I still need a solution for original question: what is the method to change GKE cluster domain name, if there is one.
What do you think changing the suffix will do for this problem? What problem are you trying to solve?
I work with a legacy client/server app on which I try to run only server inside the cluster in a headless service.
The FQDN as is auto-detected by the server inside cluster (
my-svc.my-namespace.svc.cluster.local) should be also usable by the client.
While I found few tricks/hacks/work-arounds on how to get this working, I am still looking for the clean solution, which would be to simply change the cluster domain to something meaningful.
I saw it is possible to change cluster domain in native Kubernetes instances, but I have not found a way to do this in GKE.
Ahh, it’s this autodetection that is going wrong. GKE does not (yet?) offer a way to change that suffix, and there’s not really a clean way to change the hostname that is seen inside the pod.
One approach that might work (have not tested it) would be to run an init container with privileges to set the hostname to whatever you want, and then let the “real” app find it.