I have installed Kubernetes v1.11.2 by Kubeadm. I have configured Metricbeat (on Kubernetes) in order to get some metrics from Kubelet, however, I am not able to run it.
I suppose that I have to use the certificates which were created in /etc/kubernetes/pki.
Thank you for your feedback! We recently implemented bearer token file auth for this specific use case, here you have an example of how the kubernetes module conf should look:
Let us know how it goes if you test it! We plan to switch our example manifests to this on the next release, we may need to backport it to 6.4 as it's mandatory already in latest k8s version.
Hi @RdrgPorto, it seems you would need to use k8s-test instead of localhost. I'm guessing that's the hostname of the machine, so probably hosts: ["https://${HOSTNAME}:10250"] is better
As far as I know, when one deploys Kubernetes by Kubeadm (kubeadm init):
[certificates] apiserver serving cert is signed for DNS names [k8s-test kubernetes kubernetes.default kubernetes.default.svc kubernetes.default.svc.cluster.local] and IPs [10.96.0.1 my_ip]
[certificates] etcd/server serving cert is signed for DNS names [k8s-test localhost] and IPs [127.0.0.1 ::1]
[certificates] Generated etcd/peer certificate and key.
[certificates] etcd/peer serving cert is signed for DNS names [k8s-test localhost] and IPs [my_ip 127.0.0.1 ::1]
Moreover, there are only two services created on Kubernetes:
$ kubectl get svc --all-namespaces
NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
default kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 23m
kube-system kube-dns ClusterIP 10.96.0.10 <none> 53/UDP,53/TCP 23m
If I use kubernetes as CNAME, I get the following error:
error making http request: Get https://kubernetes:10250/stats/summary: lookup kubernetes on 10.96.0.10:53: read udp 10.32.0.5:34401-\u003e10.96.0.10:53: i/o timeout
Problem is that we want to talk to kubelet, kubernetes hostname will resolve to the API server. I'm wondering why k8s-test is not resolving to 127.0.0.1, isn't that the name of the node?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.