Docs: Sync latest master docs with 7.5.x (#33156)
* Docs: Sync latest master docs with 7.5.x * remove some remaining next aliases and links * Docs: Removed v8 doc changes * fixed merge issue
This commit is contained in:
@@ -16,6 +16,7 @@ This section discusses the hardware and software requirements as well as the pro
|
||||
- [Install on macOS]({{< relref "mac" >}})
|
||||
- [Install on Windows]({{< relref "windows" >}})
|
||||
- [Run Docker image]({{< relref "docker" >}})
|
||||
- [Deploy Grafana on Kubernetes]({{< relref "kubernetes" >}})
|
||||
|
||||
For upgrade instructions, refer to [Upgrade Grafana]({{< relref "upgrading.md" >}}).
|
||||
To restart Grafana, refer to [Restart Grafana]({{< relref "restart-grafana.md" >}}).
|
||||
|
||||
@@ -112,6 +112,20 @@ docker build \
|
||||
docker run -d -p 3000:3000 --name=grafana grafana-custom
|
||||
```
|
||||
|
||||
### Build with pre-installed plugins from other sources
|
||||
|
||||
You can build a Docker image with plugins from other sources by specifying the URL like this: `GF_INSTALL_PLUGINS=<url to plugin zip>;<plugin name>`.
|
||||
|
||||
```bash
|
||||
cd packaging/docker/custom
|
||||
docker build \
|
||||
--build-arg "GRAFANA_VERSION=latest" \
|
||||
--build-arg "GF_INSTALL_PLUGINS=http://plugin-domain.com/my-custom-plugin.zip;custom-plugin,grafana-clock-panel" \
|
||||
-t grafana-custom -f Dockerfile .
|
||||
|
||||
docker run -d -p 3000:3000 --name=grafana grafana-custom
|
||||
```
|
||||
|
||||
Replace `Dockerfile` in above example with `ubuntu.Dockerfile` to build a custom Ubuntu based image (Grafana v6.5+).
|
||||
|
||||
### Build with Grafana Image Renderer plugin pre-installed
|
||||
@@ -179,7 +193,7 @@ Version | User | User ID | Group | Group ID
|
||||
--------|---------|---------|---------|---------
|
||||
< 5.1 | grafana | 104 | grafana | 107
|
||||
\>= 5.1 | grafana | 472 | grafana | 472
|
||||
\>= 7.3 | grafana | 472 | root | 1
|
||||
\>= 7.3 | grafana | 472 | root | 0
|
||||
|
||||
There are two possible solutions to this problem. Either you start the new container as the root user and change ownership from `104` to `472`, or you start the upgraded container as user `104`.
|
||||
|
||||
@@ -227,4 +241,3 @@ Refer to [Configure a Grafana Docker image]({{< relref "../administration/config
|
||||
|
||||
Refer to the [Configuration]({{< relref "../administration/configuration.md" >}}) page for details on options for customizing your environment, logging, database, and so on.
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,241 @@
|
||||
+++
|
||||
title = "Deploy Grafana on Kubernetes"
|
||||
description = "Guide for deploying Grafana on Kubernetes"
|
||||
keywords = ["grafana", "configuration", "documentation", "kubernetes"]
|
||||
weight = 700
|
||||
+++
|
||||
|
||||
## Deploy Grafana on Kubernetes
|
||||
|
||||
This page explains how to install and run Grafana on Kubernetes (K8S). It uses Kubernetes manifests for the setup. If you prefer Helm, refer to the [Grafana Helm community charts](https://github.com/grafana/helm-charts).
|
||||
|
||||
If you are interested in Grafana Enterprise (not Grafana OS), jump to [Deploy Grafana Enterprise on Kubernetes](#deploy-grafana-enterprise-on-kubernetes) section.
|
||||
|
||||
### Create Grafana Kubernetes manifest
|
||||
1. Create a file called `grafana.yaml`, then paste the contents below.
|
||||
|
||||
```yaml
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: grafana-pvc
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: grafana
|
||||
name: grafana
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: grafana
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: grafana
|
||||
spec:
|
||||
securityContext:
|
||||
fsGroup: 472
|
||||
supplementalGroups:
|
||||
- 0
|
||||
containers:
|
||||
- name: grafana
|
||||
image: grafana/grafana:7.5.2
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 3000
|
||||
name: http-grafana
|
||||
protocol: TCP
|
||||
readinessProbe:
|
||||
failureThreshold: 3
|
||||
httpGet:
|
||||
path: /robots.txt
|
||||
port: 3000
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 30
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 2
|
||||
livenessProbe:
|
||||
failureThreshold: 3
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
tcpSocket:
|
||||
port: 3000
|
||||
timeoutSeconds: 1
|
||||
resources:
|
||||
requests:
|
||||
cpu: 250m
|
||||
memory: 750Mi
|
||||
volumeMounts:
|
||||
- mountPath: /var/lib/grafana
|
||||
name: grafana-pv
|
||||
volumes:
|
||||
- name: grafana-pv
|
||||
persistentVolumeClaim:
|
||||
claimName: grafana-pvc
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: grafana
|
||||
spec:
|
||||
ports:
|
||||
- port: 3000
|
||||
protocol: TCP
|
||||
targetPort: http-grafana
|
||||
selector:
|
||||
app: grafana
|
||||
sessionAffinity: None
|
||||
type: LoadBalancer
|
||||
```
|
||||
|
||||
|
||||
### Send manifest to Kubernetes API server
|
||||
|
||||
1. Run the following command:
|
||||
`kubectl apply -f grafana.yaml`
|
||||
|
||||
1. Check that it worked by running the following:
|
||||
`kubectl port-forward service/grafana 3000:3000`
|
||||
|
||||
1. Navigate to `localhost:3000` in your browser. You should see a Grafana login page.
|
||||
|
||||
1. Use `admin` for both the username and password to login.
|
||||
|
||||
## Deploy Grafana Enterprise on Kubernetes
|
||||
The process for deploying Grafana Enterprise is almost identical to the process above, except for some extra steps required to add in your license file. They are described in the following sections.
|
||||
|
||||
### Obtain Grafana Enterprise license
|
||||
To run Grafana Enterprise, you need a valid license. [Contact a Grafana Labs representative](https://grafana.com/contact?about=grafana-enterprise) to obtain the license. This topic assumes that you already have done this and have a `license.jwt` file. Your license should also be associated with a URL, which we will use later in the topic.
|
||||
|
||||
### Create License Secret
|
||||
Create a Kubernetes secret from your license file using the following command:
|
||||
```bash
|
||||
kubectl create secret generic ge-license --from-file=/path/to/your/license.jwt
|
||||
```
|
||||
|
||||
### Create Grafana Enterprise configuration
|
||||
Create a Grafana configuration file with the name `grafana.ini`. Then paste the content below.
|
||||
>**Note:** You will have to update the `root_url` field to the url associated with the license you were given.
|
||||
```yaml
|
||||
[enterprise]
|
||||
license_path = /etc/grafana/license/license.jwt
|
||||
[server]
|
||||
root_url =/your/license/root/url
|
||||
|
||||
```
|
||||
|
||||
### Create Configmap for Grafana Enterprise Config
|
||||
Create a Kubernetes Configmap from your `grafana.ini` file with the following command:
|
||||
```bash
|
||||
kubectl create configmap ge-config --from-file=/path/to/your/config.ini
|
||||
```
|
||||
### Create Grafana Enterprise Kubernetes manifest
|
||||
Create a `grafana.yaml` file, then paste the content below. This YAML is identical to the one for Grafana OS install except for the additional references to the Configmap which has your Grafana configuration file and the Secret that has your license.
|
||||
|
||||
```yaml
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: grafana
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
storageClassName: local-path
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: grafana
|
||||
name: grafana
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: grafana
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: grafana
|
||||
spec:
|
||||
containers:
|
||||
- image: grafana/grafana-enterprise:latest
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: grafana
|
||||
ports:
|
||||
- containerPort: 3000
|
||||
name: http-grafana
|
||||
protocol: TCP
|
||||
readinessProbe:
|
||||
failureThreshold: 3
|
||||
httpGet:
|
||||
path: /robots.txt
|
||||
port: 3000
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 30
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 2
|
||||
resources:
|
||||
limits:
|
||||
memory: 4Gi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 2Gi
|
||||
volumeMounts:
|
||||
- mountPath: /var/lib/grafana
|
||||
name: grafana
|
||||
- mountPath: /etc/grafana
|
||||
name: ge-config
|
||||
- mountPath: /etc/grafana/license
|
||||
name: ge-license
|
||||
volumes:
|
||||
- name: grafana
|
||||
persistentVolumeClaim:
|
||||
claimName: grafana
|
||||
- name: ge-config
|
||||
configMap:
|
||||
name: ge-config
|
||||
- name: ge-license
|
||||
secret:
|
||||
secretName: ge-license
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: grafana
|
||||
spec:
|
||||
ports:
|
||||
- port: 3000
|
||||
protocol: TCP
|
||||
targetPort: http-grafana
|
||||
selector:
|
||||
app: grafana
|
||||
sessionAffinity: None
|
||||
type: LoadBalancer
|
||||
```
|
||||
|
||||
1. Send manifest to Kubernetes API Server
|
||||
`kubectl apply -f grafana.yaml`
|
||||
|
||||
1. Check that it worked by running the following:
|
||||
`kubectl port-forward service/grafana 3000:3000`
|
||||
|
||||
1. Navigate to `localhost:3000` in your browser. You should see the Grafana login page.
|
||||
|
||||
1. Use `admin` for both the username and password to login.
|
||||
If it worked, you should see `Enterprise (Licensed)` at the bottom of the page.
|
||||
@@ -313,4 +313,10 @@ NOTE: Only snapshots created on Grafana 7.3 or later will use this column to sto
|
||||
|
||||
The Grafana Docker images use the `root` group instead of the `grafana` group. This change can cause builds to break for users who extend the Grafana Docker image. Learn more about this change in the [Docker migration instructions]({{< relref "docker/#migrate-to-v73-or-later">}})
|
||||
|
||||
## Upgrading to v7.5
|
||||
|
||||
### VictorOps Alert Notifier
|
||||
|
||||
The VictorOps alert notifier now accepts a `severity` tag, in a similar vein to the PagerDuty alert notifier. The possible values are outlined in the [VictorOps docs](https://help.victorops.com/knowledge-base/incident-fields-glossary/).
|
||||
|
||||
For example, if you want an alert to be `INFO`-level in VictorOps, create a tag `severity=info` (case-insensitive) in your alert.
|
||||
|
||||
Reference in New Issue
Block a user