Skip to content

Instantly share code, notes, and snippets.

@dalelane
Last active August 20, 2020 18:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dalelane/6696997152ea2f82625d7842be77f83e to your computer and use it in GitHub Desktop.
Save dalelane/6696997152ea2f82625d7842be77f83e to your computer and use it in GitHub Desktop.
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