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

filebeat add_kubernetes_metadata and IPv6 #8749

Closed
hhoover opened this issue Oct 25, 2018 · 2 comments
Closed

filebeat add_kubernetes_metadata and IPv6 #8749

hhoover opened this issue Oct 25, 2018 · 2 comments
Assignees
Labels
bug containers Related to containers use case libbeat

Comments

@hhoover
Copy link

hhoover commented Oct 25, 2018

When using filebeat in a Kubernetes cluster as a pod, using the add_kubernetes_metadata processor, the processor can't handle IPv6 addresses if an IPv6 address resolves from https://kubernetes.default.svc.cluster.local. The parser freaks out on the colons in the address. I don't know if this is an issue in an underlying library or Filebeat itself.

Secondary to this issue, it would be nice to provide a custom Kubernetes API endpoint to use, so I could try something like https://[2001:0db8:85a3:0000:0000:8a2e:0370:7334]:443 (and force the use of brackets). It looks like I can only do this if I set in_cluster to "false" and provide a kubeconfig file.

Error:

2018-10-25T14:45:51.809Z    ERROR    instance/beat.go:743    Exiting: performing request: Get https://fd00:1234::1:443/api/v1/pods?fieldSelector=spec.nodeName%3Dlocalhost&resourceVersion=0: invalid URL port "1234::1:443"

Exiting: performing request: Get https://fd00:1234::1:443/api/v1/pods?fieldSelector=spec.nodeName%3Dlocalhost&resourceVersion=0: invalid URL port "1234::1:443"

For confirmed bugs, please report:

@hhoover
Copy link
Author

hhoover commented Oct 25, 2018

more errors:

2018-10-25T14:45:51.806Z    ERROR    kubernetes/util.go:90    kubernetes: Querying for pod failed with error: %!(EXTRA string=performing request: Get https://fd00:1234::1:443/api/v1/namespaces/logging/pods/filebeat-d9rsz: invalid URL port "1234::1:443")
2018-10-25T14:45:51.806Z    INFO    kubernetes/watcher.go:180    kubernetes: Performing a resource sync for *v1.PodList
2018-10-25T14:45:51.806Z    ERROR    kubernetes/watcher.go:183    kubernetes: Performing a resource sync err performing request: Get https://fd00:1234::1:443/api/v1/pods?fieldSelector=spec.nodeName%3Dlocalhost&resourceVersion=0: invalid URL port "1234::1:443" for *v1.PodList

@ph ph added the containers Related to containers use case label Oct 25, 2018
@jsoriano
Copy link
Member

I think that at least a related problem can be in the client library (https://github.com/ericchiang/k8s/blob/d1bbc0cffaf9849ddcae7b9efffae33e2dd52e9a/client.go#L225), I'll investigate this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug containers Related to containers use case libbeat
Projects
None yet
Development

No branches or pull requests

3 participants