Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kube-consul-register don't register services #26

Open
denyskril opened this issue May 17, 2018 · 3 comments
Open

kube-consul-register don't register services #26

denyskril opened this issue May 17, 2018 · 3 comments

Comments

@denyskril
Copy link

Hello
my configmap:

apiVersion: v1
kind: ConfigMap
metadata:
name: kube-consul-register
namespace: default
data:
consul_address: "consul-agent.cluster.local"
consul_port: "8500"
consul_scheme: "http"
consul_insecure_skip_verify: "true"
consul_token: "TOKEN"
consul_timeout: "2s"
consul_container_name: "consul-agent"
consul_node_selector: "consul=enabled"
pod_label_selector: ""
k8s_tag: "kubernetes"
register_mode: "node"
register_source: "service"

but i see in logs:

I0517 13:46:56.050948 1 main.go:64] Using build: v0.1.4-1-gb9100f5
I0517 13:46:56.111231 1 main.go:98] Current configuration: Controller: &config.ControllerConfig{ConsulAddress:"consul-agent.cluster.local", ConsulPort:"8500", ConsulScheme:"http", ConsulCAFile:"", ConsulCertFile:"", ConsulKeyFile:"", ConsulInsecureSkipVerify:true, ConsulToken:"TOKEN", ConsulTimeout:2000000000, ConsulContainerName:"consul-agent", ConsulNodeSelector:"consul=enabled", PodLabelSelector:"", K8sTag:"kubernetes", RegisterMode:"node"}, Consul: &api.Config{Address:"127.0.0.1:8500", Scheme:"http", Datacenter:"", HttpClient:(*http.Client)(0xc420400fc0), HttpAuth:(*api.HttpBasicAuth)(nil), WaitTime:0, Token:""}
I0517 13:46:56.111420 1 main.go:128] Start syncing...
I0517 13:46:56.159244 1 main.go:133] Synchronization's been ended
I0517 13:46:56.159285 1 main.go:112] Start cleaning...
I0517 13:46:56.197430 1 main.go:117] Cleaning has been ended

and services dont register in consul.

how can i fix it?

please help.

@mellowplace
Copy link

As I see from the code it only registers services if they are of type NodePort - otherwise it silently does nothing

@mellowplace
Copy link

Apologies in master it will register services of type NodePort & ClusterIP

@mellowplace
Copy link

Also though make sure your services have the correct annotation and you have the correct config for kube-consul-register to pick up services

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants