Installing RedHat community powered Grafana operator from OperatorHub - IBM/ibm-spectrum-scale-bridge-for-grafana GitHub Wiki

If you are running a Kubernetes cluster without OpenShift platform, please continue with the Deploying Grafana Operator from OperatorHub on k8s cluster instructions

  1. Check the Grafana operator available on the OpenShift cluster

    Command:

    oc get packagemanifests -n openshift-marketplace |grep grafana
    

    Example output:

    [[email protected] ~]# oc get packagemanifests -n openshift-marketplace |grep grafana
    grafana-operator                                     Community Operators   34d
    

    Note: if the grafana-operator resource is not listed, follow this troubleshooting guide to find the possible issue.

  2. Create the OperatorGroup and the Subscription object in the namespace you are going to deploy a Grafana instance for a CNSA cluster

    Commands:

    NAMESPACE=grafana-for-cnsa
    
    echo $NAMESPACE
    
    oc new-project $NAMESPACE
    
    oc apply -f https://raw.githubusercontent.com/IBM/ibm-spectrum-scale-bridge-for-grafana/master/examples/openshift_deployment_scripts/examples_for_grafana-operator_v5/grafana_deployment/operator-group-v5.yaml --namespace=$NAMESPACE
    
    oc apply -f https://raw.githubusercontent.com/IBM/ibm-spectrum-scale-bridge-for-grafana/master/examples/openshift_deployment_scripts/examples_for_grafana-operator_v5/grafana_deployment/subscription-grafana-operator-v5.yaml --namespace=$NAMESPACE
    
  3. Check the Grafana operator have been added to the Operator Subscriptions

    Command:

    oc get subs -n $NAMESPACE
    

    Example output:

    [[email protected] ~]# oc get subs -n $NAMESPACE
    NAME                            PACKAGE            SOURCE                CHANNEL
    grafana-operator-subscription   grafana-operator   community-operators   v5
    

Alternatively you can install the Grafana operator using the OpenShift Container Platform web console.

For more information check the OpenShift documentation about Adding Operators to a cluster