# Phase 1: Prerequisites

> Install the operator subscriptions required by Red Hat OpenShift AI 3.4 / 3.5 Models as a Service.

---

LLMS index: [llms.txt](/CAI-Field-Manual-Library/llms.txt)

---

Install the operator subscriptions required by Red Hat OpenShift AI 3.4 / 3.5 Models as a Service.

> [!TIP]
> All file paths and `oc apply` commands in this guide are relative to the [CAI-Field-Manual-MaaS](https://github.com/rh-aiservices-bu/CAI-Field-Manual-MaaS) repository root. Make sure you have cloned it and are working from its root directory (see [Getting Started](/CAI-Field-Manual-Library/maas/#getting-started)).

> [!IMPORTANT]
> This guide is not a replacement for the official Red Hat OpenShift AI Models as a Service documentation ([3.5](https://docs.redhat.com/en/documentation/red_hat_openshift_ai_self-managed/3.5/html/govern_llm_access_with_models-as-a-service/index) | [3.4](https://docs.redhat.com/en/documentation/red_hat_openshift_ai_self-managed/3.4/html/govern_llm_access_with_models-as-a-service/index)). It is a companion resource with opinionated Kustomize manifests and automation scripts to accelerate deployment.

## Version Notes

The versions this guide is written against, for orientation only. This is not a support statement - the [RHOAI 3.x supported configurations matrix](https://access.redhat.com/articles/rhoai-supported-configs-3.x) is the authoritative source, and you should check it (and your own entitlements) before installing.

| Component | Used here | Notes |
| --- | --- | --- |
| OpenShift | 4.19+ | 4.22 has been reported to work with Red Hat OpenShift AI 3.4 and 3.5. Disconnected installs are documented against 4.20+ ([Phase 0](/CAI-Field-Manual-Library/maas/disconnected/)). For OpenShift 5, which needs a different catalog and channel for two of the operators below, see [Running MaaS on OpenShift 5](/CAI-Field-Manual-Library/maas/openshift5/). |
| RHOAI | 3.4, 3.5 | Both are covered. Version-specific steps are marked with tabs. |
| Red Hat Connectivity Link (RHCL) | 1.4.2+ | Any 1.4.x release is generally reported to work with Red Hat OpenShift AI 3.4 and 3.5. The manifests here assume >= 1.4.2, which is what the gateway-scoped AuthPolicy used by [Multi-Tenancy](/CAI-Field-Manual-Library/maas/reference/multi-tenancy/) needs. RHCL 1.5.0 (channel `stable-1.5`, with the GA MCP Gateway) was validated with Red Hat OpenShift AI 3.5.2, with two fixes, see [Running MaaS with RHCL 1.5](/CAI-Field-Manual-Library/maas/rhcl-15/). |

On RHCL specifically: 1.3.x does not appear in the matrix for these RHOAI versions, so downgrading to it is probably not a good way out of a problem. For issues seen in earlier RHCL releases, see [KCS 7144055](https://access.redhat.com/solutions/7144055).

> [!NOTE]
> On entitlement, the [Red Hat AI subscription guide](https://access.redhat.com/articles/7092611) describes RHCL as being included in Red Hat AI SKUs for Models as a Service use cases only from Red Hat OpenShift AI 3.4 onward, and not included for other RHOAI components. When Models as a Service is enabled, RHCL is deployed through the Kuadrant Operator, which provides authentication, authorization, and rate limiting. Confirm the details for your subscription with Red Hat rather than relying on this paragraph.

## Operator Overview

| Operator | Namespace | Purpose |
| --- | --- | --- |
| Red Hat OpenShift AI (`rhods-operator`) | `redhat-ods-operator` | Core RHOAI platform, model serving, dashboards, pipelines |
| Red Hat Connectivity Link (`rhcl-operator`) | `openshift-operators` | API gateway policies, authentication (Authorino) and rate limiting (Limitador) for MaaS endpoints |
| cert-manager (`openshift-cert-manager-operator`) | `cert-manager-operator` | TLS certificate lifecycle management for serving endpoints |
| Leader Worker Set (`leader-worker-set`) | `openshift-lws-operator` | Coordinates multi-replica workloads for distributed inference and training |

### Optional GPU Operators

| Operator | Namespace | Purpose |
| --- | --- | --- |
| Node Feature Discovery (`nfd`) | `openshift-nfd` | Detects hardware features (GPUs, CPU flags) and labels nodes accordingly |
| NVIDIA GPU Operator (`gpu-operator-certified`) | `nvidia-gpu-operator` | Installs NVIDIA drivers, device plugin, and monitoring for GPU workloads |

### Optional MetalLB Operator (Non-Cloud Clusters)

| Operator | Namespace | Purpose |
| --- | --- | --- |
| MetalLB Operator (`metallb-operator`) | `metallb-system` | Provides LoadBalancer IP addresses for the MaaS Gateway on baremetal, OpenStack, or SNO clusters |

On non-cloud clusters (baremetal, OpenStack, RHPDS, SNO), there is no cloud load-balancer controller to provision external IPs for LoadBalancer Services. MetalLB fills this role, assigning IPs from a configured pool so the MaaS Gateway can reach `Programmed=True`.

> [!NOTE]
> The `setup-maas.sh` script auto-detects non-cloud platforms and installs MetalLB automatically if needed.

## Installation

### Step 0: Clone the Repository

```sh
git clone https://github.com/rh-aiservices-bu/CAI-Field-Manual-MaaS.git
cd CAI-Field-Manual-MaaS
```

All commands in this guide are run from the repository root.

### Step 1: Install Required Operators

```sh
oc apply -k manifests/01-prerequisites/operators/
```

This installs all four required operator subscriptions. OLM will resolve and install each operator automatically.

> [!NOTE]
> If any of these operators are already installed on your cluster (e.g. via OperatorHub), this command may fail with an OperatorGroup conflict - OLM only allows one OperatorGroup per namespace. In that case, delete the duplicate OperatorGroup that was just created:
>
> ```sh
> # Check which namespaces have duplicate OperatorGroups
> for ns in redhat-ods-operator cert-manager-operator openshift-lws-operator; do
>   oc get operatorgroup -n "$ns" --no-headers 2>/dev/null
> done
> # Delete the one created by this guide (keep the existing one)
> oc delete operatorgroup <duplicate-name> -n <namespace>
> ```

### Step 2 (Optional): Install GPU Operators

If your cluster has GPU nodes (or you plan to add them), install the GPU operators:

```sh
oc apply -k manifests/01-prerequisites/gpu/
```

### Step 2b (Optional): Create GPU Operand Instances

After the GPU operator CSVs have succeeded (see [Verification](#verification) below), create the operand instances that configure NFD and the GPU driver stack.

> [!IMPORTANT]
> The operators must be fully installed before applying these resources - the CRDs they define do not exist until the operators are ready. Wait for both CSVs to succeed first.

```sh
# Wait for GPU operator CSVs to succeed
oc wait csv -n openshift-nfd -l operators.coreos.com/nfd.openshift-nfd="" \
  --for=jsonpath='{.status.phase}'=Succeeded --timeout=600s

oc wait csv -n nvidia-gpu-operator -l operators.coreos.com/gpu-operator-certified.nvidia-gpu-operator="" \
  --for=jsonpath='{.status.phase}'=Succeeded --timeout=600s
```

Create the NFD NodeFeatureDiscovery instance (scans nodes for GPU hardware) and the NVIDIA ClusterPolicy (installs drivers, device plugin, monitoring):

```sh
oc apply -k manifests/01-prerequisites/gpu/instances/
```

Wait for the ClusterPolicy to reach `ready` state (this takes 5-10 minutes as the GPU operator installs NVIDIA drivers on GPU nodes):

```sh
oc wait clusterpolicy gpu-cluster-policy \
  --for=jsonpath='{.status.state}'=ready --timeout=600s
```

Verify GPU resources are available:

```sh
# Check NFD labeled GPU nodes
oc get nodes -l feature.node.kubernetes.io/pci-10de.present=true

# Check GPU operator pods
oc get pods -n nvidia-gpu-operator

# Check nvidia.com/gpu resources on GPU nodes
oc get nodes -l nvidia.com/gpu.present=true
```

### Step 3: Install MetalLB (Non-Cloud Platforms Only)

> [!NOTE]
> Read this section carefully!

If your cluster has no cloud load-balancer controller (baremetal, OpenStack, RHPDS/SNO), you need MetalLB to make the Gateway accessible externally.

First, determine your platform type:

```sh
oc get infrastructure cluster -o jsonpath='{.status.platform}'
```

| Platform output | What to do |
| --- | --- |
| `AWS`, `Azure`, `GCP` (cloud) | **Skip to [Verification](#verification) below** — no extra configuration needed. |
| `None`, `BareMetal`, `OpenStack` | **Continue with the steps below** — MetalLB and a passthrough Route are required. |

Install the MetalLB operator:

```sh
oc apply -k manifests/01-prerequisites/metallb/
```

> [!NOTE]
> If MetalLB is already installed on your cluster, this may fail with an OperatorGroup conflict. Delete the duplicate OperatorGroup from `metallb-system` namespace (see the note in Step 1 above).

Wait for the MetalLB CSV to succeed, then create the MetalLB CR and configure an IP pool:

```sh
oc wait csv -n metallb-system -l operators.coreos.com/metallb-operator.metallb-system="" \
  --for=jsonpath='{.status.phase}'=Succeeded --timeout=120s
```

Create MetalLB instance

```sh
oc apply -f manifests/01-prerequisites/metallb/metallb.yaml
```

Create IPAddressPool + L2Advertisement.  

> [!IMPORTANT]
> Do **not** use the node's own IP for the MetalLB pool. When a LoadBalancer service shares the node IP on port 443, kube-proxy iptables rules intercept internal cluster traffic meant for the OpenShift router (which serves `*.apps` routes on the same IP:port via hostNetwork). This breaks OAuth callbacks, console access, and any in-cluster traffic to routes.
>
> The command below derives an IP one address above the first node's InternalIP. For multi-node clusters or complex networks, adjust `METALLB_IP_RANGE` to an unused IP on the same L2 subnet.

```sh
NODE_IP=$(oc get nodes -o jsonpath='{.items[0].status.addresses[?(@.type=="InternalIP")].address}')
METALLB_IP=$(echo "$NODE_IP" | awk -F. '{printf "%s.%s.%s.%d", $1, $2, $3, $4+1}')
export METALLB_IP_RANGE="${METALLB_IP}-${METALLB_IP}"

echo "Node IP: $NODE_IP  ->  MetalLB IP: $METALLB_IP_RANGE"

envsubst < manifests/03-maas-platform/openshift-gateway-setup/metallb-config.yaml | oc apply -f -
```

## Verification

### Wait for Operator CSVs to Succeed

After applying the subscriptions, wait for each operator's ClusterServiceVersion to reach the `Succeeded` phase.

> [!TIP]
> Operator CSVs take 30-60 seconds to appear after applying subscriptions. If `oc wait` returns "no matching resources found", wait a minute and retry.

**Required operators:**

```sh
oc wait csv -n redhat-ods-operator -l operators.coreos.com/rhods-operator.redhat-ods-operator="" \
  --for=jsonpath='{.status.phase}'=Succeeded --timeout=600s

oc wait csv -n openshift-operators -l operators.coreos.com/rhcl-operator.openshift-operators="" \
  --for=jsonpath='{.status.phase}'=Succeeded --timeout=600s

oc wait csv -n cert-manager-operator -l operators.coreos.com/openshift-cert-manager-operator.cert-manager-operator="" \
  --for=jsonpath='{.status.phase}'=Succeeded --timeout=600s

oc wait csv -n openshift-lws-operator -l operators.coreos.com/leader-worker-set.openshift-lws-operator="" \
  --for=jsonpath='{.status.phase}'=Succeeded --timeout=600s
```

**GPU operators (if installed):**

```sh
oc wait csv -n openshift-nfd -l operators.coreos.com/nfd.openshift-nfd="" \
  --for=jsonpath='{.status.phase}'=Succeeded --timeout=600s

oc wait csv -n nvidia-gpu-operator -l operators.coreos.com/gpu-operator-certified.nvidia-gpu-operator="" \
  --for=jsonpath='{.status.phase}'=Succeeded --timeout=600s
```

### Verify CRDs Are Available

Check that the key CRDs have been registered:

```sh
# RHOAI
oc get crd datascienceclusters.datasciencecluster.opendatahub.io

# Connectivity Link / Kuadrant
oc get crd kuadrants.kuadrant.io

# cert-manager
oc get crd certificates.cert-manager.io

# Leader Worker Set
oc get crd leaderworkersetoperators.operator.openshift.io
```

### Quick Status Check

List all operator subscriptions and their current CSVs:

```sh
oc get subscriptions.operators.coreos.com -A \
  -o custom-columns='NAMESPACE:.metadata.namespace,NAME:.metadata.name,CSV:.status.currentCSV,STATE:.status.state'
```

Expected Results:

> [!NOTE]
> Exact CSV versions will vary depending on when you install. The versions below were current as of June 2026.

```text
NAMESPACE                NAME                                                                                   CSV                                                STATE
cert-manager-operator    openshift-cert-manager-operator                                                        cert-manager-operator.v1.19.0                      AtLatestKnown
metallb-system           metallb-operator                                                                       metallb-operator.v4.20.0-...                       AtLatestKnown
openshift-lws-operator   leader-worker-set                                                                      leader-worker-set.v1.0.0                           AtLatestKnown
openshift-operators      authorino-operator-stable-redhat-operators-openshift-marketplace                       authorino-operator.v1.3.1                          AtLatestKnown
openshift-operators      dns-operator-stable-redhat-operators-openshift-marketplace                             dns-operator.v1.3.1                                AtLatestKnown
openshift-operators      limitador-operator-stable-redhat-operators-openshift-marketplace                       limitador-operator.v1.3.1                          AtLatestKnown
openshift-operators      rhcl-operator                                                                          rhcl-operator.v1.4.2                               AtLatestKnown
redhat-ods-operator      rhods-operator                                                                         rhods-operator.3.5.0                               AtLatestKnown
```

## Appendix

### Directory Structure

```text
manifests/01-prerequisites/
  operators/
    kustomization.yaml          # aggregates all operator subdirectories
    cert-manager/
    connectivity-link/
    leader-worker-set/
    rhoai-operator/
  gpu/
    kustomization.yaml          # aggregates NFD + NVIDIA operator subscriptions
    nfd/
    nvidia-operator/
    instances/
      kustomization.yaml        # aggregates NFD + GPU operand instances
      nodefeaturediscovery.yaml  # NFD NodeFeatureDiscovery CR
      cluster-policy.yaml       # NVIDIA GPU ClusterPolicy CR
  metallb/
    kustomization.yaml          # MetalLB namespace + operatorgroup + subscription
    namespace.yaml
    operatorgroup.yaml
    subscription.yaml
    metallb.yaml                # MetalLB CR (applied after CSV succeeds)
```

## References

- [RHOAI 3.5 MaaS Official Docs](https://docs.redhat.com/en/documentation/red_hat_openshift_ai_self-managed/3.5/html/govern_llm_access_with_models-as-a-service/index)
- [RHOAI 3.4 MaaS Official Docs](https://docs.redhat.com/en/documentation/red_hat_openshift_ai_self-managed/3.4/html/govern_llm_access_with_models-as-a-service/index)
- [Upstream MaaS Documentation](https://opendatahub-io.github.io/models-as-a-service/latest/)
- [RHOAI 3.5 Installation Guide](https://docs.redhat.com/en/documentation/red_hat_openshift_ai_self-managed/3.5/html/installing_and_uninstalling_openshift_ai_self-managed/index)
- [RHOAI 3.4 Installation Guide](https://docs.redhat.com/en/documentation/red_hat_openshift_ai_self-managed/3.4/html/installing_and_uninstalling_openshift_ai_self-managed/index)

## Next step

Proceed to [Phase 2: Platform Configuration](/CAI-Field-Manual-Library/maas/installation-guide/platform-config/).
