Skip to content

This is the multi-page printable view of this section. .

Return to the regular view of this page.

Installation Guide

Phases 1–4 — prerequisites, platform configuration, MaaS platform infrastructure, and RHOAI configuration.

1 - Phase 1: Prerequisites

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

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 repository root. Make sure you have cloned it and are working from its root directory (see Getting Started).

Important

This guide is not a replacement for the official Red Hat OpenShift AI Models as a Service documentation (3.5 | 3.4). 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 is the authoritative source, and you should check it (and your own entitlements) before installing.

ComponentUsed hereNotes
OpenShift4.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). For OpenShift 5, which needs a different catalog and channel for two of the operators below, see Running MaaS on OpenShift 5.
RHOAI3.4, 3.5Both 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 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.

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.

Note

On entitlement, the Red Hat AI subscription guide 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

OperatorNamespacePurpose
Red Hat OpenShift AI (rhods-operator)redhat-ods-operatorCore RHOAI platform, model serving, dashboards, pipelines
Red Hat Connectivity Link (rhcl-operator)openshift-operatorsAPI gateway policies, authentication (Authorino) and rate limiting (Limitador) for MaaS endpoints
cert-manager (openshift-cert-manager-operator)cert-manager-operatorTLS certificate lifecycle management for serving endpoints
Leader Worker Set (leader-worker-set)openshift-lws-operatorCoordinates multi-replica workloads for distributed inference and training

Optional GPU Operators

OperatorNamespacePurpose
Node Feature Discovery (nfd)openshift-nfdDetects hardware features (GPUs, CPU flags) and labels nodes accordingly
NVIDIA GPU Operator (gpu-operator-certified)nvidia-gpu-operatorInstalls NVIDIA drivers, device plugin, and monitoring for GPU workloads

Optional MetalLB Operator (Non-Cloud Clusters)

OperatorNamespacePurpose
MetalLB Operator (metallb-operator)metallb-systemProvides 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

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

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:

# 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:

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

Step 2b (Optional): Create GPU Operand Instances

After the GPU operator CSVs have succeeded (see 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.

# 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):

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):

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

Verify GPU resources are available:

# 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:

oc get infrastructure cluster -o jsonpath='{.status.platform}'
Platform outputWhat to do
AWS, Azure, GCP (cloud)Skip to Verification below — no extra configuration needed.
None, BareMetal, OpenStackContinue with the steps below — MetalLB and a passthrough Route are required.

Install the MetalLB operator:

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:

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

Create MetalLB instance

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.

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:

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):

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:

# 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:

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.

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

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

Next step

Proceed to Phase 2: Platform Configuration.

2 - Phase 2: Platform Configuration

Configures the platform prerequisites for MaaS: Kuadrant/Authorino (auth and rate limiting), the GatewayClass, and the MaaS Gateway.

This phase configures the platform prerequisites for MaaS: Kuadrant/Authorino (auth and rate limiting), the GatewayClass, and the MaaS Gateway.

Apply each step in order and wait for the status gates before proceeding to the next step. The ordering matters because later resources depend on earlier ones (e.g. the Authorino CR references the TLS cert created by the Service annotation, and the Gateway requires the GatewayClass to exist).

Tip

All file paths and oc apply commands in this guide are relative to the CAI-Field-Manual-MaaS repository root. Make sure you have cloned it and are working from its root directory (see Getting Started).

Important

This guide is not a replacement for the official Red Hat OpenShift AI Models as a Service documentation (3.5 | 3.4). It is a companion resource with opinionated Kustomize manifests and automation scripts to accelerate deployment.

Prerequisites

  • OpenShift 4.19+ cluster with oc CLI authenticated as cluster-admin
  • Red Hat Connectivity Link (RHCL) operator already installed (see RHCL docs)
  • Phase 1 (operators) completed

Step 1: Kuadrant and Authorino

Kuadrant provides authentication (Authorino) and rate limiting (Limitador) for MaaS API endpoints. These three configurations:

  • Create the kuadrant-system namespace
  • Pre-configure the Authorino Service with a service-ca annotation to auto-generate a TLS certificate (authorino-server-cert) for secure Gateway-to-Authorino communication
  • Deploy the Kuadrant CR with observability enabled, which triggers the Kuadrant operator to install Authorino and Limitador components. The observability.enable: true setting exposes rate-limiting and auth metrics for the RHOAI monitoring stack (COO) and the optional observability dashboards in Phase 7.

The Kuadrant operator auto-creates an Authorino instance when reconciling the Kuadrant resource. You’ll enable TLS on that Authorino instance in the next step.

Note

Apply the namespace, service annotation, and Kuadrant CR. Do not apply the full kustomization in one shot. The Kuadrant operator auto-creates an Authorino CR when it reconciles the Kuadrant resource, so the Authorino CR must be configured separately via oc patch after Kuadrant is ready.

oc apply -f manifests/02-platform-config/kuadrant/namespace.yaml
oc apply -f manifests/02-platform-config/kuadrant/service-annotation.yaml
oc apply -f manifests/02-platform-config/kuadrant/kuadrant.yaml

Wait for Kuadrant to become ready:

oc wait --for=condition=Ready kuadrant/kuadrant -n kuadrant-system --timeout=120s
Note

Expected on fresh clusters: If the cluster has no GatewayClass yet, this wait times out with Ready=False, reason MissingDependency (“Gateway API provider (istio / envoy gateway) is not installed”). This is normal - Istio is only provisioned when the GatewayClass is created in Step 4. Continue with Steps 2-4, then restart the Kuadrant operator pod and re-run the wait:

oc delete pod -n openshift-operators \
  $(oc get pods -n openshift-operators --no-headers | grep kuadrant-operator | awk '{print $1}')
oc wait --for=condition=Ready kuadrant/kuadrant -n kuadrant-system --timeout=180s

The same fix applies if Kuadrant reports MissingDependency on a cluster where Istio was installed after the Kuadrant CR (race condition).

Step 2: Configure TLS for Models-as-a-Service

Now that Kuadrant is deployed, we need to update the Authorino CR to enable TLS. (Detailed documentation for this step is available in the RHOAI docs: 3.5 | 3.4.) Follow the three steps below to enable TLS between the Gateway and Authorino. (The fourth step from the official docs - annotating the Gateway for the Authorino TLS bootstrap - is applied in Step 5c, after the Gateway is created.)

Step 2a: The service annotation (already applied above) triggered the service-ca operator to generate the authorino-server-cert TLS Secret:

oc get secret authorino-server-cert -n kuadrant-system

Step 2b: Patch the Authorino CR to enable the TLS listener:

oc patch authorino authorino -n kuadrant-system --type=merge --patch '{
  "spec": {
    "listener": {
      "tls": {
        "enabled": true,
        "certSecretRef": {
          "name": "authorino-server-cert"
        }
      }
    }
  }
}'

Step 2c: Configure Authorino deployment with TLS certificate env vars:

oc -n kuadrant-system set env deployment/authorino \
  SSL_CERT_FILE=/etc/ssl/certs/openshift-service-ca/service-ca-bundle.crt \
  REQUESTS_CA_BUNDLE=/etc/ssl/certs/openshift-service-ca/service-ca-bundle.crt

Wait for the Authorino deployment to become available:

oc wait --for=condition=Available deployment/authorino -n kuadrant-system --timeout=300s

Step 3: User Workload Monitoring (Optional)

Note

In Red Hat OpenShift AI 3.5, User Workload Monitoring is no longer required for MaaS. The RHOAI operator creates its own ServiceMonitors with monitoring.opendatahub.io/scrape labels, and the COO MonitoringStack (configured in Phase 7) handles metrics collection. Enable UWM if you want the cluster to collect and forward MaaS metrics to external observability tools (Grafana, Datadog, etc.) via the standard OpenShift remote-write configuration. Skip it if you only need the RHOAI-native observability dashboards.

Enable User Workload Monitoring so that Prometheus scrapes MaaS and Kuadrant metrics from user namespaces.

oc apply -k manifests/02-platform-config/uwm/

Wait for the user-workload monitoring stack to start:

Tip

The prometheus-operator deployment may take 10-20 seconds to appear after applying the ConfigMap. If the wait command returns “not found”, retry after a few seconds.

oc wait --for=condition=Available deployment/prometheus-operator \
  -n openshift-user-workload-monitoring --timeout=300s

Verify the Prometheus pods are running:

oc get pods -n openshift-user-workload-monitoring

You should see prometheus-user-workload-0 and thanos-ruler-user-workload-0 pods in Running state.

Expected output:

NAME                                   READY   STATUS    RESTARTS   AGE
prometheus-operator-76b9c6d5dc-rrvn8   2/2     Running   0          23m
prometheus-user-workload-0             6/6     Running   0          23m
thanos-ruler-user-workload-0           4/4     Running   0          23m

Step 4: GatewayClass

Apply the GatewayClass that initializes OpenShift’s built-in Gateway API controller:

oc apply -f manifests/02-platform-config/gatewayclass.yaml

Wait for the GatewayClass to be accepted:

oc wait --for=condition=Accepted gatewayclass/openshift-default --timeout=120s

Verify:

oc get gatewayclass openshift-default

Expected output:

NAME                CONTROLLER                           ACCEPTED   AGE
openshift-default   openshift.io/gateway-controller/v1   True       ...

Step 5: MaaS Gateway

The Gateway uses cluster-specific values (domain and TLS cert name), so it is provided as an envsubst template. Here we will extract the values, render the template, and apply them.

Step 5a: Check Your Platform Type

Before creating the Gateway, determine if your cluster requires additional configuration for non-cloud platforms:

oc get infrastructure cluster -o jsonpath='{.status.platform}'
Platform outputWhat to do
AWS, Azure, GCP (cloud)Skip to Step 5b — create the Gateway directly.
None, BareMetal, OpenStackContinue to Step 5a.1 — verify MetalLB is installed first.

Step 5a.1: Verify MetalLB is Installed (Non-Cloud Platforms Only)

Check if MetalLB is installed:

oc get deployment metallb-operator-controller-manager -n metallb-system 2>/dev/null

If you see “NotFound” or “Error”:

Warning

MetalLB is not installed. Without it, the Gateway will never reach Programmed=True because there is no cloud load balancer to assign an external IP.

You must go back and complete: Phase 1: MetalLB for Non-Cloud Clusters

After installing MetalLB and configuring an IPAddressPool, return to this step.

If MetalLB is installed: Continue to the next step.

Step 5b: Create the MaaS Gateway

First, apply the Gateway resource overrides ConfigMap. This sets the gateway proxy memory limit to 2Gi (the Istio default of 1Gi is insufficient when Kuadrant Wasm extensions are loaded):

oc apply -f manifests/02-platform-config/gateway-resources.yaml

Now create the Gateway. The Gateway template includes spec.infrastructure.parametersRef pointing to the ConfigMap above, so Istio applies the 2Gi limit to the generated Deployment and preserves it across reconciliations.

export CLUSTER_DOMAIN=$(oc get ingresses.config.openshift.io cluster \
  -o jsonpath='{.spec.domain}')
export MAAS_HOSTNAME="maas.${CLUSTER_DOMAIN}"
echo $MAAS_HOSTNAME
export CERT_NAME=$(oc get ingresscontroller default \
  -n openshift-ingress-operator \
  -o jsonpath='{.spec.defaultCertificate.name}' 2>/dev/null)
export CERT_NAME="${CERT_NAME:-router-certs-default}"
echo $CERT_NAME
envsubst '${MAAS_HOSTNAME} ${CERT_NAME}' < manifests/02-platform-config/gateway.yaml.tmpl | oc apply -f -

Step 5c: Annotate the Gateway for Authorino TLS bootstrap:

oc annotate gateway maas-default-gateway -n openshift-ingress \
  security.opendatahub.io/authorino-tls-bootstrap="true" --overwrite

Wait for the Gateway to be programmed:

oc wait --for=condition=Programmed gateway/maas-default-gateway \
  -n openshift-ingress --timeout=120s

Note

Gateway Pod OOMKill Prevention

The ConfigMap applied in Step 5b overrides the Istio default 1Gi memory limit to 2Gi via spec.infrastructure.parametersRef. This prevents the gateway pod from being OOMKilled when Kuadrant Wasm extensions (Authorino auth, Limitador rate limiting) are compiled at startup. Unlike oc patch deployment, this approach survives Istio reconciliation.

If you deployed the Gateway without the ConfigMap (e.g. from an older version of this guide), apply the fix retroactively:

oc apply -f manifests/02-platform-config/gateway-resources.yaml

oc patch gateway maas-default-gateway -n openshift-ingress --type=merge -p '{
  "spec": {
    "infrastructure": {
      "parametersRef": {
        "group": "",
        "kind": "ConfigMap",
        "name": "maas-gateway-options"
      }
    }
  }
}'

Step 5d: Label namespaces for Gateway route binding

The Gateway restricts HTTPRoute attachment to namespaces explicitly labeled with maas.opendatahub.io/gateway-access=true. This follows the principle of least privilege - only namespaces that are designated to expose services through the Gateway can create routes.

Tip

For additional Gateway hardening beyond namespace selectors - including RBAC restrictions on HTTPRoute creation, ValidatingAdmissionPolicy enforcement, and audit procedures - see the KCS How to verify and secure configuration of OpenShift AI Gateway for Model Serving.

Important

Any namespace that needs to serve models through the MaaS Gateway must be labeled with maas.opendatahub.io/gateway-access=true. Without this label, HTTPRoutes created in that namespace will not be accepted by the Gateway and the model will not be reachable.

If you create additional namespaces for model serving, remember to apply this label:

oc label namespace <your-namespace> \
  maas.opendatahub.io/gateway-access=true --overwrite

Label the namespace where the MaaS API route is created:

RHAIE Version: 3.5, 3.6

The redhat-ai-gateway-infra namespace does not exist yet - it is created by the RHOAI operator when MaaS is enabled in Phase 4. After completing Phase 4, come back and label it:

oc label namespace redhat-ai-gateway-infra \
  maas.opendatahub.io/gateway-access=true --overwrite

RHAIE Version: 3.4

oc label namespace redhat-ods-applications \
  maas.opendatahub.io/gateway-access=true --overwrite
Note

Model namespaces (llm, external-models) are labeled in their respective deployment phases.

Step 5e: Create Passthrough Route (Non-Cloud Platforms Only)

If your platform type from Step 5a was None, BareMetal, or OpenStack, you must create a passthrough Route. This routes external traffic through the OpenShift ingress controller to the Gateway’s LoadBalancer service.

Note

If your platform type from Step 5a was AWS, Azure, GCP, or another cloud provider, you can skip this step.

export CLUSTER_DOMAIN=$(oc get ingresses.config.openshift.io cluster \
  -o jsonpath='{.spec.domain}')
export MAAS_HOSTNAME="maas.${CLUSTER_DOMAIN}"

envsubst '${MAAS_HOSTNAME}' < manifests/03-maas-platform/openshift-gateway-setup/route.yaml.tmpl | oc apply -f -
Note

Why is this needed?

On non-cloud platforms, the Gateway’s LoadBalancer service receives an IP from MetalLB (e.g., 10.10.10.11), but that IP is only routable within the cluster network. External traffic cannot reach it directly.

The passthrough Route bridges external requests (via the OpenShift router at your cluster’s public DNS) to the internal LoadBalancer IP, allowing the Gateway to be accessible from outside the cluster.

Tip

MetalLB and the Route solve different problems. MetalLB assigns a LoadBalancer IP so the Gateway reaches Programmed=True - without it, the Gateway stays stuck in Pending. The passthrough Route makes that internal IP reachable from outside the cluster. Both are required on non-cloud platforms.

Warning

Environments without a Router VIP (round-robin DNS)

This setup assumes *.apps.<base_domain> resolves to the OpenShift Router VIP so that the passthrough Route can intercept traffic for maas.apps.<base_domain>.

In some on-prem environments, *.apps is configured as round-robin DNS pointing directly to worker node IPs instead of a single VIP. If the Router pods are not scheduled on all workers, requests may land on a node without a Router and fail silently.

In that case, create a dedicated DNS A record for maas.apps.<base_domain> pointing to the MetalLB-assigned IP of the Gateway’s LoadBalancer service:

oc get svc -n openshift-ingress maas-default-gateway-openshift-default \
  -o jsonpath='{.status.loadBalancer.ingress[0].ip}'

Use that IP as the target for the DNS record.

Verify the Route was created:

oc get route maas-default-gateway-https -n openshift-ingress

Expected output:

NAME                         HOST/PORT                              PATH   SERVICES                                 PORT    TERMINATION            WILDCARD
maas-default-gateway-https   maas.apps.<cluster-domain>                    maas-default-gateway-openshift-default   https   passthrough/Redirect   None

Step 5f: Corporate Proxy Configuration (OCP < 4.22 Only)

On OCP versions before 4.22, the OpenShift Gateway controller does not propagate the cluster-wide proxy settings (config.openshift.io/v1 Proxy) into the gateway pod. If your cluster sits behind a corporate HTTP proxy, the istio-proxy container cannot reach external endpoints - this breaks ExternalModel provider calls and WASM plugin OCI image pulls.

This is tracked as OCPBUGS-77457 and is fixed in OCP 4.22+. On earlier versions, you must inject the proxy env vars manually through the gateway ConfigMap.

Note

If your cluster is not behind a corporate proxy, or you are on OCP 4.22+, skip this step.

Detect if this applies to you:

# Check OCP version
oc get clusterversion version -o jsonpath='{.status.desired.version}'

# Check if the cluster has a proxy configured
oc get proxy/cluster -o jsonpath='{.spec.httpProxy}'

If the OCP version is below 4.22 and httpProxy returns a value, apply the proxy-aware ConfigMap.

Step 5f.1: Extract the proxy values from the cluster-wide Proxy config:

export HTTP_PROXY=$(oc get proxy/cluster -o jsonpath='{.spec.httpProxy}')
export HTTPS_PROXY=$(oc get proxy/cluster -o jsonpath='{.spec.httpsProxy}')
export NO_PROXY=$(oc get proxy/cluster -o jsonpath='{.spec.noProxy}')
echo "HTTP_PROXY=${HTTP_PROXY}"
echo "HTTPS_PROXY=${HTTPS_PROXY}"
echo "NO_PROXY=${NO_PROXY}"

Step 5f.2: Apply the proxy-aware ConfigMap (this replaces the gateway-resources.yaml applied in Step 5b - it includes the same 2Gi memory limit plus the proxy env vars):

envsubst '${HTTP_PROXY} ${HTTPS_PROXY} ${NO_PROXY}' \
  < manifests/02-platform-config/gateway-resources-proxy.yaml.tmpl \
  | oc apply -f -

The gateway pod will restart automatically. Wait for it to come back:

oc rollout status deployment/maas-default-gateway-openshift-default \
  -n openshift-ingress --timeout=120s

Step 5f.3: Verify the proxy env vars are set on the gateway pod:

GATEWAY_POD=$(oc get pods -n openshift-ingress \
  -l gateway.networking.k8s.io/gateway-name=maas-default-gateway \
  -o jsonpath='{.items[0].metadata.name}')
oc exec "${GATEWAY_POD}" -n openshift-ingress -c istio-proxy \
  -- env | grep -i proxy

You should see HTTP_PROXY, HTTPS_PROXY, and NO_PROXY with the correct values.

Note

How it works: The gateway-resources-proxy.yaml.tmpl produces the same maas-gateway-options ConfigMap that the Gateway already references via spec.infrastructure.parametersRef. The gateway controller merges this ConfigMap into the generated Deployment, injecting the proxy env vars into the istio-proxy container alongside the 2Gi memory limit.

If you already applied gateway-resources.yaml in Step 5b, this step overwrites it with the proxy-aware version. The ConfigMap name (maas-gateway-options) and the Gateway’s parametersRef remain unchanged.

Verification

After completing all steps, confirm the full platform state:

Tip

On macOS, the local DNS resolver may cache negative lookups for maas.apps.<cluster-domain>. If curl reports “Could not resolve host” but dig or nslookup resolves the address correctly, either flush your DNS cache (sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder) or use the --resolve flag: curl -vsk --resolve "maas.${CLUSTER_DOMAIN}:443:$(dig +short maas.${CLUSTER_DOMAIN} | head -1)" https://maas.${CLUSTER_DOMAIN}.

# Kuadrant ready
oc get kuadrant -n kuadrant-system

# Authorino running with TLS
oc get deployment authorino -n kuadrant-system
oc get secret authorino-server-cert -n kuadrant-system

# UWM running
oc get pods -n openshift-user-workload-monitoring

# GatewayClass accepted
oc get gatewayclass openshift-default

# Gateway programmed
oc get gateway maas-default-gateway -n openshift-ingress

# Check passthrough route exists (bare metal, Open Stack or None platform type)
oc get route maas-default-gateway-https -n openshift-ingress -o jsonpath='{.status.ingress[0].conditions[?(@.type=="Admitted")].status}'

# Verify TLS connection to the Gateway
CLUSTER_DOMAIN=$(oc get ingresses.config.openshift.io cluster -o jsonpath='{.spec.domain}')
echo $CLUSTER_DOMAIN
curl -vsk https://maas.${CLUSTER_DOMAIN} 2>&1 | grep -E "SSL connection|Connected"

Expected output:

$ oc get kuadrant -n kuadrant-system
NAME       MTLS AUTHORINO   MTLS LIMITADOR   AGE
kuadrant   false            false            49m

$ oc get deployment authorino -n kuadrant-system
oc get secret authorino-server-cert -n kuadrant-system
NAME        READY   UP-TO-DATE   AVAILABLE   AGE
authorino   1/1     1            1           49m
NAME                    TYPE                DATA   AGE
authorino-server-cert   kubernetes.io/tls   2      49m

$ oc get pods -n openshift-user-workload-monitoring
NAME                                   READY   STATUS    RESTARTS   AGE
prometheus-operator-76b9c6d5dc-rrvn8   2/2     Running   0          23m
prometheus-user-workload-0             6/6     Running   0          23m
thanos-ruler-user-workload-0           4/4     Running   0          23m

$ oc get gatewayclass openshift-default
NAME                CONTROLLER                           ACCEPTED   AGE
openshift-default   openshift.io/gateway-controller/v1   True       23m

$ oc get gateway maas-default-gateway -n openshift-ingress
NAME                   CLASS               ADDRESS       PROGRAMMED   AGE
maas-default-gateway   openshift-default   10.10.10.11   True         13m

# (If you created a passthrough route in Step 5e)
$ oc get route maas-default-gateway-https -n openshift-ingress -o jsonpath='{.status.ingress[0].conditions[?(@.type=="Admitted")].status}'
True

$ CLUSTER_DOMAIN=$(oc get ingresses.config.openshift.io cluster -o jsonpath='{.spec.domain}')
$ echo $CLUSTER_DOMAIN
apps.`<your cluster name>`.`<your domain>`
curl -vsk https://maas.${CLUSTER_DOMAIN} 2>&1 | grep -E "SSL connection|Connected"
* Connected to maas.apps.<cluster-domain> (...) port 443
* SSL connection using TLSv1.3 / ...    <-- exact cipher varies by client

Appendix

Directory Structure

manifests/02-platform-config/
  gateway-resources.yaml         # ConfigMap: gateway proxy resource overrides (2Gi memory)
  gateway-resources-proxy.yaml.tmpl  # ConfigMap: proxy-aware variant (2Gi memory + HTTP_PROXY env vars, OCP < 4.22)
  gateway.yaml.tmpl              # Gateway template (envsubst, references ConfigMap via parametersRef)
  gatewayclass.yaml              # GatewayClass resource
  kustomization.yaml             # Aggregates all subdirectories
  kuadrant/
    namespace.yaml               # kuadrant-system namespace
    service-annotation.yaml      # TLS cert annotation for Authorino
    kuadrant.yaml                # Kuadrant CR
    authorino.yaml               # Authorino TLS patch
    kustomization.yaml
  uwm/
    cluster-monitoring-config.yaml   # User Workload Monitoring ConfigMap
    kustomization.yaml

References

Next step

Proceed to Phase 3: MaaS Platform.

3 - Phase 3: MaaS Platform Infrastructure

Deploys the PostgreSQL database required by the MaaS API for key lifecycle management.

Deploy the PostgreSQL database required by the MaaS API for key lifecycle management.

Tip

All file paths and oc apply commands in this guide are relative to the CAI-Field-Manual-MaaS repository root. Make sure you have cloned it and are working from its root directory (see Getting Started).

Important

This guide is not a replacement for the official Red Hat OpenShift AI Models as a Service documentation (3.5 | 3.4). It is a companion resource with opinionated Kustomize manifests and automation scripts to accelerate deployment.

Prerequisites

  • Phase 2 (platform configuration) is completed
  • Kuadrant, User Workload Monitoring, GatewayClass, and Gateway are configured
  • redhat-ods-applications namespace exists (created by the RHOAI operator in Phase 1)

Overview

The MaaS platform requires a PostgreSQL database before the RHOAI operator can fully enable Models-as-a-Service. Deploying PostgreSQL and creating the maas-db-config secret before enabling modelsAsService in the DataScienceCluster (Phase 4) ensures the maas-api deployment starts without crash-looping.

  1. PostgreSQL database - stores API key metadata (hashed tokens, subscription bindings, expiration, revocation state).
  2. PostgreSQL secrets - postgres-creds (DB credentials) and maas-db-config (connection URL consumed by maas-api).
Tip

If you prefer the fully automated path, see Automated Setup. To run only this phase automatically: ./scripts/setup-maas.sh --from-phase 3

Manual setup

Step 1: Create PostgreSQL secrets

These secrets cannot be stored in git. Create them imperatively:

# Generate a random password
POSTGRES_PASSWORD=$(openssl rand -base64 16 | tr -d '=+/')

# Create postgres-creds (consumed by the PostgreSQL deployment)
oc create secret generic postgres-creds \
  -n redhat-ods-applications \
  --from-literal=POSTGRES_USER=maas \
  --from-literal=POSTGRES_PASSWORD="${POSTGRES_PASSWORD}" \
  --from-literal=POSTGRES_DB=maas

# Create maas-db-config (consumed by maas-api)
oc create secret generic maas-db-config \
  -n redhat-ods-applications \
  --from-literal=DB_CONNECTION_URL="postgresql://maas:${POSTGRES_PASSWORD}@postgres:5432/maas?sslmode=disable"
Note

On RHOAI 3.5+, the maas-api deployment runs in redhat-ai-gateway-infra, and the maas-db-config secret must also exist in that namespace. The namespace is only created by the RHOAI operator in Phase 4, so pre-create it now (this is safe - the operator adopts it later) and create the mirrored secret. Use the fully-qualified service hostname postgres.redhat-ods-applications.svc:5432 in the DB_CONNECTION_URL instead of the short name postgres:5432 (which won’t resolve from a different namespace):

oc create namespace redhat-ai-gateway-infra --dry-run=client -o yaml | oc apply -f -

oc create secret generic maas-db-config \
  -n redhat-ai-gateway-infra \
  --from-literal=DB_CONNECTION_URL="postgresql://maas:${POSTGRES_PASSWORD}@postgres.redhat-ods-applications.svc:5432/maas?sslmode=disable"

The setup-maas.sh script handles this mirroring automatically.

Step 2: Deploy PostgreSQL

Apply the PostgreSQL manifests using Kustomize:

oc apply -k manifests/03-maas-platform/

Or apply individually:

oc apply -f manifests/03-maas-platform/postgres-pvc.yaml
oc apply -f manifests/03-maas-platform/postgres-service.yaml
oc apply -f manifests/03-maas-platform/postgres-deployment.yaml

Verify

PostgreSQL

# Wait for PostgreSQL pod to be ready
oc wait --for=condition=Available deployment/postgres \
  -n redhat-ods-applications --timeout=120s

# Confirm the pod is running
oc get pods -n redhat-ods-applications -l app=postgres

PostgreSQL secrets

# Verify both secrets exist
oc get secret postgres-creds -n redhat-ods-applications
oc get secret maas-db-config -n redhat-ods-applications

Gateway

oc wait --for=condition=Programmed gateway/maas-default-gateway \
  -n openshift-ingress --timeout=60s

What this creates

ResourceNamespacePurpose
PVC/postgres-dataredhat-ods-applications20Gi storage for PostgreSQL data
Service/postgresredhat-ods-applicationsClusterIP service for PostgreSQL
Deployment/postgresredhat-ods-applicationsPostgreSQL 16 instance (RHEL 9 based)
Secret/postgres-credsredhat-ods-applicationsDB user, password, database name (imperative)
Secret/maas-db-configredhat-ods-applicationsConnection URL for maas-api (imperative)

Troubleshooting

PostgreSQL pod not starting

oc describe pod -n redhat-ods-applications -l app=postgres
oc logs -n redhat-ods-applications -l app=postgres

Common causes:

  • postgres-creds secret does not exist (create it per Step 1)
  • PVC cannot be bound (check StorageClass availability)

Gateway stuck in Pending

On baremetal/OpenStack clusters without a cloud LB controller:

  • See openshift-gateway-setup/ for MetalLB configuration
  • On cloud clusters, the LB provisions automatically

Appendix

Directory Structure

manifests/03-maas-platform/
  kustomization.yaml             # Aggregates PostgreSQL resources
  postgres-deployment.yaml       # PostgreSQL 16 Deployment
  postgres-pvc.yaml              # 20Gi PersistentVolumeClaim
  postgres-service.yaml          # ClusterIP Service
  openshift-gateway-setup/
    gateway.yaml.tmpl            # Gateway template (envsubst)
    route.yaml.tmpl              # Passthrough Route (non-cloud)
    metallb-config.yaml          # IPAddressPool + L2Advertisement
    cleanup.yaml                 # Cleanup resources
    kustomization.yaml

References

Next step

Proceed to Phase 4: RHOAI Configuration.

4 - Phase 4: RHOAI Configuration

Configures the RHOAI operator instances to enable Models-as-a-Service so the maas-api deployment starts healthy immediately.

Configure the RHOAI operator instances to enable Models-as-a-Service. Because the PostgreSQL database and maas-db-config secret already exist (Phase 3), the maas-api deployment will start healthy immediately.

Tip

All file paths and oc apply commands in this guide are relative to the CAI-Field-Manual-MaaS repository root. Make sure you have cloned it and are working from its root directory (see Getting Started).

Important

This guide is not a replacement for the official Red Hat OpenShift AI Models as a Service documentation (3.5 | 3.4). It is a companion resource with opinionated Kustomize manifests and automation scripts to accelerate deployment.

Prerequisites

  • RHOAI operator is installed and CSV is in Succeeded state
  • Phase 3 (MaaS platform) is completed — PostgreSQL is running and maas-db-config secret exists

Verify the operator is ready before proceeding:

oc get csv -n redhat-ods-operator | grep rhods-operator

Expected output (version varies):

NAME                     DISPLAY                 VERSION   REPLACES               PHASE
rhods-operator.3.5.0     Red Hat OpenShift AI    3.5.0     rhods-operator.3.4.3   Succeeded

Apply

On a fresh install, apply in two stages. The OdhDashboardConfig CRD does not exist until the RHOAI operator has reconciled the DataScienceCluster, so applying the full kustomization in one shot will fail the first time.

Note

The RHOAI operator auto-creates a default-dsci and odh-dashboard-config during installation. When you oc apply over these auto-created resources, you will see a warning: “resource is missing the kubectl.kubernetes.io/last-applied-configuration annotation”. This is harmless — the annotation is patched automatically and subsequent applies will be clean.

# Stage 1: DSC and DSCI (triggers operator reconciliation)
oc apply -f manifests/04-rhoai-config/dscinitialization.yaml

Wait until the DSCI is created (this step must complete before creating the DSC):

oc wait --for=jsonpath='{.status.phase}'=Ready \
  dscinitialization/default-dsci --timeout=600s

Create the Data Science Cluster:

RHAIE Version: 3.5, 3.6

oc apply -f manifests/04-rhoai-config/datasciencecluster.yaml

Enables MaaS via aigateway.modelsAsAService: Managed, the modularized path for RHOAI 3.5+.

RHAIE Version: 3.4

oc apply -f manifests/04-rhoai-config/datasciencecluster-34.yaml
Warning

The kserve.modelsAsService DSC path is deprecated in RHOAI 3.5 and replaced by aigateway.modelsAsAService. Without aigateway set to Managed, regular (non-admin) users will not see the AI asset endpoints page in the Dashboard. If upgrading from 3.4, see Platform Upgrade (3.4 -> 3.5).

Apply the GPU HardwareProfile so RHOAI properly schedules GPU workloads:

oc apply -f manifests/04-rhoai-config/hardwareprofile.yaml
Note

Without this HardwareProfile, GPU model deployments may hang. The node will show nvidia.com/gpu: 0 requested even when the GPU is physically present, because RHOAI needs a HardwareProfile to map GPU resources to workloads.

The DataScienceCluster reconciles multiple components. Wait for KServe and the Model Controller (MaaS) to reach Ready:

oc wait --for=jsonpath='{.status.phase}'=Ready \
  datasciencecluster/default-dsc --timeout=600s

With the Data Science Cluster created we can now apply the dashboard configuration:

# Stage 2: Dashboard config (requires OdhDashboardConfig CRD to exist)
oc apply -f manifests/04-rhoai-config/odh-dashboard-config.yaml
Note

On subsequent runs (CRDs already exist), oc apply -k manifests/04-rhoai-config/ works in one shot. The kustomization includes the 3.5+ DSC by default - for RHOAI 3.4, apply the individual files as shown above.

Verify

Check MaaS CRDs are installed

The operator installs MaaS CRDs when Models-as-a-Service is set to Managed:

oc get crd | grep maas.opendatahub.io

Expected CRDs (RHOAI 3.4):

  • externalmodels.maas.opendatahub.io
  • maasauthpolicies.maas.opendatahub.io
  • maasmodelrefs.maas.opendatahub.io
  • maassubscriptions.maas.opendatahub.io
  • tenants.maas.opendatahub.io

RHOAI 3.5+ adds three additional CRDs:

  • aitenants.maas.opendatahub.io
  • configs.maas.opendatahub.io
  • maastenantconfigs.maas.opendatahub.io

Check maas-api deployment

Since PostgreSQL and the maas-db-config secret were created in Phase 3, the maas-api deployment should start healthy:

RHAIE Version: 3.5, 3.6

oc rollout status deployment/maas-api -n redhat-ai-gateway-infra --timeout=120s

In RHOAI 3.5+, maas-api runs in the redhat-ai-gateway-infra namespace.

RHAIE Version: 3.4

oc rollout status deployment/maas-api -n redhat-ods-applications --timeout=120s
Tip

The maas-api deployment may take 30-60 seconds to appear after the DSC is applied. If it is not found, wait and retry.

Check Tenant / Config CR

RHAIE Version: 3.5, 3.6

In RHOAI 3.5+, the maas-controller auto-creates a cluster-scoped Config CR (replacing the namespaced Tenant CR from 3.4):

oc get configs.maas.opendatahub.io

RHAIE Version: 3.4

The maas-controller auto-creates a default-tenant CR in the models-as-a-service namespace:

oc get tenant default-tenant -n models-as-a-service
Note

The default-tenant CR may show either Ready=True (reason Reconciled) or Ready=False (reason DeploymentsNotReady) at this stage. Both are normal - if it shows Ready=False, it will become Ready=True after a model is deployed in Phase 5.

MaaS health endpoint

CLUSTER_DOMAIN=$(oc get ingresses.config.openshift.io cluster -o jsonpath='{.spec.domain}')
curl -sk "https://maas.${CLUSTER_DOMAIN}/maas-api/health"
# Expected: {"status":"healthy"}

Check OdhDashboardConfig flags

oc get odhdashboardconfig odh-dashboard-config -n redhat-ods-applications \
  -o jsonpath='{.spec.dashboardConfig}' | jq .

Verify the following flags are set:

  • modelAsService: true - enables the Models as a Service tab
  • genAiStudio: true - enables the GenAI Studio tab (requires ogx Managed on 3.5+ or llamastackoperator Managed on 3.4)
  • observabilityDashboard: true - enables the Observability tab (requires COO + monitoring configured)
  • externalModels: true - enables the External models tab under AI hub > Models > Deployments in the Dashboard, where administrators can view deployed external models, their providers, and connection details
Important

The External models tab is a Technology Preview feature in RHOAI 3.5. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. The external models functionality itself (CRDs, CLI, gateway routing) is fully supported (GA). For CLI-based external model management, see Phase 8: External Models.

Note

The maasAuthPolicies flag was removed from the OdhDashboardConfig CRD in RHOAI 3.5. Do not include it in the manifest - the admission webhook will reject it.

What this creates

ResourcePurpose
DSCInitialization/default-dsciConfigures applications namespace, monitoring, and trusted CA bundle
DataScienceCluster/default-dscEnables all RHOAI components including KServe with modelsAsService Managed
OdhDashboardConfig/odh-dashboard-configEnables MaaS, GenAI Studio, and Observability UI tabs
HardwareProfile/gpuRegisters GPU resources with RHOAI for proper GPU scheduling

Troubleshooting

If components do not become ready:

# Inspect DSC conditions and events
oc describe datasciencecluster default-dsc

# Check operator logs
oc logs -n redhat-ods-operator deployment/rhods-operator --tail=100

# Check pods in the applications namespace
oc get pods -n redhat-ods-applications

Appendix

Directory Structure

manifests/04-rhoai-config/
  kustomization.yaml             # Aggregates all RHOAI config resources
  dscinitialization.yaml         # DSCInitialization CR
  datasciencecluster.yaml        # DataScienceCluster CR (RHOAI 3.5+, aigateway path)
  datasciencecluster-34.yaml     # DataScienceCluster CR (RHOAI 3.4, kserve path)
  odh-dashboard-config.yaml      # OdhDashboardConfig CR
  hardwareprofile.yaml           # GPU HardwareProfile for proper GPU scheduling

References

Next step

Proceed to Phase 5: Model Deployment.