I'm attempting to access a service in an existing kubernetes cluster deployed in a remote machine. I've configured the cluster to be accessible through kubectl from my local mac.

$ kubectl cluster-info
Kubernetes master is running at
KubeDNS is running at

The ingress configuration for the service I want to connect is:

kind: Ingress
apiVersion: extensions/v1beta1
  name: gw-ingress
  namespace: vick-system
  selfLink: /apis/extensions/v1beta1/namespaces/vick-system/ingresses/gw-ingress
  uid: 52b62da6-01c1-11e9-9f59-fa163eb296d8
  resourceVersion: '2695'
  generation: 1
  creationTimestamp: '2018-12-17T06:02:23Z'
    kubectl.kubernetes.io/last-applied-configuration: >
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/affinity: cookie
    nginx.ingress.kubernetes.io/session-cookie-hash: sha1
    nginx.ingress.kubernetes.io/session-cookie-name: route
    - hosts:
        - wso2-apim-gateway
    - host: wso2-apim-gateway
          - path: /
              serviceName: gateway
              servicePort: 8280
      - ip:

My list of services are: enter image description here

My /etc/hosts file looks like below:

# Host Database
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##   localhost broadcasthost
::1             localhost wso2-apim-gateway wso2-apim wso2sp-dashboard

What is the URL I should use to access this service from my local browser? Should I do any more configurations?

1 Answer 1


https://wso2-apim-gateway/ is the URL that will point to the gateway service according to your configuration. This is defined by the host: wso2-apim-gateway part of your configuration. Note that your load balancer ( is a private IP address, so you will need to be on the same network to access it.

I can't see any further configuration required, except perhaps TLS certifications - if you receive a 5xx response, you may want to check the logs of the ingress-nginx deployment/replicaset.

  • Yes. The problem was with the external IP of the nodeport I was using. I edited it to the actual IP of the remote host it was running and also replaced the entry in /etc/hosts with that IP and things worked well.
    – Pasan W.
    Dec 23, 2018 at 3:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.