The OpenShift® administrator can create the Grafana instance from the OpenShift Container Platform (OCP) OperatorHub.
Procedure
- Log in to the OpenShift Container Platform (OCP) by using the OpenShift administrator credentials.
- In the left panel, go to
. Select the project where you installed Grafana
operator.
- Click the Grafana Operator link from the
Name column.
- Click the Grafana tab, and click Create
Grafana.
- 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.
- 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
- Click Create.
Results
The Grafana instance is created and the Grafana route also gets created.