Chapter 6. Installing the 3scale Operator

6.1. Introduction

In this documentation you will find details about deploying custom resource definitions (CRDs), deploying role-based access control (RBAC), and deploying the 3scale operator image for managing deployments of the same configuration in multiple environments.


The 3scale operator is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process. For more information about the support scope of Red Hat Technology Preview features, see Technology Preview Features Support Scope.

6.1.1. Prerequisites

  • A 3scale 2.5 On-Premises instance
  • OpenShift Container Platform 3.11

    • A user account with administrator privileges in the OpenShift cluster

Deploy the 3scale operator and custom CRDs in a separate project. If you deploy them in an existing project containing infrastructure, it could alter or delete existing elements.

6.2. Creating a new OpenShift project

You must run a command like the one shown below to create a new OpenShift project. This command shows you an example of a project name:

oc new-project operator-test

This will create a new OpenShift project where the operator, the APIManager custom resource (CR) and the Capabilities custom resources will be installed.

6.2.1. Registering the 3scale operator CRDs in the OpenShift API server

  1. Download and uncompress the the tar file: deploy.tar.gz.
  2. Log in as an administrator in the cluster and deploy all the 3scale operator CRDs by running the following command:

    for i in `ls deploy/crds/*_crd.yaml`; do oc create -f $i ; done
    1. This will register the APIManager CRD and the CRDs related to the Capabilities functionality of the operator in the OpenShift API server.
    2. If the command runs successfully, you should be able to query the resource types defined by this CRDs via oc get.

      1. For example, to verify that the APIManager CRD has been correctly registered, execute the following command:

        oc get apimanagers
  3. You should see the following output:

    No resources found.

6.2.2. Deploying roles and ServiceAccounts for the 3scale operator

  1. Go to the operator-test OpenShift project and make sure that no other elements exist:

    export NAMESPACE="operator-test"
    oc project ${NAMESPACE}
    oc get all // This shouldn't return any result
  2. Deploy the ServiceAccount that will be used by the 3scale operator:

    oc create -f deploy/service_account.yaml
  3. Log in as an administrator to the cluster and deploy the 3scale operator Role and the RoleBinding that will attach that role to the created ServiceAccount:

    // As a cluster admin
    export NAMESPACE="operator-test"
    oc project ${NAMESPACE}
    oc create -f deploy/role.yaml
    oc create -f deploy/role_binding.yaml

6.2.3. Deploying the 3scale operator

  1. Deploy the 3scale operator by executing the following commands:

    export NAMESPACE="operator-test"
    oc project ${NAMESPACE}
    oc create -f deploy/operator.yaml
    1. This will create a Deployment that will contain a Pod with the Operator code and will start listening to incoming APIManager and Capabilities resources.
  2. To verify the 3scale operator is deployed and ready, run the following command:

    oc get deployment 3scale-operator