I am trying to deploy heapster in a cluster and collect metrics and store it in Influxdb. I can provide sink for Influxdb. But I am not sure how to provide the value for --source flag to connect to the secured kube API server. Can someone help me to find out this.
Note: I am trying to deploy heapster in the same cluster where the kube API server is running.
Thanks in advance.
I use heapster with parameter
inClusterConfig=false
means I don't use serviceaccount in cluster.insecure=true
means I trust ApiServer in this cluster.auth=/etc/kubernetes/admin.conf
is the auth config when try to connect to ApiServer, this is the same kubeconfig your kubectl/kubelet use. You can mount this config into heapster pod using Configmap or normal Volume.More source configuration, you can ref here
I found out the solution for this. The parameter that I am using is
I mounted
/var/lib/kube-proxy/kubeconfig
to the heapster container which is used by the kube-proxy and now the heapster can talk to the secured API server. Also I changed the heapster image togcr.io/google_containers/heapster:v1.2.0
I am not sure if this is the right method. But it works out for me.
Thank you for all responses.