To deploy the IBM® App Connect Operator by using the
Operator Lifecycle Manager (OLM), create and apply a Subscription resource that identifies the
catalog source for the Operator and the channel through which the Operator is available. Also
identify the namespace in which to install and run the Operator, and indicate how the Operator
should be upgraded.
Before you begin
- Ensure that you have administrator authority or have been granted the
appropriate role-based access control (RBAC) to administer the cluster.
- Ensure that you are logged in to your Kubernetes environment.
- Decide how to control upgrades to the Operator when new versions become available. The approval
strategy that you specify while installing will determine how the Operator is upgraded after
installation. To help you choose a suitable approval strategy for your environment, review the Upgrade considerations for channels, versions, and licenses before
you start this task.
Procedure
To create a Subscription resource for the IBM App Connect Operator, complete the following steps:
- From your local computer, create a file called appconn-sub.yaml with
the following YAML content.
- The
spec.channel: v11.4
setting
defines the update channel that OLM will track for new versions of the Operator.
- By default, an
Automatic
approval strategy is set to allow the running instance
of your Operator to be automatically upgraded whenever new versions are made available to the
channel. It is also possible to add a
spec.installPlanApproval
setting with a value of
Manual
to the supplied YAML code (as shown in the following
example), which enables you to review a generated Install Plan for the new Operator version before
manually approving the installation (or an upgrade). However, this
Manual
setting
is deemed unnecessary because you are installing the Operator from a product-specific
App Connect catalog source. The use of a product-specific catalog source
enables you to control which upgrades to apply because upgrades happen only when the image digest
for the catalog source is changed.
spec:
installPlanApproval: Manual
Tip: You can change the approval strategy
later if required by running a command such as
kubectl edit; for example:
kubectl edit subscription ibm-appconnect -n namespaceName
This command will automatically open the default text editor for your operating system or
open another configured editor. You can then update and save the YAML definition, and close the text
editor to apply the command.
- You can install the Operator into a single namespace or cluster wide.
- To install into a single namespace, replace namespaceName with the namespace
that you created earlier.
- To install cluster wide, replace namespaceName with
operators
.
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: ibm-appconnect
namespace: namespaceName
spec:
channel: v11.4
name: ibm-appconnect
source: ibm-appconnect-catalog
sourceNamespace: olm
- To install the Operator, create the Subscription object:
kubectl apply -f appconn-sub.yaml
- If you chose to install with a
Manual
approval strategy, review and
approve the Install Plan of the subscription to allow OLM to install the Operator. (No additional
action is needed if you selected an Automatic
approval strategy.)
- List any Install Plans, where namespaceName is the namespace that
you specified for the subscription:
kubectl get installplans -n namespaceName
You should see output similar to this, with the APPROVED value set to false
or
RequiresApproval
:
NAME CSV APPROVAL APPROVED
install-9qrt2 ibm-appconnect.v11.4.0 Manual false
- Display the details of the Install Plan for the IBM App Connect Operator (
ibm-appconnect.v#.#.#
), where
installPlanName is the generated name for the Install Plan (for example,
install-9qrt2
):
kubectl describe installplan installPlanName -n namespaceName
Review the output.
- Approve the Install Plan for the IBM App Connect Operator. You
can use commands such as kubectl patch or kubectl edit to
partially update the Install Plan.
For example, run kubectl patch with the following syntax (or your preferred
syntax) to set spec.approved to true
:
kubectl patch installplan installPlanName -n namespaceName -p '{"spec":{"approved":true}}' --type merge
Or run kubectl edit as follows. When the text editor for your operating
system opens, set spec.approved to true
. Then save the YAML
definition and close the text editor to apply the changes.
kubectl edit installplan installPlanName -n namespaceName
- Verify the approval:
kubectl get installplans -n namespaceName
In the output, the APPROVED value should now be set to true
.
OLM will now proceed with the installation.
- To check the progress of the installation, run the following command to view the logs for
the Catalog Operator pod in the
olm
namespace. The function of this
Operator is to resolve and install ClusterServiceVersions (CSVs) and their defined resources, and to
watch for new versions of the
IBM App Connect Operator in the update channels
in order to determine whether an upgrade is required.
kubectl logs -n olm catalog-operator-uniqueID
For example:
kubectl logs -n olm catalog-operator-598b54c95d-ps6r6