Installing Db2 Operator V2
You can install the Db2 Operator V2 by using Helm through the command line.
Before you begin
Db2 Operator V2 can optionally be deployed by using a GitOps approach with Argo CD and Helm. This method uses Git as the single source of truth for Kubernetes deployments, enabling automated, declarative, and version-controlled operations. Argo CD continuously syncs Git changes to the cluster and corrects any drift from the defined state. This ensures real-time visibility, consistent deployments, and simpler rollbacks and auditing.
For a comprehensive guide on deploying Db2 Operator V2 using GitOps principles with Argo CD and Helm, see Next-Gen IBM Db2 on Kubernetes: A GitOps Journey with Argo CD and Helm.
- A Red Hat OpenShift or Kubernetes cluster.
- Cluster access configured for kubectl or co.
- Helm CLI version 3.0 or later.
- Cert-manager version 1.13.0 or later installed in your cluster.
- Cluster-admin permissions Note: Cluster-admin permissions are required to install cluster-scoped resources. After cluster-scoped resources are installed, cluster-admin permissions are not required for subsequent operator installations.
- An IBM Entitlement Key to pull operator images from the IBM Container Registry.
- To obtain the IBM Entitlement Key:
- Login to the IBM Container Library using your IBM Id.
- Find an existing entitlement key or click Add New Key.
- Copy the key for use in this procedure.
- To obtain the IBM Entitlement Key:
- The Db2 Operator V2 Helm charts extracted or available locally. You can acquire the Helm charts by following one of the following methods:
- Run the following
command:
The resulting chart tarballs are:helm repo add ibm-helm https://raw.githubusercontent.com/IBM/charts/master/repo/ibm-helm helm pull ibm-helm/db2-operator-cluster-scoped helm pull ibm-helm/db2-operator-standalonedb2-operator-cluster-scoped-2.0.0.tgz db2-operator-standalone-2.0.0.tgz - On the bastion host or system with cluster access, extract the Helm chart
archive:
This creates db2-operator-cluster-scoped and db2-operator-standalone directories containing the chart files.tar -xzf db2-operator-cluster-scoped-2.0.0.tgz tar -xzf db2-operator-standalone-2.0.0.tgz - Verify the chart structure:
You should see the chart directory structure including Chart.yaml, values.yaml, and the templates/ directory.ls -la db2-operator-cluster-scoped/ ls -la db2-operator-standalone/
ibm-helm/ to the chart name, for
example:helm repo add ibm-helm https://raw.githubusercontent.com/IBM/charts/master/repo/ibm-helm
helm template db2-operator-cluster-scoped ibm-helm/db2-operator-cluster-scoped \
--set global.operatorNamespace="${OPERATOR_NAMESPACE}" \
| ${KCTL} apply -f -
helm upgrade --install db2-operator ibm-helm/db2-operator-standalone \
--namespace "${OPERATOR_NAMESPACE}" \
-f overrides.yaml \
--set db2u.operator.image.tag="${OPERATOR_TAG}"About this task
Helm is an open-source package manager for Kubernetes. You use the Helm command-line interface (CLI) to install the Db2 Operator V2 Helm charts. For more information on Helm, see Introduction to Helm.
- db2-operator-cluster-scoped: Installs cluster-scoped resources including Custom Resource Definitions (CRDs), Security Context Constraints (SCCs) for Red Hat OpenShift, and webhook configurations.
- db2-operator-standalone: Installs the operator deployment, namespace-scoped RBAC, and supporting services.
Procedure
To install the Db2 Operator V2
Results
- Opt out by using your
overrides.yamlfile - Add the following configuration to your values override file:
Run the following command:db2-ums-collector: enabled: falsehelm install db2-operator db2-operator-standalone/ -f overrides.yaml - Opt out by using the the
--setflag - Run the following
command:
helm install db2-operator db2-operator-standalone/ --set db2-ums-collector.enabled=false
What to do next
- Check the Helm release status
- Run the following command to check the Helm release
status:
helm status db2-operator -n "${OPERATOR_NAMESPACE}"
- Check for failed jobs
-
- Check whether any Helm hook jobs or installation jobs failed:
-
Check whether any Helm hook jobs or installation jobs failed: ${KCTL} get jobs -n "${OPERATOR_NAMESPACE}" - Review the logs for any failed job:
-
${KCTL} logs job/<job-name> -n "${OPERATOR_NAMESPACE}"
- Verify cert-manager
- Run the following command to verify that cert-manager is installed and
running:
${KCTL} get pods -n cert-manager - Check webhook configuration
- If the operator is not reconciling resources, verify that the webhook configuration is correct
by running the following command:
${KCTL} get validatingwebhookconfigurations ${KCTL} get mutatingwebhookconfigurations