You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Operating system: CentOS Linux release 7.9.2009 (Core)
Docker
Kubernetes Version: v1.18.6
Docker version: 19.03.15, build 99e3ed8919
Steps to reproduce:
test it using telegraf --test
bash-5.0# telegraf --config /telegraf.conf --test
2021-05-24T06:48:19Z I! Starting Telegraf 1.18.3
2021-05-24T06:48:19Z E! [inputs.kube_inventory] Error in plugin: Get "https://localhost/apis/apps/v1/daemonsets": dial tcp 127.0.0.1:443: connect: connection refused
2021-05-24T06:48:19Z E! [inputs.kube_inventory] Error in plugin: Get "https://localhost/apis/apps/v1/deployments": dial tcp 127.0.0.1:443: connect: connection refused
2021-05-24T06:48:19Z E! [inputs.kube_inventory] Error in plugin: Get "https://localhost/api/v1/pods": dial tcp 127.0.0.1:443: connect: connection refused
2021-05-24T06:48:19Z E! [inputs.kube_inventory] Error in plugin: Get "https://localhost/api/v1/persistentvolumes": dial tcp 127.0.0.1:443: connect: connection refused
2021-05-24T06:48:19Z E! [inputs.kube_inventory] Error in plugin: Get "https://localhost/api/v1/persistentvolumeclaims": dial tcp 127.0.0.1:443: connect: connection refused
2021-05-24T06:48:19Z E! [inputs.kube_inventory] Error in plugin: Get "https://localhost/apis/apps/v1/statefulsets": dial tcp 127.0.0.1:443: connect: connection refused
2021-05-24T06:48:19Z E! [telegraf] Error running agent: input plugins recorded 6 errors
Expected behavior:
telegraf should read the value of url in /telegraf.conf and try connecting to mentioned URL for the Kubernetes API
Actual behavior:
kube_inventory plugin always connecting to https://localhost, despite changing the url value in /telegraf.conf to "https://$HOSTIP:6443" or anything else (another hostname or IP)
Relevant telegraf.conf:
System info:
1.18.3Docker
v1.18.619.03.15, build 99e3ed8919Steps to reproduce:
telegraf --testExpected behavior:
telegraf should read the value of
urlin/telegraf.confand try connecting to mentioned URL for the Kubernetes APIActual behavior:
kube_inventoryplugin always connecting to https://localhost, despite changing theurlvalue in/telegraf.confto "https://$HOSTIP:6443" or anything else (another hostname or IP)Additional info:
1.18.21.18.3- Migrate from github.com/ericchiang/k8s to github.com/kubernetes/client-go (Migrate from github.com/ericchiang/k8s to github.com/kubernetes/client-go #8937) - new k8 client change?func newClient(baseURL, namespace, bearerToken string, timeout time.Duration, tlsConfig tls.ClientConfig) (*client, error) { - Server: baseURL, + ServerName: baseURL,