How to create an GKE HTTP(S) Load Balancer without domain or hostname

4/16/2019

I have a service called controller running on a GKE cluster.

controller   NodePort    10.27.XX.XX    <none>        80:32544/TCP                 2d

I have exposed this service with an Ingress. The Ingress file:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  namespace: voip
  name: basic
spec:
  backend:
    serviceName: controller
    servicePort: 80

After running kubectl -n voip get ingress. I see:

NAME      HOSTS     ADDRESS       PORTS     AGE
basic     *         34.95.XX.XX   80        4h

I am running a React App that is calling this ip address as the server the ingress is pointing to is a RESTful API to gran information from the cluster. However, because the React app is running over HTTP(S) The browser will not allow the app the make calls to http://34.95.XX.XX. However, the ingress is not set up to take HTTP(S) traffic. I can not seem to figure out how to set up HTTP(S) traffic to this cluster without a domain name. I want to create a cluster per customer and each cluster will have its own controller service to communicate with the Front-end app. So how do I create a HTTP(S) Load Balancer on GKE without a domain name ?

-- Adrian Humphrey
google-kubernetes-engine
kubernetes
kubernetes-ingress
load-balancing
nginx

0 Answers