# Install on OpenShift

This page walks you through installing ScyllaDB Operator and all its dependencies on Red Hat OpenShift using the Operator Lifecycle Manager (OLM) software catalog. If you are running on a generic Kubernetes distribution, see [Install with GitOps](https://operator.docs.scylladb.com/v1.22/install-operator/install-with-gitops.md) or [Install with Helm](https://operator.docs.scylladb.com/v1.22/install-operator/install-with-helm.md) instead.

ScyllaDB Operator is a Red Hat OpenShift Certified Operator. It is available in the embedded software catalog and can be installed through the OpenShift web console or CLI.

#### NOTE
**ScyllaDB Operator must run in the `scylla-operator` namespace** and **ScyllaDB Manager must run in the `scylla-manager` namespace**. Using different namespaces for these components is [not currently supported](https://github.com/scylladb/scylla-operator/issues/2563).

## Prerequisites

- An OpenShift Container Platform cluster meeting the [infrastructure requirements](https://operator.docs.scylladb.com/v1.22/install-operator/provision-infrastructure/index.md).
- An account with `cluster-admin` permissions.
- [`kubectl`](https://kubernetes.io/docs/tasks/tools/#kubectl) or [OpenShift CLI (`oc`)](https://docs.redhat.com/en/documentation/openshift_container_platform/4.20/html/cli_tools/openshift-cli-oc) configured to communicate with the cluster.

## Install ScyllaDB Operator

ScyllaDB Operator can be installed from the OpenShift software catalog using either the web console or the CLI.

Web Console

This procedure follows the generic Operator installation steps outlined in the upstream documentation: [Installing from the software catalog by using the web console](https://docs.redhat.com/en/documentation/openshift_container_platform/4.20/html/operators/administrator-tasks#olm-installing-from-software-catalog-using-web-console_olm-adding-operators-to-a-cluster).

### Procedure

1. Navigate to **Ecosystem** → **Software Catalog**.
2. Search for **ScyllaDB Operator** and select the **Certified** version by setting the **Source** filter to **Certified**, or by verifying that the ScyllaDB Operator tile has the **Certified** tag.
3. Read the description and click **Install**.
4. In the **Install Operator** dialog, configure the installation:
   - For clusters on AWS with Security Token Service (STS): enter the Amazon Resource Name (ARN) of the AWS IAM role for your service account in the role ARN field.
   - Select the **stable** Update Channel.
   - Select the **All namespaces on the cluster** installation mode.
   - Select the Operator recommended installed namespace: **scylla-operator**.
   - Select the **Manual** update approval strategy to manually approve ScyllaDB Operator upgrades when new versions are available.
5. Click **Install**.
6. In the **Install Plan** dialog, review the manual install plan and click **Approve**.
7. Log in to the OpenShift cluster in the terminal. Ensure that `kubectl` is configured to communicate with your cluster.

CLI

This procedure follows the generic Operator installation steps outlined in the upstream documentation: [Installing from the software catalog by using the CLI](https://docs.redhat.com/en/documentation/openshift_container_platform/4.20/html/operators/administrator-tasks#olm-installing-operator-from-software-catalog-using-cli_olm-adding-operators-to-a-cluster).

### Procedure

1. Log in to the OpenShift cluster in the terminal. Ensure that `kubectl` is configured to communicate with your cluster.
2. Verify that the ScyllaDB Operator package is available:
   ```shell
   kubectl get -n=openshift-marketplace packagemanifest scylladb-operator
   ```

   **Expected output:**
   ```console
   NAME                CATALOG               AGE
   scylladb-operator   Certified Operators   2d22h
   ```
3. Create the `scylla-operator` namespace:
   ```shell
   kubectl create namespace scylla-operator
   ```
4. Create an `OperatorGroup` in the `scylla-operator` namespace:
   ```shell
   kubectl apply --server-side -n=scylla-operator -f=- <<EOF
   apiVersion: operators.coreos.com/v1
   kind: OperatorGroup
   metadata:
     name: scylladb-operator
     namespace: scylla-operator
   EOF
   ```
5. Create a `Subscription` to install ScyllaDB Operator.

   Clusters on cloud providers with token-based authentication require additional fields in the `Subscription` config section. Apply the appropriate manifest based on your environment:

   AWS STS

   If the cluster uses AWS Security Token Service (STS), include the role ARN in the `Subscription` manifest:
   ```shell
   kubectl apply --server-side -n=scylla-operator -f=- <<EOF
   apiVersion: operators.coreos.com/v1alpha1
   kind: Subscription
   metadata:
     name: scylladb-operator
     namespace: scylla-operator
   spec:
     channel: stable
     installPlanApproval: Manual
     name: scylladb-operator
     source: certified-operators
     sourceNamespace: openshift-marketplace
     startingCSV: scylladb-operator.v1.21.1
     config:
       env:
       - name: ROLEARN
         value: "<role_arn>"
   EOF
   ```

   Replace `<role_arn>` with the ARN of the AWS IAM role for your service account.

   Generic
   ```shell
   kubectl apply --server-side -n=scylla-operator -f=- <<EOF
   apiVersion: operators.coreos.com/v1alpha1
   kind: Subscription
   metadata:
     name: scylladb-operator
     namespace: scylla-operator
   spec:
     channel: stable
     installPlanApproval: Manual
     name: scylladb-operator
     source: certified-operators
     sourceNamespace: openshift-marketplace
     startingCSV: scylladb-operator.v1.21.1
   EOF
   ```
6. Locate, review, and approve the generated `InstallPlan`:
   ```shell
   kubectl -n=scylla-operator get installplan -l=operators.coreos.com/scylladb-operator.scylla-operator=""
   ```

   **Example expected output:**
   ```console
   NAME            CSV                                    APPROVAL   APPROVED
   install-tw6bv   scylladb-operator.v1.21.1   Manual     false
   ```

   Review the `InstallPlan`:
   ```shell
   kubectl -n=scylla-operator describe installplan <install-plan-name>
   ```

   Approve it to start the installation:
   ```shell
   kubectl -n=scylla-operator patch installplan --type=merge -p='{"spec":{"approved":true}}' <install-plan-name>
   ```

   **Example expected output:**
   ```console
   installplan.operators.coreos.com/install-tw6bv patched
   ```
7. Wait for the `ClusterServiceVersion` to reach `Succeeded` phase:
   ```shell
   kubectl -n=scylla-operator wait --for=create --timeout=10m csv/scylladb-operator.v1.21.1
   kubectl -n=scylla-operator wait --timeout=5m --for=jsonpath='{.status.phase}'=Succeeded clusterserviceversions.operators.coreos.com/scylladb-operator.v1.21.1
   ```

   **Expected output:**
   ```console
   clusterserviceversion.operators.coreos.com/scylladb-operator.v1.21.1 condition met
   clusterserviceversion.operators.coreos.com/scylladb-operator.v1.21.1 condition met
   ```

### Verify the installation

Wait for CRDs to propagate to all API servers:

```shell
kubectl wait --for='condition=established' --timeout=60s \
  crd/scyllaclusters.scylla.scylladb.com \
  crd/nodeconfigs.scylla.scylladb.com \
  crd/scyllaoperatorconfigs.scylla.scylladb.com \
  crd/scylladbmonitorings.scylla.scylladb.com
```

**Expected output:**

```console
customresourcedefinition.apiextensions.k8s.io/scyllaclusters.scylla.scylladb.com condition met
customresourcedefinition.apiextensions.k8s.io/nodeconfigs.scylla.scylladb.com condition met
customresourcedefinition.apiextensions.k8s.io/scyllaoperatorconfigs.scylla.scylladb.com condition met
customresourcedefinition.apiextensions.k8s.io/scylladbmonitorings.scylla.scylladb.com condition met
```

Wait for ScyllaDB Operator and webhook server Deployments:

```shell
kubectl -n=scylla-operator rollout status --timeout=10m deployment.apps/scylla-operator
kubectl -n=scylla-operator rollout status --timeout=10m deployment.apps/webhook-server
```

**Expected output:**

```console
deployment "scylla-operator" successfully rolled out
deployment "webhook-server" successfully rolled out
```

## Next steps

- [Deploy ScyllaDB](https://operator.docs.scylladb.com/v1.22/deploy-scylladb/index.md) — choose a platform-specific reference deployment or deploy your first cluster.

## Related pages

- [Install with GitOps](https://operator.docs.scylladb.com/v1.22/install-operator/install-with-gitops.md) — alternative installation path using manifests (generic Kubernetes).
- [Install with Helm](https://operator.docs.scylladb.com/v1.22/install-operator/install-with-helm.md) — alternative installation path using Helm charts.
- [Upgrade ScyllaDB Operator](https://operator.docs.scylladb.com/v1.22/upgrade/upgrade-operator.md) — version-specific upgrade steps.
