Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Installing the Event Streams Operator using the kubectl-operator plugin
#!/bin/bash
# This script uses the kubectl-operator plugin
# Install it using the instructions at https://github.com/operator-framework/kubectl-operator
# -----------------------------------------------------------------------
echo "Adding the IBM Common Services catalog source that provides pre-requisite operators"
oc operator catalog add \
--display-name "IBMCS Operators" \
--publisher IBM \
--timeout 15m0s \
--namespace openshift-marketplace \
opencloud-operators \
docker.io/ibmcom/ibm-common-service-catalog:latest
# expected output:
#
# created catalogsource "opencloud-operators"
# -----------------------------------------------------------------------
echo "Adding the IBM Operator catalog source that contains the Event Streams operator"
oc operator catalog add \
--display-name "IBM Operator Catalog" \
--publisher IBM \
--timeout 15m0s \
--namespace openshift-marketplace \
ibm-operator-catalog \
docker.io/ibmcom/ibm-operator-catalog:latest
# expected output:
#
# created catalogsource "ibm-operator-catalog"
# -----------------------------------------------------------------------
echo "Installing the Event Streams Operator into the test-ns namespace"
oc operator install \
--namespace test-ns \
--approval Automatic \
--create-operator-group \
ibm-eventstreams
# expected output:
#
# operatorgroup "test-ns" created
# subscription "ibm-eventstreams" created
# operator "ibm-eventstreams" installed; installed csv is "ibm-common-service-operator.v3.4.3"
# -----------------------------------------------------------------------
echo "Complete."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment