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

[kubenetes] Lookup k8s API endpoint using environment variables #2837

Closed
rosskukulinski opened this issue Sep 12, 2016 · 2 comments
Closed

Comments

@rosskukulinski
Copy link

From: #2551

The Kubernetes integration finds the kubernetes api using DNS which is not always available. Specifically, not all namespaces will have the kubernetes service running (e.g. kube-system).

The preferred mechanism to get the API server host/port is by using the environmental variables injected into every pod: KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT.

Relevant code: https://github.com/DataDog/dd-agent/blob/master/utils/kubeutil.py#L66

@onbjerg
Copy link

onbjerg commented Oct 8, 2016

I'll take this when #2728 is merged.

@xvello
Copy link
Contributor

xvello commented Jul 4, 2017

Hello,

5.14 uses KUBERNETES_SERVICE_HOST, and 5.15 will also use KUBERNETES_SERVICE_PORT, plus configurable host and port for the apiserver (see
#3401)

Regards

@xvello xvello closed this as completed Jul 4, 2017
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

3 participants