Skip to content

Commit 54da27a

Browse files
committed
Update Documentation for kubectl-grafana Command-Line Tool
1 parent b54eeb7 commit 54da27a

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,25 @@ user and proxing the request to the Kubernetes API.
153153

154154
![Kubeconfig](https://raw.githubusercontent.com/ricoberger/grafana-kubernetes-plugin/refs/heads/main/src/img/screenshots/kubeconfig.png)
155155

156+
To make it easier to download the generated Kubeconfig file, the
157+
`kubectl-grafana` kubectl plugin can be used. The plugin can be downloaded from
158+
the
159+
[releases page](https://github.com/ricoberger/grafana-kubernetes-plugin/releases)
160+
or by running the following command:
161+
162+
```bash
163+
go install github.com/ricoberger/grafana-kubernetes-plugin/cmd/kubectl-grafana@latest
164+
```
165+
166+
When the kubectl plugin is installed, the following command can be used to
167+
download the generated Kubeconfig. If the provided Kubeconfig file already
168+
contains a Kubeconfig it will be merged, with the downloaded Kubeconfig having a
169+
higher priority.
170+
171+
```bash
172+
kubectl grafana kubeconfig --url <GRAFANA-INSTANCE-URL> --datasource <DATASOURCE-UID> --kubeconfig <PATH-TO-KUBECONFIG-FILE>
173+
```
174+
156175
### Integrations
157176

158177
Integrations allow you to integrate the Kubernetes datasource with other

0 commit comments

Comments
 (0)