Chapter 1. Using the Skupper Operator on OpenShift

The Skupper Operator creates and manages AMQ Interconnect sites in OpenShift.

There are two options when deploying the Skupper Operator:

All namespaces
All Skupper sites created in the cluster share a common site controller pod for co-ordination.
A specific namespace
A site controller pod is created in each namespace that you apply the site ConfigMap. This is equivalent to the skupper init as described in Configuring AMQ Interconnect sites using the CLI.

You can deploy the Skupper Operator using any of the following methods:

Note

Installing an Operator requires administrator-level privileges for your OpenShift cluster.

After installing the Operator, you can create a site by deploying a ConfigMap as described in Section 1.3, “Creating a site using the Skupper Operator”

Note

Because OpenShift Container Platform is a certified Kubernetes distribution, you can use the supported kubectl binaries that ship with OpenShift as described in this documentation, or you can use the oc binary.

See the OpenShift documentation for more information about oc and kubectl.

1.1. Installing the Operator using the CLI

The steps in this section show how to use the kubectl command-line interface (CLI) to install and deploy the latest version of the Skupper Operator in a given OpenShift cluster.

Procedure

  1. Log in to OpenShift as a cluster administrator. For example:

    $ kubectl login -u system:admin
  2. Complete the steps described in Red Hat Container Registry Authentication.
  3. To create a operator subscription for all namespaces:

    1. Create a file named subscription.yaml with the following:

      apiVersion: operators.coreos.com/v1alpha1
      kind: Subscription
      metadata:
        name: skupper-operator
        namespace: openshift-operators
      spec:
        channel: alpha
        installPlanApproval: Automatic
        name: skupper-operator
        source: redhat-operators
        sourceNamespace: openshift-marketplace
        startingCSV: skupper-operator.v0.6.0
    2. Apply the subscription YAML:

      $ kubectl apply -f subscription.yaml
  4. To create a operator subscription for a specific namespace, you must create an Operator group in that namespace and then create the subscription:

    1. Create a file named operator-group.yaml with the following:

      kind: OperatorGroup
      apiVersion: operators.coreos.com/v1
      metadata:
        name: skupper-operator
        namespace: my-namespace
      spec:
        targetNamespaces:
        - my-namespace

      where my-namespace is the name of the namespace you want to create the site.

    2. Apply the Operator group YAML:

      $ kubectl apply -f operator-group.yaml
    3. Create a file named subscription.yaml with the following:

      apiVersion: operators.coreos.com/v1alpha1
      kind: Subscription
      metadata:
        name: skupper-operator
        namespace: my-namespace
      spec:
        channel: alpha
        installPlanApproval: Automatic
        name: skupper-operator
        source: redhat-operators
        sourceNamespace: openshift-marketplace
        startingCSV: skupper-operator.v0.6.0

      where my-namespace is the name of the namespace you want to create the site.

    4. Apply the subscription YAML:

      $ kubectl apply -f subscription.yaml

1.2. Installing the Skupper Operator using the OpenShift console

The procedures in this section show how to use the OperatorHub to install and deploy the latest version of the Skupper Operator in a given OpenShift namespace.

In OpenShift 4.1 and later, the Operator Lifecycle Manager (OLM) helps users install, update, and generally manage the lifecycle of all Operators and their associated services running across their clusters. It is part of the Operator Framework, an open source toolkit designed to manage Kubernetes native applications (Operators) in an effective, automated, and scalable way.

Prerequisites

  • Access to an OpenShift 4.1 cluster using a cluster-admin account.

Procedure

  1. In the OpenShift web console, navigate to OperatorsOperatorHub.
  2. Choose Skupper Operator from the list of available Operators, and then click Install.
  3. On the Operator Installation page, two Installation mode options are available:

    • All namespaces on the cluster
    • A specific namespace on the cluster

      For this example, choose A specific namespace on the cluster.

  4. Select the namespace into which you want to install the Operator, and then click Install.

    The Installed Operators page appears displaying the status of the Operator installation.

  5. Verify that the AMQ Interconnect Operator is displayed and wait until the Status changes to Succeeded.
  6. If the installation is not successful, troubleshoot the error:

    1. Click Skupper Operator on the Installed Operators page.
    2. Select the Subscription tab and view any failures or errors.

For more information about installing Operators, see the OpenShift Documentation

1.3. Creating a site using the Skupper Operator

  1. Create a YAML file defining the ConfigMap of the site you want to create.

    For example, create skupper-site.yaml:

    apiVersion: v1
    kind: ConfigMap
    metadata:
      name: skupper-site
      namespace: my-namespace

    You can later retrieve the console credentials as described in Monitoring AMQ Interconnect sites using the console or specify them now by adding the username and optionally the password to skupper-site.yaml as follows:

    data:
      console-user: "admin"
      console-password: "changeme"
  2. Apply the YAML to create a ConfigMap named skupper-site in the namespace you want to use:

    $ kubectl apply -f skupper-site.yaml
  3. Verify that the site is created by checking that the Skupper router and service controller pods are running:

    $ kubectl get pods
    
    NAME                                          READY   STATUS    RESTARTS   AGE
    skupper-router-8c6cc6d76-27562                1/1     Running   0          40s
    skupper-service-controller-57cdbb56c5-vc7s2   1/1     Running   0          34s
    Note

    If you deployed the Operator to a single namespace, an additional site controller pod is also running.

Revised on 2021-08-16 14:31:06 UTC