kubernetes-app icon indicating copy to clipboard operation
kubernetes-app copied to clipboard

Add info that kubernetes legacy authorization is a requirement to run the plugin

Open JCMais opened this issue 7 years ago • 4 comments

After some debugging on why the plugin was working on our dev cluster but was not working for our staging one, I've found that it requires legacy authorization to be enabled on the cluster.

See https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control for more details on the legacy authorization model.

On GKE this can be changed here: image

It would be much better if the plugin could support token authentication (like mentioned in one of the issues below), or allow to use service account directly (in case it was deployed to the same cluster it's going to connect).

Currently I've just removed everything related to the Kubernetes Datasource provided by this plugin and changed the dashboards according, so basically the plugin is not used anymore.

Most of the variables can be replaced to use some prometheus metric:

$node can be label_values(kube_node_info, node) $namespace can be label_values(kube_namespace_created, namespace)

Both metrics are from kube-state-metrics.

There are other issues that are probably related to this one: https://github.com/grafana/kubernetes-app/issues/12 https://github.com/grafana/kubernetes-app/issues/22 https://github.com/grafana/kubernetes-app/issues/34 https://github.com/grafana/kubernetes-app/issues/41 https://github.com/grafana/kubernetes-app/issues/47

JCMais avatar Nov 22 '18 01:11 JCMais

could you share the modified dashboards?

azelezni avatar Jan 02 '19 08:01 azelezni

@azelezni yes, here they are https://gist.github.com/JCMais/a0750ee1cc4186909d3caddcf5e08d30

You probably will need to change the datasources to point to the correct prometheus one.

JCMais avatar Jan 04 '19 13:01 JCMais

Solved the issue by running kubectl as a sidecar to grafana. Would be nice to use without kubectl api access though.

        - name: kubectl
          image: lachlanevenson/k8s-kubectl:latest
          command:
            - kubectl
            - proxy

emcfarlane avatar Jan 16 '19 14:01 emcfarlane

I ran into a similar issue and wonder if this plugin is still actually being supported?

If you already have prometheus running and grafana pulling that data, you might want to check https://github.com/helm/charts/tree/master/stable/prometheus-operator/templates/grafana/dashboards for some solid starting dashboards.

geojaz avatar Mar 16 '20 21:03 geojaz