consul-k8s
consul-k8s copied to clipboard
sync service with ingress external ip
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
Currently I don't think this is supported.
This is now supported with this PR and has been released in Consul-k8s: https://github.com/hashicorp/consul-k8s/pull/2098