Creating Grafana instance

The OpenShift® administrator can create the Grafana instance from the OpenShift Container Platform (OCP) OperatorHub.

Procedure

  1. Log in to the OpenShift Container Platform (OCP) by using the OpenShift administrator credentials.
  2. In the left panel, go to Operators > Installed Operators. Select the project where you installed Grafana operator.
  3. Click the Grafana Operator link from the Name column.
  4. Click the Grafana tab, and click Create Grafana.
  5. On the Create Grafana page, use one of the following options to edit the custom resource to create a Grafana instance:
    • YAML View: You are provided with full control of object creation.
    • Form View: You can enter the details in a form.
  6. Enter the following details in the YAML file:
    • name: Enter the name of the Grafana instance. Refer to the example, wherein the Grafana instance name is entered as example-grafana.
    • namespace: Enter the name of the project or the namespace where you installed Grafana operator. Refer to the example, wherein the Grafana namespace name is entered as test01.
    • admin_user: Enter the username. Refer to the example, wherein the username is provided as root.
    • admin_password: Enter the password. Refer to the example, wherein the username is provided as secret
    Example:
    apiVersion: integreatly.org/v1alpha1
    kind: Grafana
    metadata:
      name: example-grafana
      namespace: test01
    spec:
      ingress:
        enabled: true
      config:
        auth:
          disable_signout_menu: true
        auth.anonymous:
          enabled: true
        log:
          level: warn
          mode: console
        security:
          admin_password: secret
          admin_user: root
      dashboardLabelSelector:
        - matchExpressions:
            - key: app
              operator: In
              values:
                - grafana
  7. Click Create.

Results

The Grafana instance is created and the Grafana route also gets created.

What to do next