Using the Skupper Operator on OpenShift
The Skupper Operator creates and manages Skupper 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
siteConfigMap. This is equivalent to theskupper initas described in Configuring Skupper sites using the CLI.
You can deploy the Skupper Operator using any of the following methods:
|
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 Creating a site using the Skupper Operator
|
Because OpenShift Container Platform is a certified Kubernetes distribution, you can use the supported See the OpenShift documentation for more information about |
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.
-
Log in to OpenShift as a cluster administrator. For example:
$ kubectl login -u system:admin -
Complete the steps described in Red Hat Container Registry Authentication.
-
To create a operator subscription for all namespaces:
-
Create a file named
subscription.yamlwith 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.v1.0 -
Apply the subscription YAML:
$ kubectl apply -f subscription.yaml
-
-
To create a operator subscription for a specific namespace, you must create an Operator group in that namespace and then create the subscription:
-
Create a file named
operator-group.yamlwith the following:kind: OperatorGroup apiVersion: operators.coreos.com/v1 metadata: name: skupper-operator namespace: my-namespace spec: targetNamespaces: - my-namespacewhere
my-namespaceis the name of the namespace you want to create the site. -
Apply the Operator group YAML:
$ kubectl apply -f operator-group.yaml -
Create a file named
subscription.yamlwith 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.v1.0where
my-namespaceis the name of the namespace you want to create the site. -
Apply the subscription YAML:
$ kubectl apply -f subscription.yaml
-
Installing the Skupper Operator using the OpenShift console
The procedures in this section show how to use the OperatorHub from the OpenShift console to install and deploy the latest version of the Skupper Operator in a given OpenShift namespace.
-
Access to an OpenShift {OpenShiftVersion} cluster using a
cluster-adminaccount.
-
In the OpenShift web console, navigate to menu:Operators[OperatorHub].
-
Choose
Skupper Operatorfrom the list of available Operators, and then click btn:[Install]. -
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.
-
-
Select the namespace into which you want to install the Operator, and then click btn:[Install].
The Installed Operators page appears displaying the status of the Operator installation.
-
Verify that the Skupper Operator is displayed and wait until the Status changes to Succeeded.
-
If the installation is not successful, troubleshoot the error:
-
Click
Skupper Operatoron the Installed Operators page. -
Select the Subscription tab and view any failures or errors.
-
For more information about installing Operators, see the OpenShift Documentation
Creating a site using the Skupper Operator
-
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-namespaceYou can later retrieve the console credentials as described in Using the Skupper console or specify them now by adding the username and optionally the password to
skupper-site.yamlas follows:data: console-user: "admin" console-password: "changeme" -
Apply the YAML to create a ConfigMap named
skupper-sitein the namespace you want to use:$ kubectl apply -f skupper-site.yaml -
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 34sIf you deployed the Operator to a single namespace, an additional site controller pod is also running.