consul-k8s icon indicating copy to clipboard operation
consul-k8s copied to clipboard

sync service with ingress external ip

Open VIssakov opened this issue 3 years ago • 1 comments

i have i strange question.

Can we sync services from k8s to consul, but with ingress external ip?

Example i have some cluster and service in that cluster without EXTERNAL-IP,

$ kubectl get services -n one
NAME      TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)   AGE
one   ClusterIP   172.16.10.53   <none>        80/TCP    8h

this service available for users via ingress EXTERNAL-IP

 $ kubectl get services -n ingress-nginx
NAME                                            TYPE                 CLUSTER-IP    EXTERNAL-IP      PORT(S)                      AGE
ingress-nginx-controller             LoadBalancer   172.16.1.254   10.225.147.100   80:31574/TCP,443:30834/TCP   11d

so i wanna register service one in consul, but with ingress-nginx-controller EXTERNAL-IP 10.225.147.100

VIssakov avatar Jul 27 '22 23:07 VIssakov

Currently I don't think this is supported.

lkysow avatar Aug 18 '22 15:08 lkysow

This is now supported with this PR and has been released in Consul-k8s: https://github.com/hashicorp/consul-k8s/pull/2098

david-yu avatar Jun 16 '23 23:06 david-yu