-
Notifications
You must be signed in to change notification settings - Fork 385
Talking to agent with downward API fails when hosts have multiple IPs (ex. EKS w/ aws-cniI) #43
Comments
Also, this is my values.yml I used
|
The issue here is the
I'm not sure what the thinking is behind using the |
@jipperinbham Consul tooling should use the local agent wherever possible. The servers aren't meant to field cluster-wide API requests on their own (though they can to a fairly high scale). The local agent performs aggressive API batching, pipelining, and TCP multiplexing along with local caching to make Consul a lot more performant. Additionally, in the case of the catalog sync, it provides a local agent to register a service against in some cases which provides proper node health checking. Please ensure you have the Consul clients installed using the Helm chart. This will expose the agent HTTP API on port 8500 on the host IP. |
Gotcha, that definitely makes sense and it looks like the
so it's not actually binding to the host ports specified and explains why my setup as well as @popopanda are experiencing the issue. |
This same issue occurs with Digital Ocean's k8 offering. The only way to resolve is to change the host ip the sync catalog deployment to reflect the internal domain of the consul server service rather than piggy backing off of the clusterIp which is injected via hostip https://github.com/hashicorp/consul-helm/blob/master/templates/sync-catalog-deployment.yaml#L36
Perhaps this should be optional in the values.yml For others looking, a present fix is to override the sync-catalog-deployment.yaml file with the change to reflect the consul service name as the hostIp. |
Just for me to refer to later, the issue is that we're using the downward API to inject the HOST_IP environment variable so we can talk to the agent running on our node. In some deployments, ex. EKS with the aws-cni plugin that uses multiple enis, the HOST_IP is only one IP of multiple and so we might not be able to talk to the agent on that specific HOST_IP. I'm not sure why we're not using hostNetwork and will need to ask the team. |
@jipperinbham we are running with consul-helm/templates/client-daemonset.yaml Line 156 in 24d3115
|
@ptariche I just tested this chart with Digital Ocean and the sync deployment could reach the local consul agent using its hostPort. Maybe something has changed on DO's side? |
@popopanda from my testing, this should be working. Since this ticket is 1 year old, it's likely things have changed. It's totally our fault that this has sat here for so long but I'm going to close it now. If folks are still having issues with the sync catalog pod not being able to talk to the local consul agent please open a new issue. |
Hello,
I have an EKS cluster with 3 workers, and deployed Consul and Rabbitmq via Helm. Both services are running, and I am able to access the Consul UI.
Each eks-worker in AWS has a private IP, as well as a few secondary IPs, which are used for Pods.
I am attempting to get syncCatalog working, but I am getting connection refused.
IP - 10.20.62.49 is a primary ip of one of my eks-workers, however the pod that runs consul server (8500) is actually running on a secondary IP - 10.20.61.120 on that same eks-worker.
How can I register services the Consul cluster via the pod IP address which is on my eks-worker's secondary IP, and not connect to the primary ip?
Please let me know if I need to provide more information
Thank you
The text was updated successfully, but these errors were encountered: