kubernetes-app
kubernetes-app copied to clipboard
Connecting to rancher cluster
Hi everyone.
Can please someone quickly explain how we can connect this plugin to a Rancher (2.1.1) cluster? Our kubeconfig file looks as follows:
apiVersion: v1
kind: Config
clusters:
- name: "jls"
cluster:
server: "https://k8s.company.tld/k8s/clusters/c-ckrdr"
api-version: v1
users:
- name: "user-rd343"
user:
token: "kubeconfig-user-rd343:cxdgf235zgsdg6436g325z45ujsgsdgwegwfwd4qr2"
contexts:
- name: "company"
context:
user: "user-rd343"
cluster: "company"
current-context: "company"
We're perfectly able to use kubectl with this kubeconfig. No problems at all. But the plugin for grafana to monitor our cluster seems very reluctant to integrate.
Any suggestions are highly appreciated.
I have the same question
I figured out it.
Get "Kubeconfig File" on your cluster node dashboard
Gather this values:
url: from Kubeconfig File
user: take in account that the token is user:password, so take the first part that is on the left of the :
password: is the part that is to the right of :
in token
Ex:
token: "kubeconfig-user-g949c:zf9vzf5d8clrmqxth5hj29kptnskkps6zjs78df2qnt4kbqqsgt466"
User = kubeconfig-user-g949c Password: = zf9vzf5d8clrmqxth5hj29kptnskkps6zjs78df2qnt4kbqqsgt466
CA Cert: from Global => Settings => cacerts
Now in the cluster add panel complete url
, select Basic Auth
, With CA Cert
and Skip TLS Verification (Insecure)
, complete User
, Password
and CA Cert
You need to have a Prometheus installed and configured as Datasource before saving this config.
Once you fulfill those fields you can save, and hopefully you will have a connection to your cluster.
Thanks @padiazg it works!
are you using cluster monitoring installed by Rancher, or did you install prometheus operator? This is not working for me. and i don't have any CA certs either.
Prometheus operator