-
Notifications
You must be signed in to change notification settings - Fork 385
how to add health check for synced service #131
Comments
got same question, all the synced services from k8s to consul have no health check |
For users that are setting up ACLs themselves (e.g. they have external Consul servers so can't use bootstrapACLs) this allows them to create their own Kubernetes auth method that the init container will use during connect injection to receive an ACL token. Fixes #131
Hi @webliupeng I'll try to answer your questions one by one.
There should be services synced into Consul from Kubernetes: They don't have any health checks so they shouldn't be unhealthy. Can you explain further what you mean by this?
The sync works differently than the way services are usually registered into Consul. The way we sync services we don't end up syncing each individual Pod to Consul. Since each instance of a service doesn't necessarily correspond to a Node we create a "fake" node called k8s-sync to register the services on. This node has no health checks because it's not a real node.
Because Regarding health checks in general. Currently there's no way to add health checks to the service that's synced from Kubernetes. Kubernetes health checking will still work to ensure you're not routing to unhealthy services, however you currently can't view the service status in Consul.
|
I'm going to close this as a duplicate of hashicorp/consul-k8s#29 where we'll be tracking the ability to add health checks to synced services. If you have any more questions let us know. Thanks! |
Thanks for your answer. It's very clear. @lkysow |
I'm new to consul.
I have installed consul in k8s(version:1.10) with helm chart(master branch) . enabled catalog sync . There is no any healthy service. And all synced services in a same node, name is k8s-sync, the node no any health check. ip address is 127.0.0.1
My questions are:
The text was updated successfully, but these errors were encountered: