Comments (11)
@renich there currently isn't support for templating this kind of deployment. The configs are stored inside a SQL database. Configuration is done using the Grafana UI or an api call to grafana. Grafana 5.0 has static datasources that could be installed with helm. Although I think it may get very messy since the configs for the kubernetes datasource are somewhat obfuscated from the user.
http://docs.grafana.org/administration/provisioning/#example-datasource-config-file
Your best bet would be to configure the datasource and get it working using the UI. Then output the json using the grafana api /api/datasources/:id
The static yaml file for this app will be something like this:
# config file version
apiVersion: 1
datasources:
# <string, required> name of the datasource. Required
- name: example_kube
# <string, required> datasource type. Required
type: grafana-kubernetes-datasource
# <string, required> access mode. direct or proxy. Required
access: proxy
# <int> org id. will default to orgId 1 if not specified
orgId: 1
# <string> url
url: http://localhost:443
# <string> database password, if used
password: ""
# <string> database user, if used
user: ""
# <string> database name, if used
database: ""
# <bool> enable/disable basic auth
basicAuth: false
# <string> basic auth username
basicAuthUser: ""
# <string> basic auth password
basicAuthPassword: ""
# <bool> enable/disable with credentials headers
withCredentials: true
# <bool> mark as default datasource. Max one per org
isDefault: false
# <map> fields that will be converted to json and stored in json_data
jsonData:
ds: example_prometheus
keepCookies: []
tlsAuth: true
tlsAuthWithCACert: true
secureJsonData:
tlsCACert: "..."
tlsClientCert: "..."
tlsClientKey: "..."
version: 1
# <bool> allow users to edit datasources from the UI.
editable: false
from kubernetes-app.
Just an FYI: I added the kube datasource by running kubectl as a second container in the same pod as grafana. Just run kubectl proxy --port 8888
and it will handle the token stuff. Then you can just add http://localhost:8888
as the API location. Makes it very simple.
from kubernetes-app.
For extra clarity in @Timbus suggestion, the last argument should be --port
kubectl proxy --port 8888
Works good for me too
from kubernetes-app.
@renich grafana chart is already in kubernetes stable/grafana
But seem this application need some special config to access Kubernetes API.
from kubernetes-app.
Yes. Any idea of what to do? I'm kind of stuck there.
from kubernetes-app.
Maybe I'm wrong but this application seem don't support "inCluster" discovery.
from kubernetes-app.
@thuandt By that do you mean the application will automatically configure the cluster if the Grafana instance is running in the cluster?
from kubernetes-app.
@jschill Yes. By default, if granfana run inside k8s cluster, we already have cert
and token
to access API server.
from kubernetes-app.
@thuandt the issue is, the plugin code related to adding a Kubernetes cluster is executed on the front end. So we can not take advantage of the inCluster configuration.
from kubernetes-app.
I'm a bit confused. Is there any way of automatically installing this plugin within a kubernetes deploy?
from kubernetes-app.
Does the kubectl proxy
solution require you to be running that proxy at all times, or just for the initial configuration?
from kubernetes-app.
Related Issues (20)
- InfluxDB/Telegraf Support
- Panel Plugin missing for grafana-kubernetes-app plugin HOT 2
- node_filesystem variable outdate HOT 1
- Adding datasource prometheus in grafana HTTP Error Not Found
- Error while initializing promtheus configmap, Node Exporter and Kube-State Metrics via Grafana
- New version of kube-state-metrics shows deprecations upcoming which are used in k8s-cluster dashboard
- Install command is wrong in https://grafana.com/grafana/plugins/grafana-kubernetes-app HOT 1
- public/plugins/grafana-kubernetes-datasource/img/logo.svg not found
- No Data Points Collected After Successful Deployment? HOT 3
- Memory Metrics are doubled Grafana HOT 1
- Is this app abandoned? HOT 5
- Why does this plugin ask me for user/passwd (basic auth)?
- Add a new cluster only gives Basic auth option HOT 1
- How to configure kubernetes cluster HOT 5
- Datasource is hardcoded for `v1beta1` api HOT 3
- invalid documentation
- Grafana not showing Pod/Container name in dashboard
- Connecting to K8s cluster HOT 1
- Pod filtering panel broken HOT 1
- Unsigned external plugin HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kubernetes-app.