Where is the UI actually running in kubernetes?

hey folks,

everything in my consul federation is working as ive expected it so far. After testing stuff from CLI, I enabled UI with ingress and upgraded the helm chart. I can see the consul-ui service and ingress but can’t actually access it. Just goes connection refused.

Then i tried port forwarding

/dc1 » kubectl port-forward pod/consul-server-0 8500:8500                                                                   127 ↵ 
Forwarding from 127.0.0.1:8500 -> 8500
Forwarding from [::1]:8500 -> 8500
Handling connection for 8500
E1014 11:55:13.586378   18036 portforward.go:400] an error occurred forwarding 8500 -> 8500: error forwarding port 8500 to pod 2c58d13a21d323cbaa9b3322023571f55965a2f164c7e756b640e305d802b94a, uid : exit status 1: 2021/10/14 09:55:13 socat[1528988] E connect(5, AF=2 127.0.0.1:8500, 16): Connection refused
Handling connection for 8500

~/dc1 » kubectl port-forward consul-server-0 5000:443                                                                              
Forwarding from 127.0.0.1:5000 -> 443
Forwarding from [::1]:5000 -> 443
Handling connection for 5000
E1014 11:53:48.119002   18003 portforward.go:400] an error occurred forwarding 5000 -> 443: error forwarding port 443 to pod 2c58d13a21d323cbaa9b3322023571f55965a2f164c7e756b640e305d802b94a, uid : exit status 1: 2021/10/14 09:53:48 socat[1526965] E connect(5, AF=2 127.0.0.1:443, 16): Connection refused

now i am not sure exactly how the helm chart is configured but where is the actual UI?

Here is the reply to the actual ingress that was provisioned by GKE

~/Documents/repos/test/dc1 » curl -k xx.xx.xx.10:443                                                                                                    <html>
<head><title>400 The plain HTTP request was sent to HTTPS port</title></head>
<body>
<center><h1>400 Bad Request</h1></center>
<center>The plain HTTP request was sent to HTTPS port</center>
<hr><center>nginx</center>
</body>
</html>

kubectl get service consul-ui shows me the EXTERNAL-IP that I need to hit via browser to access the Consul UI.

My consul UI is deployed as a LoadBalancer type-

ui:
  service:
    type: "LoadBalancer"

Does this help?

Thanks. But I am using ingress object to expose the consul-ui service which is of type clusterIP.

It looks like you have HTTPS enabled so for your port forward you’d need port 8501 and for your curl to your ingress did you try using https:// at the front?

Thanks, does this look okay to you?

ui:
  enabled: true
  service:
    enabled: true
    type: null
    port:
      http: 80
    #  https: 443
    nodePort:
      http: null
      https: null
    annotations: null
    additionalSpec: null
  ingress:
    enabled: true
    hosts: 
      - host: myendpoint.mydomain.com
    tls: 
     - hosts:
        - myendpoint.mydomain.com
    annotations: |
      "kubernetes.io/ingress.class": "my-ingress-clas"