No documentation on how to deregister an Envoy Ingress Gateway/proxy


Looking at:
There is no clear way how to deregister the ingress envoy proxy

An ingress proxy started with:
consul connect envoy -gateway=ingress -register -service ingress-service -address ‘{{ GetInterfaceIP “eth0” }}:8888’

I have tried the following to deregister:
consul connect envoy -gateway=ingress -deregister -service ingress-service
consul connect -deregister -service ingress-service
consul services deregister ingress-service
consul connect envoy services deregister ingress-service
consul connect envoy -gateway=ingress services deregister ingress-service
consul connect envoy -gateway=ingress deregister ingress-service

Can anyone assist me?

Hi @CarelvanHeerden,

You can deregister an ingress using consul services deregister or using the deregister service endpoint from the HTTP API. First you will need to determine the ID of the ingress gateway. You can do this via the UI or API.

To find the ID via the UI, navigate to Services, find and click on your ingress gateway (mine is named ingress-gateway), then click on the Instances tab.

I’ve drawn a rectangle around the ID.

You can also find the ID using the API’s /catalog/service/:service_id endpoint. I’m using jq to retrieve the ServiceID field from the response output.

$ curl | jq --raw-output '.[0].ServiceID'

Once you have the ID you can deregister the service using the CLI or API.

$ consul services deregister -id=hashicorp-consul-ingress-gateway-67cbd774b7-ngq9h
Deregistered service: hashicorp-consul-ingress-gateway-67cbd774b7-ngq9h


curl --request PUT

I hope this helps. Please let me know if you have any additional questions.

Hello Blake.

That worked, Thanks!

I did get the below error, however, it did work.

consuladmin@consul000001:~$ consul services deregister id=_nomad-task-4210affb-     
Error: config: Open failed on id=_nomad-task-4210affb-7be6-f8ec-d62b-5787ba91745c- 
proxy-ingress-test-nomad-job-http. open id=_nomad-task-4210affb-7be6-f8ec-d62b- 
5787ba91745c-proxy-ingress-test-nomad-job-http: no such file or directory