Operator Lifecycle Manager (OLM) is an open source toolkit to manage Kubernetes
Operators. OLM extends Kubernetes to provide a declarative method for installing, managing, and
updating operators within a cluster environment. You must install OLM to run the Db2 Operator.
Procedure
To install Operator Lifecycle Manager (OLM):
- Create the OLM namespace:
kubectl create namespace olm
- Install the OLM in your cluster:
curl -sL https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.20.0/install.sh | bash -s v0.20.0
- Check for pods in the OLM namespace and wait for the pods to be in a ready state:
- Install the
ibm-db2uoperator-catalog in the OLM namespace:
cat << EOF | kubectl create -f -
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
name: ibm-db2uoperator-catalog
namespace: olm
spec:
displayName: IBM Db2U Catalog
image: icr.io/cpopen/ibm-db2uoperator-catalog@sha256:619915e9ceb695bfc84f91b87c8c1791bcec2c2db576fe84cd2ff65e513adda4
publisher: IBM
sourceType: grpc
updateStrategy:
registryPoll:
interval: 45m
EOF
- Check for db2uoperator catalog pods in the
ibm-db2uoperator-catalog and
wait for the pods to be in a ready state:
- Set the namespace variable:
export NAMESPACE=<namespace to deploy db2u>
- Create a namespace for installing the Db2 Operator.
kubectl create namespace ${NAMESPACE}
- Install an operator group in the namespace:
cat << EOF | kubectl create -f -
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
name: db2u-operator-group
namespace: ${NAMESPACE}
spec:
targetNamespaces:
- ${NAMESPACE}
EOF
- Create a subscription in the namespace to deploy the Db2 Operator:
cat << EOF | kubectl create -f -
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: ibm-db2uoperator-catalog-subscription
namespace: ${NAMESPACE}
generation: 1
spec:
channel: v120102.0
name: db2u-operator
installPlanApproval: Automatic
source: ibm-db2uoperator-catalog
sourceNamespace: olm
startingCSV: db2u-operator.v120102.0.1
EOF
- Confirm that the
db2u-operator pod is deployed:
kubectl get pods -n ${NAMESPACE} | grep db2u-operator