Skip to content

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

Return to the regular view of this page.

CAI Field Manual for MaaS

Deploy RHOAI 3.4/3.5 Models-as-a-Service on OpenShift 4.19+ — Kustomize manifests with status gates and a single automation script.

Guide to deploy Red Hat OpenShift AI 3.4 / 3.5 Models as a Service on OpenShift.

  • Kustomize manifests with status gates between every phase
  • Single automation script for end-to-end deployment
  • CPU-only simulator model for validation without GPUs

Requires OpenShift 4.19+ with cluster-admin access.

Note

OpenShift 5: MaaS runs on OpenShift 5.0, but two operators need a different catalog and channel than the manifests assume. See Running MaaS on OpenShift 5.

Note

RHCL 1.5: MaaS on RHOAI 3.5.2 was validated with RHCL 1.5.0 and the GA MCP Gateway on the same cluster. See Running MaaS with RHCL 1.5 for the fixes it needs.

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.

Note

Open the Install & Configuration Visualizer (opens in new tab) 4 Flows | 9 Phases | Governance Pairing | Tiers & Priority | 30+ Components An animated, click-to-inspect walkthrough of the full install sequence, the most common ordering mistake, and how MaaSModelRef/MaaSAuthPolicy/MaaSSubscription pair up. Handy for explaining the moving parts to a customer before you touch a cluster.

Getting Started

Clone the repository and work from its root directory. All commands and file paths in this guide are relative to the cloned repo.

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

You also need:

  • OpenShift 4.19+ cluster with oc CLI authenticated as cluster-admin
  • envsubst, curl, jq available on PATH

Phases

Each phase has step-by-step instructions, status gates, and troubleshooting.

Disconnected Setup

PhaseDescriptionTime
0. Disconnected Setup (air-gapped only)Mirror MaaS operators and images, ITMS for modelcars, WASM shim patch, GPU driver setup30-60 min

Installation Guide

PhaseDescriptionTime
1. PrerequisitesOperator subscriptions (RHOAI, RHCL, cert-manager, LWS)5-10 min
2. Platform ConfigurationKuadrant/Authorino, User Workload Monitoring, GatewayClass, Gateway5-10 min
3. MaaS PlatformPostgreSQL database and secrets5 min
4. RHOAI ConfigurationDataScienceCluster, DSCInitialization, Dashboard settings5-10 min

Model Deployment & Verification

PhaseDescriptionTime
5. Model DeploymentDeploy and register LLM models with MaaS1-15 min
6. VerificationEnd-to-end checks (API keys, inference, rate limiting)5 min

Observability

PhaseDescriptionTime
7. Observability (optional)COO subscription + Gateway telemetry dashboards5 min

External Models

PhaseDescriptionTime
8. External Models (optional)Expose third-party LLM APIs (OpenAI, Bedrock, Gemini) through the MaaS gateway5-10 min

External OIDC Authentication

PhaseDescriptionTime
9. External OIDC Authentication (optional)Integrate MaaS with Keycloak or other OIDC providers for corporate authentication10-15 min

Automated Setup

For end-to-end deployment using a single script, see the Automated Setup page.

Available Models

ModelGPU RequiredVRAMUse Case
simulatorNoNoneTesting/demo (CPU-only)
granite-tiny-gpuYes~8 GiBSmall GPU (L4, L40)
gemmaYes~12 GiBMid GPU (L4, L40, L40S)
gpt-oss-20bYes~16 GiBLarge model, runs quantized (L4 24 GB, L40S, A100)
qwen3-06bNoNone (~16 GiB RAM)Real CPU inference (no GPU needed)

Documentation

1 - Automated Setup

setup-maas.sh is a single script that handles the entire MaaS lifecycle, from operator installation through model deployment and verification.

setup-maas.sh is a single script that handles the entire MaaS lifecycle, from operator installation through model deployment and verification. Each phase is idempotent; re-running skips what’s already done.

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.

Clone and Run

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

RHAIE Version: 3.5, 3.6

./scripts/setup-maas.sh

RHAIE Version: 3.4

./scripts/setup-maas.sh --rhoai-version 3.4

This runs Phases 0-6 automatically. The script detects what’s already installed and skips completed phases.

Arguments

OptionDescriptionDefault
--model <name>Model to deploy: simulator (CPU), granite-tiny-gpu (small GPU), gemma (mid GPU), gpt-oss-20b (large GPU), qwen3-06b (real CPU, no GPU), auto (auto-detect by GPU VRAM)auto
--rhoai-version <v>RHOAI version: 3.4 or 3.5. Auto-detects if already installed.3.5
--from-phase <N>Start from phase N (0-8), skipping earlier phases0
--skip-modelsSkip Phase 5 (model deployment)
--skip-verifySkip Phase 6 (verification)
--with-observabilityAlso run Phase 7 (COO + Gateway telemetry)
--with-external-modelsAlso run Phase 8 (ExternalModel deployment via OpenAI, Gemini, or Bedrock)
--dry-runPreview what would be applied without making changes

Phases

PhaseWhat it doesTime
0Preflight - detect cluster state, decide which phases to runinstant
1Operators - oc apply -k manifests/01-prerequisites/operators/, wait for CSVs2-5 min
2Platform - Kuadrant, UWM, GatewayClass, envsubst Gateway2-5 min
3MaaS Platform - PostgreSQL secrets/deployment2-3 min
4RHOAI - DSC with modelsAsService: Managed, Dashboard flags, wait for maas-api3-5 min
5Model - auto-detect GPU, apply Kustomize, wait for Ready0.5-15 min
6Verify - 6-phase E2E (API, auth, rate limits, cleanup)3-5 min
7Observability - COO subscription + Gateway TelemetryPolicy2-3 min
8External Models - ExternalModel CRs + MaaS governance (only with --with-external-models)5-10 min

Common Usage Patterns

For a fresh cluster with no MaaS components:

./scripts/setup-maas.sh

With observability

./scripts/setup-maas.sh --with-observability

Resume from a specific phase

If a previous run failed at Phase 4:

./scripts/setup-maas.sh --from-phase 4

Models only

If the platform is already installed and you just want to deploy a model:

./scripts/setup-maas.sh --from-phase 5

Or use the standalone model script for more control:

./scripts/deploy-model.sh --model simulator

With external OIDC authentication

After the base installation, add Keycloak-based OIDC authentication so users can access MaaS with their corporate credentials instead of OpenShift tokens:

# Deploy Keycloak + configure MaaS for OIDC
./manifests/09-external-oidc/setup-keycloak.sh

# Verify the OIDC flow (tokens, API keys, inference, group access)
./manifests/09-external-oidc/test-external-oidc.sh

See Phase 9: External OIDC Authentication for the full manual walkthrough and Bring Your Own IdP instructions.

Verify only

./scripts/setup-maas.sh --from-phase 6

Or directly:

./manifests/06-verification/verify.sh

Convenience Scripts

These wrap individual phases for standalone use:

ScriptWhat it does
scripts/deploy-model.shPhase 5 only - deploy a model with GPU auto-detection
scripts/test-inference.shSend inference requests to a deployed model endpoint
scripts/verify-maas.shPhase 6 only - wrapper for manifests/06-verification/verify.sh
manifests/09-external-oidc/setup-keycloak.shPhase 9 - deploy Keycloak + configure OIDC on the MaaS tenant (--cleanup to revert)
manifests/09-external-oidc/test-external-oidc.shPhase 9 verification - 6-test OIDC flow (tokens, API keys, inference, group access)

State Detection

Phase 0 inspects the cluster and reports what’s already installed. The script uses this to skip completed phases:

  • Operators installed? Skip Phase 1.
  • Kuadrant + UWM + Gateway ready? Skip Phase 2.
  • PostgreSQL running? Skip Phase 3.
  • DSC with modelsAsService: Managed + maas-api running? Skip Phase 4.
  • Models deployed in llm namespace? Skip Phase 5.

Override with --from-phase N to force re-running from a specific phase.

AI-Assisted Installation

If you use an AI coding tool (Claude Code, Open Code, Cursor, Roo Code), the /install-maas skill wraps the same script with an interactive, AI-assisted workflow. Clone the repo, open it in your tool, and run:

/install-maas

Or with arguments:

/install-maas --model simulator --with-observability

See AI-Assisted Installation for details.

Final Report

The script ends with a summary: RHOAI version, MaaS API URL, Gateway status, health check, deployed models, and suggested next steps.

2 - Phase 0: Disconnected Setup

Additional steps to deploy Red Hat OpenShift AI Models as a Service on an air-gapped (disconnected) OpenShift cluster.

Additional steps to deploy Red Hat OpenShift AI Models as a Service on an air-gapped (disconnected) OpenShift cluster.

Important

This phase is only needed for disconnected environments where the cluster has no internet access. For connected clusters, skip directly to Phase 1.

Overview

A disconnected OpenShift cluster pulls all container images from a private mirror registry instead of the public registries. Before deploying MaaS, the operator catalogs and container images must be mirrored to that registry.

This guide assumes:

  • OpenShift 4.20+ is already installed in disconnected mode
  • Red Hat OpenShift AI 3.4 / 3.5 operators are installed (rhods-operator, cert-manager, NFD, GPU operator)
  • A mirror registry is running and the cluster trusts its CA
  • ImageDigestMirrorSet (IDMS) and CatalogSources from the RHOAI mirror are already applied

The MaaS guide adds 10 operators and several container images that are NOT part of the base RHOAI mirror set. This phase mirrors those extra components.

Tip

Currently, oc-mirror mirrors all images referenced in the RHOAI operator bundle regardless of which DSC components you enable. There is an initiative (RHOAIENG-75890 / OCPSTRAT-3350) to support selective mirroring - so you can mirror only the images for the components you need (e.g. Dashboard + MaaS). Until that lands, this guide mirrors the full set.

MaaS operators to mirror

OperatorPackage NamePurpose
Red Hat Connectivity Linkrhcl-operatorAPI gateway, auth (Authorino), rate limiting (Limitador)
Authorino Operatorauthorino-operatorAuth engine (RHCL dependency, required >= 1.4.2)
DNS Operatordns-operatorDNS policy (RHCL dependency, required >= 1.4.1)
Limitador Operatorlimitador-operatorRate limiting engine (RHCL dependency, required >= 1.4.1)
Leader Worker Setleader-worker-setDistributed inference coordination
MetalLBmetallb-operatorLoadBalancer service for the MaaS gateway
Cluster Observability Operatorcluster-observability-operatorMonitoring stack
OpenTelemetryopentelemetry-productDistributed tracing
Tempotempo-productTrace storage backend
Loki Operatorloki-operatorLog storage for the Phase 7 usage dashboards

Additional images to mirror

Important

The vLLM CUDA runtime is published under registry.redhat.io/rhaii/ (double ‘i’, no trailing ’s’). Some upstream references incorrectly use rhaiis/ - this will fail on disconnected clusters because the IDMS only covers rhaii/. The model manifests in this guide already use the correct rhaii/ path with a pinned digest. See RHOAIENG-82814.

Images not discoverable through operator bundles:

ImagePurpose
registry.redhat.io/rhel9/postgresql-16@sha256:3943... (pinned digest)MaaS PostgreSQL database
registry.redhat.io/rhaii/vllm-cuda-rhel9@sha256:5800... (pinned digest)vLLM CUDA runtime for GPU models
registry.access.redhat.com/rhcl-1/wasm-shim-rhel9@sha256:... (pinned digest)Kuadrant WASM shim for gateway auth and rate limiting (see wasm-shim)
ghcr.io/llm-d/llm-d-inference-sim:v0.7.1Simulator runtime (CPU-only model)
quay.io/rh-aiservices-bu/minio:RELEASE.2025-09-07T16-13-09ZMinIO S3 backend for the LokiStack (usage dashboards)
quay.io/rh-aiservices-bu/mc:latestMinIO client, creates the loki bucket (floating tag, pin it for a reproducible mirror)
registry.redhat.io/rhai/modelcar-granite-4-0-h-tiny-fp8-dynamic:3.0Granite 4.0-h-tiny model weights
registry.redhat.io/rhelai1/modelcar-gpt-oss-20b:1.5GPT-oss-20b model weights
registry.redhat.io/rhelai1/modelcar-gemma-2-9b-it-fp8:1.5Gemma 2 9B IT FP8 model weights
registry.redhat.io/openshift-service-mesh/istio-pilot-rhel9@sha256:... (pinned digest)Istiod control plane (OpenShift >= 4.20.32 only, see istiod-images)
registry.redhat.io/openshift-service-mesh/proxyv2-rhel9@sha256:... (pinned digest)Envoy proxy / gateway data plane (OpenShift >= 4.20.32 only, see istiod-images)
Important

The WASM shim image lives on registry.access.redhat.com (not registry.redhat.io). This is a different registry. The WASM shim digest changes with each RHCL operator version - see wasm-shim for how to discover it.

Mirroring workflow

Step 1: Mirror the MaaS content

An ImageSetConfiguration is provided at manifests/00-disconnected/imageset-config-maas.yaml. It includes all the operators (Red Hat OpenShift AI base + MaaS) and the additional images listed above.

Before running oc-mirror, discover the WASM shim digest for your RHCL version and update the ImageSetConfiguration:

# If RHCL is already installed on a connected cluster, get the digest:
oc get csv -n openshift-operators \
  -l operators.coreos.com/rhcl-operator.openshift-operators \
  -o jsonpath='{range .items[0].spec.install.spec.deployments[0].spec.template.spec.containers[0].env[*]}{.name}={.value}{"\n"}{end}' \
  | grep RELATED_IMAGE_WASMSHIM

# Replace the placeholder in imageset-config-maas.yaml with the digest

On OpenShift 4.20.32 and later, the openshift-ingress operator embeds the Istio sail library instead of installing a standalone OSSM operator. The istiod and proxyv2 images it pulls are NOT in the OCP release payload and NOT in any operator catalog. They must be mirrored explicitly.

Note

On OpenShift < 4.20.32, the servicemeshoperator3 catalog entry covers these images and you can skip this block.

To discover the digests, you need a connected reference cluster running the same OpenShift version with a Gateway already created (creating a Gateway triggers istiod provisioning):

# istiod (control plane)
oc get deployment -n openshift-ingress -l app=istiod \
  -o jsonpath='{.items[0].spec.template.spec.containers[0].image}'

# proxyv2 (data plane / gateway proxy)
oc get deployment -n openshift-ingress -l istio.io/gateway-name \
  -o jsonpath='{.items[0].spec.template.spec.containers[0].image}'

Replace <ISTIOD_DIGEST> and <PROXYV2_DIGEST> in imageset-config-maas.yaml with the digests from the commands above.

Tip

If you do not have a connected reference cluster with a Gateway, check the OpenShift release notes for your z-stream. The istiod and proxyv2 images are listed under the Service Mesh / Gateway API components.

On a connected system (jump box) with oc-mirror v2 and a valid pull secret:

# Set the staging directory (needs ~100 GB free for the MaaS operators)
export WORKDIR=/mnt/mirror/maas-mirror

# Run oc-mirror to disk
oc-mirror --v2 \
  --config manifests/00-disconnected/imageset-config-maas.yaml \
  file://${WORKDIR}
Tip

If the RHOAI operators are already mirrored, oc-mirror only downloads the 6 new MaaS operators and the additional images. The run is incremental.

Step 2: Transfer to the disconnected side

Transfer the archive to the disconnected host. Use rsync for resumable transfers:

rsync -avP --append ${WORKDIR}/ user@highside:/mnt/mirror/maas-mirror/

Step 3: Push to the mirror registry

On the disconnected host, push the content into the mirror registry:

oc-mirror --v2 \
  --from /mnt/mirror/maas-mirror \
  docker://<mirror-registry>:<port>/<namespace>

This produces IDMS/ITMS and CatalogSource files in working-dir/cluster-resources/.

Step 4: Apply cluster resources

Apply the generated resources to the cluster:

# Apply the IDMS (triggers a MachineConfig rollout - nodes will reboot)
oc apply -f /mnt/mirror/maas-mirror/working-dir/cluster-resources/idms-oc-mirror.yaml

# Apply the CatalogSource
oc apply -f /mnt/mirror/maas-mirror/working-dir/cluster-resources/cs-*.yaml

If the cluster already has a CatalogSource alias named redhat-operators, update it to point to the new catalog index image (which now includes the MaaS operators):

# Get the new catalog image from the generated CatalogSource
NEW_IMAGE=$(grep 'image:' /mnt/mirror/maas-mirror/working-dir/cluster-resources/cs-redhat-operator-index-*.yaml | awk '{print $2}' | head -1)

# Update the alias
oc patch catalogsource redhat-operators -n openshift-marketplace \
  --type=merge -p "{\"spec\":{\"image\":\"${NEW_IMAGE}\"}}"

Step 5: Create ITMS for modelcar images

oc-mirror creates ImageDigestMirrorSet (IDMS) entries for images referenced by digest, but OCI modelcar images use tags (e.g. :3.0, :1.5). CRI-O needs an ImageTagMirrorSet (ITMS) to redirect tag-based pulls to the mirror registry.

A ready-to-use ITMS manifest is provided at manifests/00-disconnected/itms-maas-modelcars.yaml. It covers rhai/, rhelai1/, registry.access.redhat.com/rhcl-1/, and ghcr.io/llm-d namespaces.

Check if ITMS entries already exist:

oc get imagetagmirrorset -o yaml | grep -E 'registry.redhat.io/rhai|registry.redhat.io/rhelai1'

If no ITMS entries exist, apply the manifest (replace the placeholder with your mirror address):

sed 's|MIRROR_REGISTRY:PORT/NAMESPACE|<your-registry>:<port>/<ns>|g' \
  manifests/00-disconnected/itms-maas-modelcars.yaml | oc apply -f -

Replace <your-registry>:<port>/<ns> with your mirror registry address (the same one used in Step 3).

Important

Applying ITMS triggers a MachineConfig update. Worker nodes will reboot in a rolling fashion. Wait for oc get mcp worker to show UPDATED=True before continuing.

Tip

Batch all ITMS/IDMS changes into a single oc apply. Do not add them incrementally - each apply triggers a separate MachineConfig rollout with node reboots.

Step 6: Patch RHCL for WASM shim

The Kuadrant/RHCL WASM shim is loaded at runtime by the Envoy gateway pod using the OCI protocol. This fetch does not go through CRI-O and does not respect IDMS/ITMS/ICSP. On a disconnected cluster, the gateway tries to reach registry.access.redhat.com directly. When it fails, Kuadrant applies a deny-all RBAC filter and every request returns “RBAC: access denied”.

The fix is to set the RELATED_IMAGE_WASMSHIM environment variable on the RHCL operator subscription, which tells the operator to serve the shim from the mirrored image via its internal cluster service instead of having the gateway fetch it from the public registry.

First, find the WASM shim digest from the installed RHCL CSV:

WASM_IMAGE=$(oc get csv -n openshift-operators \
  -l operators.coreos.com/rhcl-operator.openshift-operators \
  -o jsonpath='{range .items[0].spec.install.spec.deployments[0].spec.template.spec.containers[0].env[*]}{.name}={.value}{"\n"}{end}' \
  | grep RELATED_IMAGE_WASMSHIM | cut -d= -f2)
echo "WASM shim image: $WASM_IMAGE"

Build the mirrored image reference (replace the source registry with your mirror):

# Extract the digest from the image reference
WASM_DIGEST=$(echo "$WASM_IMAGE" | grep -o 'sha256:.*')

# Build the mirrored reference
MIRROR_REGISTRY="<your-registry>:<port>/<ns>"
WASM_MIRROR="${MIRROR_REGISTRY}/rhcl-1/wasm-shim-rhel9@${WASM_DIGEST}"
echo "Mirrored WASM shim: $WASM_MIRROR"

Patch the RHCL subscription:

oc patch subscription rhcl-operator -n openshift-operators --type=merge -p "{
  \"spec\": {
    \"config\": {
      \"env\": [{
        \"name\": \"RELATED_IMAGE_WASMSHIM\",
        \"value\": \"${WASM_MIRROR}\"
      }]
    }
  }
}"

Wait for the RHCL operator pod to restart with the new env var:

oc get pods -n openshift-operators -l app.kubernetes.io/name=kuadrant-operator -w

After the operator restarts, delete the gateway pod so it picks up the new WASM shim location:

oc delete pod -n openshift-ingress -l istio.io/gateway-name=maas-default-gateway
Note

If the mirror registry uses a self-signed CA, the gateway pod may fail with a TLS certificate error when fetching the WASM shim. Ensure the mirror registry CA is in the cluster’s proxy/trust bundle (oc get proxy/cluster -o jsonpath='{.spec.trustedCA.name}').

Verification

Confirm all MaaS operators are available:

for pkg in rhcl-operator authorino-operator dns-operator limitador-operator \
           leader-worker-set metallb-operator \
           cluster-observability-operator opentelemetry-product tempo-product \
           loki-operator; do
  echo -n "  $pkg: "
  oc get packagemanifest "$pkg" -n openshift-marketplace \
    -o jsonpath='{.status.catalogSource}' 2>/dev/null && echo || echo "NOT FOUND"
done

All 10 should resolve to a CatalogSource. If any show NOT FOUND, the mirror set is incomplete - check the oc-mirror output for errors.

Verify the gateway pod has no WASM errors:

oc logs -n openshift-ingress -l istio.io/gateway-name=maas-default-gateway --tail=20 | grep -i wasm

If you see cannot fetch Wasm module or applying deny RBAC filter, the WASM shim patch from wasm-shim was not applied or the image is not in the mirror registry.

CPU MachineSet (optional)

If the cluster has no dedicated CPU worker nodes and you plan to deploy the CPU-only models (simulator, qwen3-06b), create a CPU MachineSet.

A template is provided at manifests/00-disconnected/cpu-machineset.yaml. It is the same shape as the GPU template but sets no taint - the GPU model manifests tolerate nvidia.com/gpu, while the CPU model manifests carry no tolerations, so a taint here would leave their pods Pending.

export INFRA_ID=$(oc get -o jsonpath='{.status.infrastructureName}' infrastructure cluster)
export AMI=$(oc get machineset -n openshift-machine-api -o jsonpath='{.items[0].spec.template.spec.providerSpec.value.ami.id}')
export SUBNET_NAME=$(oc get machineset -n openshift-machine-api -o jsonpath='{.items[0].spec.template.spec.providerSpec.value.subnet.filters[0].values[0]}')
export REGION=$(oc get machineset -n openshift-machine-api -o jsonpath='{.items[0].spec.template.spec.providerSpec.value.placement.region}')
export AZ=$(oc get machineset -n openshift-machine-api -o jsonpath='{.items[0].spec.template.spec.providerSpec.value.placement.availabilityZone}')
export INSTANCE_TYPE=m6i.4xlarge
export MS_NAME=${INFRA_ID}-cpu-${AZ}
export IAM_PROFILE=${INFRA_ID}-worker-profile
export SG=${INFRA_ID}-node

envsubst < manifests/00-disconnected/cpu-machineset.yaml | oc apply -f -
Note

On IPI-installed AWS clusters the worker MachineSet references its subnet by tag filter, not by ID, which is why SUBNET_NAME reads the filter value. If oc get machineset ... subnet.filters[0].values[0] returns nothing, your cluster pins an explicit subnet ID instead - edit the template’s subnet block to use id: <subnet-id>.

The node comes up labelled node-role.kubernetes.io/cpu-inference. m6i.2xlarge (8 vCPU / 32 GiB) is the minimum for qwen3-06b; m6i.4xlarge (16 vCPU / 64 GiB) leaves room for platform pods as well.

GPU setup (optional)

GPU MachineSet

If the cluster has no GPU nodes and you plan to deploy GPU models (Gemma, Granite, GPT-oss), create a GPU MachineSet.

A template is provided at manifests/00-disconnected/gpu-machineset.yaml. Before applying, discover the cluster-specific values:

export INFRA_ID=$(oc get -o jsonpath='{.status.infrastructureName}' infrastructure cluster)
export AMI=$(oc get machineset -n openshift-machine-api -o jsonpath='{.items[0].spec.template.spec.providerSpec.value.ami.id}')
export SUBNET_NAME=$(oc get machineset -n openshift-machine-api -o jsonpath='{.items[0].spec.template.spec.providerSpec.value.subnet.filters[0].values[0]}')
export REGION=$(oc get machineset -n openshift-machine-api -o jsonpath='{.items[0].spec.template.spec.providerSpec.value.placement.region}')
export AZ=$(oc get machineset -n openshift-machine-api -o jsonpath='{.items[0].spec.template.spec.providerSpec.value.placement.availabilityZone}')
export INSTANCE_TYPE=g6.2xlarge
export MS_NAME=${INFRA_ID}-gpu-${AZ}
export IAM_PROFILE=${INFRA_ID}-worker-profile
export SG=${INFRA_ID}-node

envsubst < manifests/00-disconnected/gpu-machineset.yaml | oc apply -f -
Note

On IPI-installed AWS clusters the worker MachineSet references its subnet by tag filter, not by ID, which is why SUBNET_NAME reads the filter value. If oc get machineset ... subnet.filters[0].values[0] returns nothing, your cluster pins an explicit subnet ID instead - edit the template’s subnet block to use id: <subnet-id>.

Wait for the GPU node to be Ready:

oc get machines -n openshift-machine-api -w
# Once Running, check for GPU labels:
oc get nodes -l nvidia.com/gpu.present=true

The default instance type is g6.2xlarge (1x L4, 24 GB VRAM) - enough for Gemma 2 9B FP8, Granite tiny, and gpt-oss-20b (quantized). Edit the template to use g6e.2xlarge (1x L40S, 48 GB VRAM) for more VRAM headroom (longer context, larger models).

Important

Do not use g5 instances (A10G GPUs) - vLLM FP8 requires compute capability >= 80 (Ampere or newer). A10G GPUs are not supported. Use g6 (L4) or g6e (L40S) instances instead.

GPU driver compilation on disconnected

The NVIDIA GPU operator compiles the NVIDIA kernel module at runtime, against the exact kernel running on the GPU node. On OpenShift it does this one of two ways, and which one you get decides whether a disconnected cluster needs anything extra:

  • With the Driver Toolkit (DTK) - the driver pod gets a second container built from the Driver Toolkit image, which ships in the OpenShift release payload and is therefore already mirrored. That image contains the matching kernel sources at /usr/src/kernels/<kernel-version>, so the build downloads nothing. The operator symlinks dnf to /usr/bin/true inside the pod, which makes the dnf install kernel-* calls in the build script inert.
  • Without DTK - the driver container builds alone and its dnf is real. It is UBI-based, and the standard UBI repos do not ship kernel packages, so the build script enables rhocp-<ocp-version>-for-rhel-9-x86_64-rpms and rhel-9-for-x86_64-baseos-eus-rpms and installs kernel-headers, kernel-devel and kernel (with vmlinuz) from them. Both are entitled Red Hat CDN repos and are unreachable from a disconnected cluster. This is the only case that needs a local repo.

Both paths run the same build script and ask for the same packages. The only thing that decides between them is whether the operator can pair the driver with a DTK image whose kernel matches the node. Check that first - on a healthy disconnected cluster it matches and there is nothing to do.

Step 1: Confirm the node and DTK kernels match

# The kernel actually running on the GPU node.
# Do NOT use `uname -r` - that reports the kernel of whatever host you are
# typing on (usually a RHEL bastion), not the RHCOS node.
oc get nodes -l nvidia.com/gpu.present=true \
  -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.status.nodeInfo.kernelVersion}{"\n"}{end}'

# The kernel baked into the Driver Toolkit for the cluster's release payload
DTK_IMAGE=$(oc adm release info --image-for=driver-toolkit)
podman run --rm --entrypoint cat "$DTK_IMAGE" /etc/driver-toolkit-release.json

The two kernel versions must be identical. If no GPU node exists yet, read the kernel from any worker instead - a GPU MachineSet cloned from the worker set boots the same RHCOS.

Important

Nodes lag the release payload while a MachineConfig rollout is in progress, which breaks the match. Confirm oc get mcp shows every pool UPDATED=True, not paused and not degraded, before trusting the comparison - and check after any IDMS/ITMS reboot cycle, not before.

Tip

Create the GPU MachineSet by cloning the worker MachineSet and changing only the name, the machineset labels, replicas and instanceType. Leaving providerSpec.value.ami.id untouched makes the kernel match structural instead of coincidental.

Also confirm the DTK image is actually in the mirror. oc image info does not apply the cluster’s IDMS, so check the mirror path directly - IDMS maps quay.io/openshift-release-dev/ocp-v4.0-art-dev to <mirror-registry>/openshift/release:

oc get imagedigestmirrorset -o jsonpath='{range .items[*]}{range .spec.imageDigestMirrors[*]}{.source}{" -> "}{.mirrors[0]}{"\n"}{end}{end}' \
  | grep art-dev

podman manifest inspect <mirror-registry>/openshift/release@${DTK_IMAGE#*@} >/dev/null \
  && echo PRESENT || echo MISSING

If the kernels match and the DTK image is present, go to Step 2 - no local repo is required. If they do not match, fix the drift (converge the MachineConfigPool, or rebuild the GPU MachineSet from the current worker AMI). Do not jump to the fallback: it extracts from the DTK image, so a mismatched DTK yields the wrong kernel-devel and the module still will not load.

Step 2: Confirm the driver built

# Two containers means the DTK route engaged. One means it did not.
oc get pods -n nvidia-gpu-operator -l app=nvidia-driver-daemonset \
  -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{range .spec.containers[*]}{.name}{" "}{end}{"\n"}{end}'

# The module is loaded and the GPU is visible
POD=$(oc get pods -n nvidia-gpu-operator -l app=nvidia-driver-daemonset -o name | head -1)
oc exec -n nvidia-gpu-operator "$POD" -c nvidia-driver-ctr -- nvidia-smi

# Capacity exposed to the scheduler
oc get nodes -l nvidia.com/gpu.present=true \
  -o jsonpath='{.items[*].status.capacity.nvidia\.com/gpu}'

A healthy DTK build shows nvidia-driver-ctr and openshift-driver-toolkit-ctr, and the DaemonSet is named for the RHCOS version (for example nvidia-driver-daemonset-9.6.20260715-0). At this point driver.repoConfig.configMapName in the ClusterPolicy should still be empty - that is expected and correct.

Note

If the driver pod never appears at all, the GPU operator has no labels to match on. Check that NFD is healthy (oc get pods -n openshift-nfd) and that the node carries feature.node.kubernetes.io/pci-10de.present=true. A broken NFD looks exactly like a driver problem but is not one.

Fallback: serve kernel and CUDA RPMs over HTTP

Only needed when Step 2 shows a single-container driver pod - the operator did not pair with DTK despite a matching image being available. This happens on older GPU operator versions where use_ocp_driver_toolkit was unset or false (the field no longer exists in v26.x, where DTK handling is internal), or when the operator cannot resolve a DTK image for that RHCOS version.

The approach is to take the kernel content out of the DTK image, repackage it as RPMs, add the CUDA development packages, and serve them to the driver container over HTTP.

Extract kernel packages from DTK

The obvious shortcut - run dnf download kernel-devel-${KERNEL_VERSION} inside the DTK container and get genuine RPMs - does not work. The DTK image has only the UBI repos configured (ubi-9-baseos, ubi-9-appstream, ubi-9-codeready-builder) and carries no entitlement certificates, and UBI does not ship kernel packages. Downloading on the bastion instead needs a host entitled for the rhocp-* and *-eus-rpms repos, which a disconnected lab bastion generally is not. That leaves the files already installed inside the DTK image as the only source of kernel content at the node’s exact version - hence extraction.

Tip

If you do have an entitled RHEL host that can reach the CDN, download the real kernel-devel, kernel-headers and kernel RPMs at the node’s exact NVR and skip the rpmbuild step. Genuine RPMs are more reliable than hand-rolled ones because the NVRs and file layout are correct by construction.

On a host that can pull from the mirror registry:

DTK_IMAGE=$(oc adm release info --image-for=driver-toolkit)

# Take the version from the NODE, not from the extraction host
KERNEL_VERSION=$(oc get nodes -l nvidia.com/gpu.present=true \
  -o jsonpath='{.items[0].status.nodeInfo.kernelVersion}')

podman create --name dtk-extract $DTK_IMAGE
podman cp dtk-extract:/usr/src/kernels/${KERNEL_VERSION} /tmp/kernel-src/
podman cp dtk-extract:/usr/include /tmp/kernel-headers/
podman cp dtk-extract:/lib/modules/${KERNEL_VERSION} /tmp/kernel-modules/
podman rm dtk-extract
Build RPMs and create a local repo
yum install -y rpm-build createrepo_c

# No spec files ship with this guide. Write a minimal spec per package that
# installs the extracted trees to their normal locations:
#   kernel-devel   -> /usr/src/kernels/${KERNEL_VERSION}
#   kernel-headers -> /usr/include
#   kernel         -> /lib/modules/${KERNEL_VERSION}, including vmlinuz
# The package NVRs must match ${KERNEL_VERSION} exactly, because the driver
# build script installs them by fully-qualified version.

mkdir -p /tmp/kernel-repo/rpms
cp ~/rpmbuild/RPMS/x86_64/kernel*.rpm /tmp/kernel-repo/rpms/
Download CUDA development packages

The NVIDIA driver container also needs CUDA development packages (cuda-devel, cuda-nvcc, cuda-cudart-devel) to compile. On a connected cluster the driver pod downloads these from developer.download.nvidia.com. On a fully air-gapped cluster that is unreachable, so the CUDA RPMs must be included in the same local repo.

Note

This applies to the fallback path only. A DTK build resolves everything locally and runs nvidia-installer with --no-kernel-modules, so it never reaches developer.download.nvidia.com - one more reason to confirm Step 1 before doing any of this.

On a connected host with access to the NVIDIA CUDA repo:

# Add the NVIDIA CUDA repo (if not already configured)
dnf config-manager --add-repo \
  https://developer.download.nvidia.com/compute/cuda/repos/rhel9/x86_64/cuda-rhel9.repo

# Download the CUDA packages and their dependencies
dnf download --resolve --destdir /tmp/cuda-rpms \
  cuda-devel-12-6 cuda-nvcc-12-6 cuda-cudart-devel-12-6

# Copy them into the same repo directory as the kernel RPMs
cp /tmp/cuda-rpms/*.rpm /tmp/kernel-repo/rpms/
Tip

The CUDA version must match what the GPU operator expects. Check the driver container image tag or the CUDA_VERSION env var in the ClusterPolicy to find the right version.

Generate the repo metadata:

createrepo_c /tmp/kernel-repo/rpms/
Serve the repo and configure the GPU operator
# Serve the repo over HTTP (from a host reachable by the GPU node)
cd /tmp/kernel-repo/rpms && python3 -m http.server 8088 &

# Create a ConfigMap with the repo config
oc create configmap kernel-repo-config -n nvidia-gpu-operator \
  --from-literal=local-kernel.repo="[local-kernel]
name=Local Kernel and CUDA Packages
baseurl=http://<bastion-ip>:8088/
enabled=1
gpgcheck=0
priority=1"

# Patch the ClusterPolicy to use the repo
oc patch clusterpolicy gpu-cluster-policy --type=merge \
  -p '{"spec":{"driver":{"repoConfig":{"configMapName":"kernel-repo-config"}}}}'

Replace <bastion-ip> with the IP of the host serving the repo. The GPU driver pod must be able to reach this host on port 8088.

Important

The HTTP repo must stay running for the lifetime of the GPU nodes. The NVIDIA driver pod runs dnf install every time it starts - on node reboots, MachineSet scale-ups, operator upgrades, or ClusterPolicy changes. If the repo is gone, driver compilation fails and the GPU stays unusable. For production use, serve the repo from a persistent service (httpd container, nginx pod, or a proper artifact server) instead of a background python3 process. We opened RHOAIENG-82815 to track finding a better long-term solution for this.

Verify the driver
# Wait for the driver pod to complete compilation
oc get pods -n nvidia-gpu-operator -l app=nvidia-driver-daemonset -w

# Verify GPU is available
oc get nodes -l nvidia.com/gpu.present=true \
  -o jsonpath='{.items[*].status.allocatable.nvidia\.com/gpu}'

Troubleshooting

WASM shim: “RBAC: access denied”

Symptom: All MaaS API requests return “RBAC: access denied”. The gateway pod logs show:

error wasm  error in converting the wasm config to local: cannot fetch Wasm module
oci://registry.access.redhat.com/rhcl-1/wasm-shim-rhel9@sha256:...
could not fetch manifest: dial tcp: lookup registry.access.redhat.com: no such host.
applying deny RBAC filter

Cause: The Kuadrant WASM shim is fetched at runtime by the Envoy gateway pod via the OCI protocol. This fetch bypasses CRI-O and does not respect IDMS/ITMS/ICSP. On a disconnected cluster, the public registry is unreachable, the fetch fails, and Kuadrant falls back to a deny-all RBAC filter.

Fix: Apply Step 6 of the Mirroring Workflow to patch the RHCL subscription with RELATED_IMAGE_WASMSHIM pointing to the mirror registry. Then restart the gateway pod.

TLS variant: If you see tls: failed to verify certificate: x509: certificate signed by unknown authority instead of no such host, the WASM shim is reachable but the mirror registry’s CA is not trusted by the gateway pod. Ensure the mirror CA is included in:

  • The cluster proxy trusted CA bundle: oc get proxy/cluster -o jsonpath='{.spec.trustedCA.name}'
  • The additionalTrustedCA in image.config.openshift.io/cluster

Istiod / gateway pod ImagePullBackOff (OpenShift >= 4.20.32)

Symptom: After creating the MaaS gateway, the istiod deployment or gateway proxy pod in openshift-ingress shows ImagePullBackOff or ErrImagePull with errors referencing registry.redhat.io/openshift-service-mesh/istio-pilot-rhel9 or proxyv2-rhel9.

Cause: On OpenShift >= 4.20.32, the openshift-ingress operator embeds the Istio sail library and pulls istiod/proxyv2 images directly from registry.redhat.io. These images are not in the OCP release payload and not in any operator catalog. Without explicit mirroring, the disconnected cluster cannot pull them.

Fix: Mirror the istiod and proxyv2 images as described in istiod-images. Discover the correct digests from a connected reference cluster, add them to imageset-config-maas.yaml, re-run oc-mirror, and apply the updated IDMS.

After the IDMS is applied and nodes reboot, delete the failed pods so they retry with the new mirror configuration:

oc delete pods -n openshift-ingress -l app=istiod
oc delete pods -n openshift-ingress -l istio.io/gateway-name=maas-default-gateway

Certificates

In a disconnected environment, the mirror registry uses a self-signed CA. The cluster needs to trust this CA for image pulls AND for workloads running inside RHOAI (workbenches, model servers, pipelines).

If RHOAI was deployed using the standard disconnected procedure:

  • The mirror CA is already in the cluster’s image.config (additionalTrustedCA)
  • The DSCInitialization trustedCABundle is set to Managed with the CA in customCABundle
  • The odh-trusted-ca-bundle ConfigMap is propagated to all RHOAI-managed namespaces

Verify:

# Cluster trusts the mirror CA
oc get image.config.openshift.io/cluster -o jsonpath='{.spec.additionalTrustedCA.name}'

# DSCI has the CA bundle
oc get dscinitialization default-dsci -o jsonpath='{.spec.trustedCABundle.managementState}'

# CA bundle propagated to the MaaS namespace
oc get configmap odh-trusted-ca-bundle -n redhat-ods-applications

If any of these are missing, refer to the RHOAI disconnected installation guide, Chapter 8 (Working with certificates).

MaaS Gateway connectivity (AWS)

On AWS, the MaaS gateway creates a LoadBalancer service that defaults to an external NLB with public IPs. In a disconnected VPC, these public IPs are unreachable - both from the high-side host and from pods inside the cluster (the RHOAI dashboard’s maas-ui sidecar fails with EOF errors).

When you run setup-maas.sh with DISCONNECTED=true on AWS, the script automatically patches the Gateway to use an internal NLB:

# What setup-maas.sh does in Phase 2, Step 6:
oc patch gateway maas-default-gateway -n openshift-ingress --type=merge -p '{
  "spec": {
    "infrastructure": {
      "annotations": {
        "service.beta.kubernetes.io/aws-load-balancer-internal": "true"
      }
    }
  }
}'
# Then deletes the service so the controller recreates it with an internal NLB
oc delete svc maas-default-gateway-openshift-default -n openshift-ingress

After the internal NLB is provisioned (1-2 minutes), maas.<cluster-domain> resolves to private IPs reachable from inside the VPC.

If you already deployed MaaS without DISCONNECTED=true, you can apply the patch manually and delete the service. The gateway controller recreates it automatically.

The setup-maas.sh and verify.sh scripts also have a NodePort fallback - if the MaaS gateway URL is unreachable, they discover the NodePort and test via --resolve. You can test manually:

# Find the NodePort for HTTPS
NODEPORT=$(oc get svc maas-default-gateway-openshift-default -n openshift-ingress \
  -o jsonpath='{.spec.ports[?(@.port==443)].nodePort}')

# Find a node's internal IP
NODE_IP=$(oc get nodes -o jsonpath='{.items[0].status.addresses[?(@.type=="InternalIP")].address}')

# Test via NodePort
CLUSTER_DOMAIN=$(oc get ingresses.config/cluster -o jsonpath='{.spec.domain}')
curl -sk --resolve "maas.${CLUSTER_DOMAIN}:${NODEPORT}:${NODE_IP}" \
  "https://maas.${CLUSTER_DOMAIN}:${NODEPORT}/maas-api/v1/health"

Next steps

Once the MaaS operators are available and (optionally) a GPU node is ready, proceed to Phase 1: Prerequisites and run the guide normally. Use the DISCONNECTED=true flag with setup-maas.sh to automatically skip Phase 8 (External Models) and use the disconnected simulator variant:

DISCONNECTED=true ./scripts/setup-maas.sh

3 - Installation Guide

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

3.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.

3.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.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.

3.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.

4 - Model Deployment & Verification

Phases 5–6 — deploy MaaS models with governance, then run the end-to-end verification suite.

4.1 - Phase 5: MaaS Model Deployment

This phase deploys LLM models and registers them with the MaaS platform.

This phase deploys LLM models and registers them with the MaaS platform. Each model includes the inference workload (LLMInferenceService) and the MaaS control plane resources (MaaSModelRef, MaaSAuthPolicy, MaaSSubscription) that enable API key management, access control, and rate limiting.

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

  • Phases 1-4 completed (RHOAI installed, MaaS platform running)
  • MaaS Gateway available in openshift-ingress namespace
  • maas-api and maas-controller pods running (in redhat-ai-gateway-infra on RHOAI 3.5+, or redhat-ods-applications on 3.4)
Important

GPU models use FP8 quantization, which requires NVIDIA GPUs with compute capability >= 80 (Ampere architecture or newer). T4 GPUs (compute capability 75) are not supported with the current vLLM version. Use A10G, L4, L40, L40S, A100, or H100 GPUs.

Available Models

A CPU-only mock LLM that requires no GPU. It uses the llm-d-inference-sim container to simulate an OpenAI-compatible inference endpoint. This is the best choice for validating the MaaS platform without GPU infrastructure.

  • Runtime: llm-d-inference-sim (CPU-only)
  • Resources: 100m-500m CPU, 256Mi-512Mi memory
  • GPU: Not required
  • Startup time: ~30 seconds

granite-tiny-gpu

Red Hat AI Granite 4.0-h-tiny FP8 Dynamic, a small Granite model (~1B parameters) running on the Red Hat AI Inference Server (vLLM CUDA). Suitable for clusters with modest GPU resources.

  • Runtime: vLLM CUDA (registry.redhat.io/rhaii/vllm-cuda-rhel9:3.3.0)
  • Model weights: OCI modelcar from registry.redhat.io
  • Resources: 2-4 CPU, 8Gi-24Gi memory, 1x NVIDIA GPU
  • GPU memory: ~8GB required
  • Startup time: 5-15 minutes (image pull + model loading)

gemma

Google Gemma 2 9B IT FP8 running on the Red Hat AI Inference Server (vLLM CUDA). A 9B parameter instruction-tuned model with FP8 quantization, suitable for general-purpose text generation and code tasks. Fits on a single L4 GPU (24GB VRAM).

  • Runtime: vLLM CUDA (registry.redhat.io/rhaii/vllm-cuda-rhel9:3.3.0)
  • Model weights: OCI modelcar registry.redhat.io/rhelai1/modelcar-gemma-2-9b-it-fp8:1.5
  • Resources: 2-4 CPU, 8Gi-24Gi memory, 1x NVIDIA GPU
  • GPU memory: ~12GB required (FP8 quantized)
  • Startup time: 5-15 minutes (image pull + model loading)
  • Context length: 4096 tokens (configurable via --max-model-len)
Note

Gemma is a US-origin model, making it suitable for deployments with export control requirements. The OCI modelcar is available from registry.redhat.io and works in both connected and disconnected (air-gapped) environments.

gpt-oss-20b

OpenAI gpt-oss-20b running on the Red Hat AI Inference Server. Uses the Red Hat AI validated quantized build, which fits on a single 24 GB GPU (L4) or better.

  • Runtime: vLLM CUDA (registry.redhat.io/rhaii/vllm-cuda-rhel9:3.3.0)
  • Model weights: OCI modelcar from registry.redhat.io (~8GB download)
  • Resources: 2-4 CPU, 16Gi-60Gi memory, 1x NVIDIA GPU
  • GPU memory: ~16GB required (quantized - verified on a 24 GB L4)
  • Startup time: 5-15 minutes (image pull + model loading)

qwen3-06b

Qwen3-0.6B running on the Red Hat AI Inference Server (vLLM CPU). A small but capable 0.6B parameter model that runs entirely on CPU - no GPU required. Good for clusters without GPU infrastructure that still need a real (non-simulated) LLM endpoint.

  • Runtime: vLLM CPU (registry.redhat.io/rhaiis/vllm-cpu-rhel9)
  • Model weights: HuggingFace hf://Qwen/Qwen3-0.6B
  • Resources: 4-8 CPU, 16Gi memory
  • GPU: Not required
  • Context length: 2048 tokens
  • Startup time: 2-5 minutes (HuggingFace download + CPU model loading)
Note

This model downloads weights from HuggingFace (hf://), so it is subject to the same HuggingFace Xet download hang as the simulator (see HuggingFace Xet Download Hang below). If the pod is stuck in Init:0/1, apply the HF_HUB_DISABLE_XET workaround.

simulator-disconnected

A variant of the simulator for air-gapped clusters. Uses oci:// storage URI instead of hf:// because HuggingFace is unreachable in disconnected environments. Functionally identical to the connected simulator - the inference container generates random responses regardless of the model URI.

  • Runtime: llm-d-inference-sim (CPU-only)
  • Resources: 100m-500m CPU, 256Mi-512Mi memory
  • GPU: Not required
  • Startup time: ~30 seconds (plus OCI modelcar init pull from mirror)

Custom Resource Descriptions

Each model deployment creates the following custom resources. LLMInferenceService is a KServe resource (serving.kserve.io/v1alpha1); the MaaS resources belong to maas.opendatahub.io/v1alpha1:

LLMInferenceService (namespace: llm)

Defines the inference workload: the container, model weights, resource requests, health probes, and gateway routing. This is the actual serving pod that handles inference requests.

MaaSModelRef (namespace: llm)

Registers the LLMInferenceService with the MaaS control plane. The MaaS API uses this reference to discover available models and route API requests to the correct inference endpoint.

MaaSAuthPolicy (namespace: models-as-a-service)

Defines who can access the model. The examples here grant access to all authenticated users (system:authenticated group). You can restrict access to specific users or groups by modifying the subjects field.

MaaSSubscription (namespace: models-as-a-service)

Defines rate-limiting tiers for model access. Each model ships with two tiers:

  • Free tier (priority 10): 100 tokens/min for all authenticated users
  • Premium tier (priority 20): 100,000 tokens/min for all authenticated users

Higher-priority subscriptions take precedence. You can adjust limits, windows, and subject groups to match your usage policies.

Tip

See the User-Level Rate Limiting demo and Subscription Priority demo for hands-on walkthroughs of tiering and priority resolution. All demos are listed on the Demos page.

Governance Pairing: Why Both Are Required

Important

A MaaSModelRef reaches Ready phase only when both a MaaSSubscription AND a MaaSAuthPolicy reference it. This is called governance pairing. If only one of them references a model, the model stays in Pending phase with the condition No active subscription and auth policy pairing found, and inference requests will fail.

These two CRDs are intentionally separate - they serve different purposes (access control vs rate limiting) and can target different groups. For example, you can grant all users access via one MaaSAuthPolicy while having separate MaaSSubscription resources with different rate limits per department.

However, updating one does NOT auto-update the other. If you add a model to a MaaSSubscription (via CLI or UI), you must also add it to a MaaSAuthPolicy. The controller does not sync them automatically.

Note

Open the Install & Configuration Visualizer (opens in a new tab) to see governance pairing, tiers/priority, and the full phase sequence animated end-to-end.

Deploying a Model

Note

Gateway Pod OOMKill

Deploying a model triggers the Istio gateway to load Kuadrant Wasm extensions, which can push the pod past the default 1Gi memory limit. If you applied the gateway-resources.yaml ConfigMap in Phase 2 Step 5b, this is already handled (the limit is set to 2Gi via parametersRef).

If the gateway pod starts OOMKilling after deploying a model, see Phase 2: Gateway OOMKill Prevention for the fix.

Create the llm namespace if it doesn’t exist and label it for RHOAI:

oc create namespace llm
oc label namespace llm opendatahub.io/generated-namespace=true --overwrite
oc label namespace llm maas.opendatahub.io/gateway-access=true --overwrite
oc label namespace llm opendatahub.io/dashboard=true --overwrite
Important

The maas.opendatahub.io/gateway-access label is required for any namespace that serves models through the MaaS Gateway. Without it, the Gateway will not accept HTTPRoutes from this namespace and the model will not be reachable.

Tip

The opendatahub.io/dashboard label makes the llm namespace appear as a Data Science Project in the Red Hat OpenShift AI dashboard.

Deploy the simulator (no GPU required):

oc apply -k manifests/05-maas-models/simulator/

Note

HuggingFace Xet Download Hang

The simulator uses hf://sshleifer/tiny-gpt2 as its model URI. HuggingFace has migrated model storage to the Xet protocol, which can cause the KServe storage-initializer init container to hang indefinitely during download. If the model pod is stuck in Init:0/1 for more than 5 minutes, apply this workaround:

oc patch deployment facebook-opt-125m-simulated-kserve -n llm \
  --type=json \
  -p '[{"op":"add","path":"/spec/template/spec/initContainers/0/env/-","value":{"name":"HF_HUB_DISABLE_XET","value":"1"}}]'

This disables the Xet protocol and falls back to standard HTTP downloads. The patched pod should complete init within 30 seconds. Note that KServe may revert this patch on reconciliation, so reapply if the model is redeployed.

GPU models using OCI modelcar images (granite-tiny-gpu, gpt-oss-20b) are not affected by this issue since they do not download from HuggingFace.

For disconnected (air-gapped) clusters, use the disconnected simulator variant:

oc apply -k manifests/05-maas-models/simulator-disconnected/

Or deploy a CPU model that provides real inference without GPU:

# Qwen3-0.6B (CPU-only, no GPU required)
oc apply -k manifests/05-maas-models/qwen3-06b/

Or deploy a GPU model if your cluster has NVIDIA GPUs:

# Gemma 2 9B IT FP8 (12GB+ VRAM, single L4)
oc apply -k manifests/05-maas-models/gemma/

# Granite 4.0-h-tiny FP8 (8GB+ VRAM)
oc apply -k manifests/05-maas-models/granite-tiny-gpu/

# GPT-oss-20b (16GB+ VRAM, L4 or better)
oc apply -k manifests/05-maas-models/gpt-oss-20b/

Verifying Model Readiness

After deploying, verify that the model is ready:

# Check LLMInferenceService status
oc get llminferenceservice -n llm

# Check that model pods are running
oc get pods -n llm

# Check MaaSModelRef registration
oc get maasmodelref -n llm -o wide

# Check MaaSAuthPolicy and MaaSSubscription
oc get maasauthpolicy -n models-as-a-service
oc get maassubscription -n models-as-a-service

The LLMInferenceService should show a Ready condition. For GPU models, initial startup takes 5-15 minutes while the container image is pulled and model weights are loaded into GPU memory.

Testing Inference

Once the model is ready, test inference through the MaaS API:

# Get the MaaS API domain
CLUSTER_DOMAIN=$(oc get ingresses.config/cluster -o jsonpath='{.spec.domain}')
MAAS_URL="maas.${CLUSTER_DOMAIN}"

# Create an API key (requires the maas-api to be running)
API_KEY=$(curl -sk -X POST "https://${MAAS_URL}/maas-api/v1/api-keys" \
  -H "Authorization: Bearer $(oc whoami -t)" \
  -H "Content-Type: application/json" \
  -d '{"name": "test-key", "subscription": "simulator-free", "expiresIn": "1h"}' \
  | jq -r '.key')

# List available models
curl -sk "https://${MAAS_URL}/v1/models" \
  -H "Authorization: Bearer ${API_KEY}"

# Get the model ID from the listing
MODEL_ID=$(curl -sk "https://${MAAS_URL}/v1/models" \
  -H "Authorization: Bearer ${API_KEY}" | jq -r '.data[0].id')

# Send a chat completion request (body-based routing)
curl -sk "https://${MAAS_URL}/v1/chat/completions" \
  -H "Authorization: Bearer ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d "{
    \"model\": \"${MODEL_ID}\",
    \"messages\": [{\"role\": \"user\", \"content\": \"Hello!\"}]
  }"
Important

The model field in the request body must match the id returned by /v1/models. For local models (LLMInferenceService), this is the canonical form publishers/{namespace}/models/{model-name} (e.g., publishers/llm/models/facebook/opt-125m). For external models (ExternalModel), it is just the model name (e.g., gpt-4o-mini). Using a short name like facebook/opt-125m for local models will return 404.

Removing a Model

oc delete -k manifests/05-maas-models/simulator/

Adding a Model to an Existing Subscription

If you already have a MaaSSubscription and MaaSAuthPolicy for one model and want to add a second model, you need to update both resources. This is a common Day 2 operation that catches people off guard.

Deploy the new model (LLMInferenceService + MaaSModelRef) as usual, then update both the subscription and the auth policy:

# 1. Add the new model to the existing MaaSSubscription
oc patch maassubscription <subscription-name> -n models-as-a-service --type=json \
  -p '[{"op":"add","path":"/spec/modelRefs/-","value":{"name":"<new-model-ref>","namespace":"llm","tokenRateLimits":[{"limit":100,"window":"1m"}]}}]'

# 2. Add the new model to the existing MaaSAuthPolicy
oc patch maasauthpolicy <policy-name> -n models-as-a-service --type=json \
  -p '[{"op":"add","path":"/spec/modelRefs/-","value":{"name":"<new-model-ref>","namespace":"llm"}}]'

# 3. Verify the new model reaches Ready
oc get maasmodelref -n llm -o wide
Warning

If you update only the MaaSSubscription without updating the MaaSAuthPolicy, the new model will stay in Pending phase. The MaaSModelRef condition will show No active subscription and auth policy pairing found. This applies to both CLI and UI edits. See Governance Pairing: Why Both Are Required for details.

ServiceAccount-Scoped Subscriptions

For programmatic workloads (CI/CD pipelines, batch jobs, automated testing), you can restrict a model so that only a specific ServiceAccount can access it. This requires scoping both the MaaSAuthPolicy and the MaaSSubscription to the SA. If you only scope the subscription but leave the auth policy open to system:authenticated, any user can still access the model through other subscriptions.

Create a ServiceAccount and generate a token:

oc create sa my-pipeline-sa -n default
SA_TOKEN=$(oc create token my-pipeline-sa -n default --duration=24h)

Create a MaaSAuthPolicy that only grants this ServiceAccount access to the model:

cat <<EOF | oc apply -f -
apiVersion: maas.opendatahub.io/v1alpha1
kind: MaaSAuthPolicy
metadata:
  name: simulator-pipeline-access
  namespace: models-as-a-service
  annotations:
    openshift.io/display-name: "Simulator Pipeline Access"
    openshift.io/description: "Grants access only to the pipeline ServiceAccount"
spec:
  modelRefs:
    - name: facebook-opt-125m-simulated
      namespace: llm
  subjects:
    groups: []
    users:
      - system:serviceaccount:default:my-pipeline-sa
EOF

Create a MaaSSubscription scoped to the same ServiceAccount:

cat <<EOF | oc apply -f -
apiVersion: maas.opendatahub.io/v1alpha1
kind: MaaSSubscription
metadata:
  name: simulator-pipeline
  namespace: models-as-a-service
  annotations:
    openshift.io/display-name: "Simulator Pipeline Tier"
    openshift.io/description: "Dedicated rate limit for CI/CD pipeline"
spec:
  owner:
    groups: []
    users:
      - system:serviceaccount:default:my-pipeline-sa
  modelRefs:
    - name: facebook-opt-125m-simulated
      namespace: llm
      tokenRateLimits:
        - limit: 5000
          window: 1m
  priority: 15
EOF
Note

The ServiceAccount identity in both resources must use the full format: system:serviceaccount:{namespace}:{sa-name}. Setting groups: [] in both ensures only this SA can access the model and create API keys.

Important

Auth policies are additive. If the existing simulator-access policy (from the Phase 5 deployment) is still active with system:authenticated, all authenticated users can still access the model through that policy - regardless of the SA-scoped policy above. For full isolation, the model should only have SA-scoped governance resources and no broader policies.

Test it:

CLUSTER_DOMAIN=$(oc get ingresses.config/cluster -o jsonpath='{.spec.domain}')
MAAS_URL="maas.${CLUSTER_DOMAIN}"

# Create API key using the SA token
API_KEY=$(curl -sk -X POST "https://${MAAS_URL}/maas-api/v1/api-keys" \
  -H "Authorization: Bearer ${SA_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{"name": "pipeline-key", "subscription": "simulator-pipeline", "expiresIn": "1h"}' \
  | jq -r '.key')

# Run inference
MODEL_ID=$(curl -sk "https://${MAAS_URL}/v1/models" \
  -H "Authorization: Bearer ${API_KEY}" | jq -r '.data[0].id')

curl -sk "https://${MAAS_URL}/v1/chat/completions" \
  -H "Authorization: Bearer ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d "{
    \"model\": \"${MODEL_ID}\",
    \"messages\": [{\"role\": \"user\", \"content\": \"Hello from pipeline!\"}]
  }"

A regular user trying to create an API key with "subscription": "simulator-pipeline" gets invalid_subscription - the maas-api checks the caller’s identity against spec.owner.users and rejects anyone not listed.

Tip

See the Service Account Access demo for a full walkthrough deploying an in-cluster app that calls a model with its SA token. Listed on the Demos page.

Appendix

Directory Structure

Each model follows the same Kustomize layout:

{model}/
  kustomization.yaml          # Aggregates llm/ and maas/ subdirectories
  llm/
    model.yaml                # LLMInferenceService CR
    kustomization.yaml        # Sets namespace: llm (+ namePrefix for simulator)
  maas/
    maas-model.yaml           # MaaSModelRef CR
    maas-auth-policy.yaml     # MaaSAuthPolicy CR (namespace: models-as-a-service)
    maas-subscription-free.yaml     # Free tier MaaSSubscription
    maas-subscription-premium.yaml  # Premium tier MaaSSubscription
    kustomization.yaml        # Lists all MaaS resources

References

Next step

Proceed to Phase 6: Verification.

4.2 - Phase 6: MaaS Verification

End-to-end verification of a MaaS deployment on OpenShift.

End-to-end verification of a MaaS (Models as a Service) deployment on OpenShift.

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.

What it tests

The verify.sh script runs 6 phases:

  1. Infrastructure health - checks Gateway, PostgreSQL, maas-api, maas-controller, Authorino, DSC readiness, and the /maas-api/health endpoint.
  2. Deploy simulator model - creates a temporary CPU-only simulator (LLMInferenceService, MaaSModelRef, MaaSAuthPolicy, MaaSSubscription) and waits for it to become Ready.
  3. API verification - creates an API key, lists available models, and sends a chat completion inference request.
  4. Auth enforcement - sends requests with no token and an invalid token, verifying both are rejected (HTTP 401/403).
  5. Rate limiting - fires 16 rapid requests to trigger the 100 tokens/min rate limit and confirms HTTP 429 responses.
  6. Cleanup - removes all temporary test resources (API key, MaaS CRs, simulator pods, namespaces if empty).

Prerequisites

  • MaaS platform installed on the cluster
  • oc logged into the cluster (oc whoami succeeds)
  • curl, jq, and dig available on PATH

Usage

Note

The verification script deploys a temporary simulator model and removes it during the cleanup phase. Resources that already existed before the run - such as a simulator you deployed in Phase 5 - are detected and kept. Use --no-cleanup to keep even the script’s own test resources, and --cleanup-only to remove all test resources including a pre-existing simulator.

# Full verification (deploy, test, cleanup)
./manifests/06-verification/verify.sh

# Keep test resources after verification
./manifests/06-verification/verify.sh --no-cleanup

# Remove leftover test resources from a previous run
./manifests/06-verification/verify.sh --cleanup-only

Expected output

=========================================
MaaS Verification Summary
=========================================
MaaS API URL:  https://maas.<cluster-domain>
Passed:        15
Failed:        0
Status:        ALL CHECKS PASSED
=========================================

The exit code is 0 on success and 1 if any check failed.

Manual verification commands

If you prefer to verify each phase manually:

Phase 1: Infrastructure health

RHAIE Version: 3.5, 3.6

# Gateway
oc get gateway maas-default-gateway -n openshift-ingress \
  -o jsonpath='{.status.conditions[?(@.type=="Programmed")].status}'

# Core deployments (maas-api is in redhat-ai-gateway-infra on 3.5+)
oc get deployment postgres maas-controller -n redhat-ods-applications
oc get deployment maas-api -n redhat-ai-gateway-infra

# Authorino
oc get deployment authorino -n kuadrant-system

# DSC condition (ModelsAsAServiceReady on 3.5+)
oc get datasciencecluster default-dsc \
  -o jsonpath='{.status.conditions[?(@.type=="ModelsAsAServiceReady")].status}'

# Health endpoint
DOMAIN=$(oc get ingresses.config/cluster -o jsonpath='{.spec.domain}')
curl -sk "https://maas.${DOMAIN}/maas-api/health"

RHAIE Version: 3.4

# Gateway
oc get gateway maas-default-gateway -n openshift-ingress \
  -o jsonpath='{.status.conditions[?(@.type=="Programmed")].status}'

# Core deployments
oc get deployment postgres maas-api maas-controller -n redhat-ods-applications

# Authorino
oc get deployment authorino -n kuadrant-system

# DSC condition
oc get datasciencecluster default-dsc \
  -o jsonpath='{.status.conditions[?(@.type=="ModelsAsServiceReady")].status}'

# Health endpoint
DOMAIN=$(oc get ingresses.config/cluster -o jsonpath='{.spec.domain}')
curl -sk "https://maas.${DOMAIN}/maas-api/health"

Phase 2: Deploy simulator model

oc get llminferenceservice -n llm
oc get maasmodelref -n llm -o wide
oc get maasauthpolicy -n models-as-a-service
oc get maassubscription -n models-as-a-service
oc get pods -n llm

Phase 3: API verification

DOMAIN=$(oc get ingresses.config/cluster -o jsonpath='{.spec.domain}')
HOST="https://maas.${DOMAIN}"

# Create API key (save the key and model ID for subsequent phases)
API_KEY=$(curl -sk -X POST \
  -H "Authorization: Bearer $(oc whoami -t)" \
  -H "Content-Type: application/json" \
  -d '{"name":"test","expiresIn":"1h","subscription":"simulator-free"}' \
  "${HOST}/maas-api/v1/api-keys" | jq -r '.key')
echo "API_KEY=${API_KEY}"

# List models
curl -sk -H "Authorization: Bearer ${API_KEY}" "${HOST}/v1/models"

# Get the model ID (canonical form for body-based routing)
MODEL_ID=$(curl -sk -H "Authorization: Bearer ${API_KEY}" \
  "${HOST}/v1/models" | jq -r '.data[0].id')
echo "MODEL_ID=${MODEL_ID}"

Phase 4: Auth enforcement

# Should return 401 or 403
curl -sk -o /dev/null -w '%{http_code}' \
  -H "Content-Type: application/json" \
  -d "{\"model\":\"${MODEL_ID}\",\"messages\":[{\"role\":\"user\",\"content\":\"Hello\"}]}" \
  "${HOST}/v1/chat/completions"

Phase 5: Rate limiting

# Send rapid requests and watch for 429
for i in $(seq 1 16); do
  curl -sk -o /dev/null -w '%{http_code}\n' \
    -H "Authorization: Bearer ${API_KEY}" \
    -H "Content-Type: application/json" \
    -d "{\"model\":\"${MODEL_ID}\",\"messages\":[{\"role\":\"user\",\"content\":\"Hello, write a long essay\"}],\"max_tokens\":50}" \
    "${HOST}/v1/chat/completions"
done

Troubleshooting

Gateway pod OOMKilled (CrashLoopBackOff)

If the verification script fails at Phase 1 (health endpoint unreachable) or Phase 3 (API key creation returns {}), check the MaaS gateway pod:

oc get pods -n openshift-ingress | grep maas-default-gateway

If the pod shows CrashLoopBackOff with multiple restarts, the Kuadrant Wasm extensions may exceed the default 1Gi memory limit. Apply the ConfigMap fix from Phase 2 Step 5b:

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"
      }
    }
  }
}'

Wait for the pod to stabilize, then re-run the script.

Wrong subscription name in API key creation

If the API key creation returns {"code":"invalid_subscription","error":"Unable to resolve a subscription for this API key"}, ensure the subscription name matches an existing MaaSSubscription resource:

oc get maassubscription -n models-as-a-service

The Kustomize-deployed simulator uses simulator-free and simulator-premium. The verification script creates its own simulator-subscription.

Appendix

Directory Structure

manifests/06-verification/
  verify.sh                      # End-to-end MaaS verification script

References

Next step

Proceed to Phase 7: Observability.

5 - Phase 7: Observability (Optional)

This phase installs the optional observability operators and configuration.
Note

In Red Hat OpenShift AI 3.5, the monitoring stack uses the Cluster Observability Operator (COO) and its MonitoringStack CR for metrics collection. User Workload Monitoring (UWM) is no longer required. The RHOAI operator creates its own ServiceMonitors with monitoring.opendatahub.io/scrape labels that the COO-managed Prometheus scrapes.

This phase installs the optional observability operators and configuration:

  1. Tempo Operator - provides the TempoStack CRD that the RHOAI operator’s Monitoring controller requires for distributed tracing. Without this operator, the Monitoring CR cannot provision tracing infrastructure.

  2. Red Hat build of OpenTelemetry Operator - provides the OpenTelemetryCollector CRD that the RHOAI operator’s Monitoring controller requires. Without this operator, the Monitoring CR fails with: “OpenTelemetryCollector operator must be installed for OpenTelemetry configuration”. This blocks the full observability chain: MonitoringStack, ThanosQuerier, Perses, and PrometheusDatasource.

  3. Cluster Observability Operator (COO) - required for the Observability Dashboard tab in the Red Hat OpenShift AI UI. COO provides the Perses CRDs (Perses, PersesDatasource, PersesDashboard) that the RHOAI operator uses to deploy the dashboard backend.

  4. Gateway Telemetry (auto-created) - the RHOAI operator auto-creates a TelemetryPolicy and Istio Telemetry CR when telemetry is enabled on the MaasTenantConfig (3.5) or Tenant (3.4). These add per-model, per-subscription, and per-organization labels to gateway metrics for usage attribution.

  5. Loki Operator + Usage Dashboards (RHOAI 3.5+ only) - log-based per-request usage tracking. The gateway emits structured OTLP access logs with token counts, user identity, and subscription info. Logs are shipped to a LokiStack via an OpenTelemetry Collector. The RHOAI console shows admin and user-scoped usage dashboards under Observe & monitor.

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.

Step 1: Install the Tempo Operator

oc apply -k manifests/07-observability/tempo/

Wait for the operator CSV to reach Succeeded:

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

Step 2: Install the Red Hat build of OpenTelemetry Operator

oc apply -k manifests/07-observability/opentelemetry/

Wait for the operator CSV to reach Succeeded:

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

Step 3: Install the Cluster Observability Operator

oc apply -k manifests/07-observability/coo/

Wait for the operator CSV to reach Succeeded:

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

Step 4: Enable DSCI Monitoring

Now that all three observability operators are installed, configure the DSCI monitoring section to trigger the operator’s observability cascade (MonitoringStack, ThanosQuerier, Perses, tracing):

oc patch dsci default-dsci --type=merge -p '{
  "spec": {
    "monitoring": {
      "namespace": "redhat-ods-monitoring",
      "metrics": {
        "replicas": 1,
        "storage": {
          "size": "5Gi",
          "retention": "90d"
        }
      },
      "traces": {
        "sampleRatio": "0.1",
        "storage": {
          "backend": "pv",
          "retention": "2160h"
        }
      }
    }
  }
}'
Important

This step is required for the Observability Dashboard tab in the RHOAI UI to show metrics. Without it, the DSCI monitoring section remains empty (metrics: {}) and the dashboard has no data source.

Wait for the DSCI to reconcile:

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

Step 5: Enable Gateway Telemetry

The RHOAI operator auto-creates a TelemetryPolicy and an Istio Telemetry CR when telemetry is enabled on the MaaS tenant configuration. These add per-model, per-subscription, and per-organization labels to gateway Prometheus metrics. No manual YAML application is needed.

RHAIE Version: 3.5, 3.6

MaasTenantConfig

Patch the MaasTenantConfig to enable telemetry:

oc patch maastenantconfig default-tenant -n models-as-a-service \
  --type=merge -p '{"spec":{"telemetry":{"enabled":true}}}'

The operator creates a TelemetryPolicy with model, subscription, organization_id, and cost_center labels, plus an Istio Telemetry CR for REQUEST_DURATION per subscription. Verify they exist:

oc get telemetrypolicies.extensions.kuadrant.io -n openshift-ingress
oc get telemetry.telemetry.istio.io -n openshift-ingress

Enable per-user metrics, which the MaaS UI Usage tab needs to show per-user activity (RHOAI disables captureUser by default for GDPR compliance):

oc patch maastenantconfig default-tenant -n models-as-a-service \
  --type=merge -p '{"spec":{"telemetry":{"metrics":{"captureUser":true}}}}'

RHAIE Version: 3.4

Tenant

Patch the Tenant CR to enable telemetry:

oc patch tenant default-tenant -n models-as-a-service \
  --type=merge -p '{"spec":{"telemetry":{"enabled":true}}}'

Verify the auto-created resources:

oc get telemetrypolicies.extensions.kuadrant.io -n openshift-ingress
oc get telemetry.telemetry.istio.io -n openshift-ingress
Note

The manifests in manifests/07-observability/telemetry/ are kept as a reference. The operator-created resources may differ slightly in label expressions and dimensions. You do not need to apply them manually.

Step 6: Usage Dashboards with Loki (RHOAI 3.5+ Only)

RHOAI 3.5 introduces log-based usage dashboards that provide per-request token consumption, user attribution, and subscription tracking. Unlike the Prometheus-based metrics (which aggregate data), this approach emits structured OTLP access logs from the gateway and stores them in Loki for exact per-call granularity.

When enabled, the RHOAI operator automatically creates:

  • EnvoyFilter maas-model-access-logs - emits OTLP structured access logs from the gateway on every inference request
  • OpenTelemetry Collector usage-logs - collects the access logs and exports them to the LokiStack
  • Tenancy Proxy usage-logs-tenancy-proxy - filters user-scoped usage data so non-admin users only see their own consumption
  • Perses Dashboards - admin (dashboard-4-maas-usage-logs-admin) and user-scoped (dashboard-5-maas-usage-logs) dashboards visible in the RHOAI console under Observe & monitor

Step 6a: Install the Loki Operator

oc apply -k manifests/07-observability/loki/

Wait for the operator CSV:

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

Step 6b: Deploy S3 Storage for Loki

Loki requires S3-compatible object storage. For non-production deployments, the guide includes a MinIO setup:

oc apply -k manifests/07-observability/usage-logging/

This deploys MinIO in redhat-ods-monitoring, creates a loki bucket, a storage secret, and the LokiStack CR.

Note

The LokiStack manifest uses gp3-csi as default StorageClass (common on AWS). If your cluster uses a different default (e.g. ocs-external-storagecluster-ceph-rbd on OCS), edit manifests/07-observability/usage-logging/lokistack.yaml before applying. For production, replace MinIO with an ObjectBucketClaim (NooBaa/ODF) or a cloud S3 bucket and update minio-secret with the real credentials.

Wait for the LokiStack to be ready:

oc wait lokistack/usage -n redhat-ods-monitoring \
  --for=jsonpath='{.status.conditions[?(@.type=="Ready")].status}'=True --timeout=300s

Step 6c: Enable Usage Logging

Patch the MaaS Config to enable the usage logging pipeline:

oc patch configs.maas.opendatahub.io default --type=merge \
  -p '{"spec":{"usageLogging":true}}'

The RHOAI operator will create the EnvoyFilter, OTEL Collector, Tenancy Proxy, and Perses Dashboards automatically. Verify:

oc get envoyfilter maas-model-access-logs -n openshift-ingress
oc get opentelemetrycollector usage-logs -n redhat-ods-monitoring
oc get persesdashboard -n redhat-ods-monitoring | grep usage-logs

The usage dashboards will appear in the RHOAI console under Observe & monitor > Dashboard, showing per-model token consumption, per-user breakdowns, and subscription usage.

Step 7: Limitador Persistence with Redis (Optional)

By default, Limitador stores rate-limit counters in memory. If the Limitador pod restarts, scales, or gets rescheduled, all counters reset to zero. For example, with a 7-day rate limit window, a pod restart on day 6 gives every user a full quota refresh for the remaining window period. For production deployments, configure Redis as a persistent backend so counters survive pod lifecycle events.

Note

Limitador supports additional storage backends beyond Redis. See the Limitador configuration documentation for details. This guide focuses on Redis.

Step 7a: Deploy Redis (Dev/Test)

oc apply -k manifests/07-observability/redis/

Wait for the Redis deployment:

oc wait --for=condition=available deployment/redis -n redis-limitador --timeout=120s
Warning

This deploys a single-replica, non-HA Redis instance with persistence disabled (no RDB/AOF). Data is stored in memory only and will be lost if the Redis pod itself restarts. This is for development and testing. For production, use a supported Redis-based data store - see the production guidance below.

Step 7b: Configure Limitador for Redis

Patch the Limitador CR to use the Redis secret created by the kustomize manifests:

oc patch limitador limitador -n kuadrant-system --type=merge -p '{
  "spec": {
    "storage": {
      "redis": {
        "configSecretRef": {
          "name": "redis-config"
        }
      }
    }
  }
}'

The Limitador operator will restart the pod automatically.

Step 7c: Verify Redis Connection

Verify the Limitador CR has the Redis storage configured:

oc get limitador limitador -n kuadrant-system -o jsonpath='{.spec.storage}'
# Expected: {"redis":{"configSecretRef":{"name":"redis-config"}}}

Test that counters survive a pod restart. First make a few inference requests (using an existing API key) to populate Redis, then restart Limitador:

# Check Redis has keys (should be > 0 after making requests):
oc exec -n redis-limitador deploy/redis -- redis-cli DBSIZE

# Restart Limitador:
oc delete pod -n kuadrant-system -l app=limitador
oc wait --for=condition=ready pod -n kuadrant-system -l app=limitador --timeout=60s

# Check Redis still has keys after restart:
oc exec -n redis-limitador deploy/redis -- redis-cli DBSIZE

If the DBSIZE is the same before and after the restart, counters survived and Redis persistence is working.

Production Redis guidance

For production deployments, use a supported Redis-based data store instead of the dev instance above. Supported options include Redis Enterprise, Amazon ElastiCache, and Dragonfly.

The configuration is the same - create a Secret with the Redis URL and patch the Limitador CR:

# Example with a production Redis endpoint
oc -n kuadrant-system create secret generic redis-config \
  --from-literal=URL=rediss://user:password@your-redis.example.com:6380 \
  --dry-run=client -o yaml | oc apply -f -

For complete production setup steps, see the Red Hat Connectivity Link - Configure Redis documentation.

Tip

The Track model usage with the OpenShift AI Usage Dashboard article explains how Limitador counters feed the usage dashboard metrics (authorized_calls, rate_limited, authorized_hits). Without Redis, these metrics reset on pod restart. For accurate long-term usage tracking, RHOAI 3.5 also provides logs-based usage dashboards (Step 6 above) which are independent of Limitador counter persistence.

Verification

Check all four observability operators are installed:

oc get csv -n openshift-tempo-operator | grep tempo
# Expected: tempo-operator   Succeeded

oc get csv -n openshift-opentelemetry-operator | grep opentelemetry
# Expected: opentelemetry-operator   Succeeded

oc get csv -n openshift-cluster-observability-operator | grep cluster-observability-operator
# Expected: cluster-observability-operator   Succeeded

oc get csv -n openshift-operators-redhat | grep loki
# Expected: loki-operator   Succeeded

Check the required CRDs are registered:

# Tempo
oc get crd tempostacks.tempo.grafana.com

# OpenTelemetry
oc get crd opentelemetrycollectors.opentelemetry.io

# COO / Perses
oc get crd perses.perses.dev

# Loki
oc get crd lokistacks.loki.grafana.com

Check the TelemetryPolicy exists (auto-created by the operator):

oc get telemetrypolicies.extensions.kuadrant.io -n openshift-ingress

Check the Istio Telemetry exists (auto-created by the operator):

oc get telemetry.telemetry.istio.io -n openshift-ingress
Note

If these resources are missing, verify that spec.telemetry.enabled: true is set on the MaasTenantConfig (3.5) or Tenant (3.4) CR.

Check Redis is running (if deployed):

oc get deployment redis -n redis-limitador
# Expected: READY 1/1

oc get secret redis-config -n kuadrant-system
# Expected: secret exists

oc get limitador limitador -n kuadrant-system -o jsonpath='{.spec.storage}'
# Expected: {"redis":{"configSecretRef":{"name":"redis-config"}}}

oc exec -n redis-limitador deploy/redis -- redis-cli DBSIZE
# Expected: > 0 (after making at least one inference request)

Appendix

Directory Structure

manifests/07-observability/
  tempo/
    kustomization.yaml           # Tempo operator subscription
    namespace.yaml               # openshift-tempo-operator namespace
    operatorgroup.yaml           # Tempo OperatorGroup
    subscription.yaml            # Tempo Subscription
  opentelemetry/
    kustomization.yaml           # OpenTelemetry operator subscription
    namespace.yaml               # openshift-opentelemetry-operator namespace
    operatorgroup.yaml           # OpenTelemetry OperatorGroup
    subscription.yaml            # OpenTelemetry Subscription
  coo/
    kustomization.yaml           # COO operator subscription
    namespace.yaml               # COO namespace
    operatorgroup.yaml           # COO OperatorGroup
    subscription.yaml            # COO Subscription
  loki/
    kustomization.yaml               # Loki operator subscription
    namespace.yaml                   # openshift-operators-redhat namespace
    operatorgroup.yaml               # Loki OperatorGroup
    subscription.yaml                # Loki Subscription
  telemetry/
    gateway-telemetry-policy.yaml    # Kuadrant TelemetryPolicy (reference - auto-created by operator)
    istio-gateway-telemetry.yaml     # Istio Telemetry CR (reference - auto-created by operator)
    kustomization.yaml
  usage-logging/
    kustomization.yaml               # MinIO + LokiStack
    minio.yaml                       # MinIO deployment + bucket job
    minio-secret.yaml                # S3 credentials for Loki
    lokistack.yaml                   # LokiStack CR (edit storageClassName for your cluster)
  redis/
    kustomization.yaml               # Redis dev instance for Limitador persistence
    namespace.yaml                   # redis-limitador namespace
    redis.yaml                       # Redis Deployment + Service (dev-only)
    redis-secret.yaml                # Redis URL secret (in kuadrant-system)
    limitador-patch.yaml             # Limitador CR patch reference (not applied by kustomize)

References

Next step

Proceed to Phase 8: External Models.

6 - Phase 8: External Models (Optional)

The ExternalModel CRD lets you expose third-party LLM APIs (OpenAI, AWS Bedrock, Google Gemini, Anthropic, Azure OpenAI, etc.) through the MaaS gateway.
Note

This phase requires a completed MaaS installation (through Phase 4) and at least one local model deployed (Phase 5) to validate the gateway is functional.

Warning

This phase is NOT compatible with disconnected/air-gapped environments. External models require internet access to reach third-party APIs (OpenAI, Bedrock, Gemini, Anthropic, Azure OpenAI). If you are running in disconnected mode, skip this phase entirely.

The ExternalModel CRD lets you expose third-party LLM APIs (OpenAI, AWS Bedrock, Google Gemini, Anthropic, Azure OpenAI, etc.) through the MaaS gateway. External models get the same API key management, authentication, rate limiting, and usage tracking as locally-served models - your consumers use a single gateway endpoint regardless of where the model runs.

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.

How It Works

RHAIE Version: 3.5, 3.6

An external model deployment requires six resources:

  1. Secret - stores the provider API key. Must have the label inference.llm-d.ai/ipp-managed=true so the payload-processing ext-proc can inject the credential into upstream requests.

  2. ExternalProvider - defines the provider endpoint and authentication configuration (API type, secret reference).

  3. ExternalModel - references the provider and maps the model with routing config (apiFormat, path, targetModel). The BBR (Backend Binding Resolver) handles path rewriting and authentication header injection.

  4. MaaSModelRef - registers the external model in the MaaS catalog so it appears in the API and can be governed.

  5. MaaSAuthPolicy - grants access to specific users or groups.

  6. MaaSSubscription - sets rate limits (tokens per hour) and priority.

RHAIE Version: 3.4

An external model deployment requires five resources:

  1. Secret - stores the provider API key. Must have the label inference.networking.k8s.io/bbr-managed=true so the BBR ext-proc can inject the credential into upstream requests.

  2. ExternalModel - defines the provider, target model, endpoint, and credential reference. The BBR (Backend Binding Resolver) handles path rewriting and authentication header injection.

  3. MaaSModelRef - registers the external model in the MaaS catalog so it appears in the API and can be governed.

  4. MaaSAuthPolicy - grants access to specific users or groups.

  5. MaaSSubscription - sets rate limits (tokens per hour) and priority.

Step 1: Create the Namespace and Secret

The external models live in their own namespace, separate from the MaaS platform and local models:

oc apply -f manifests/08-external-models/openai/namespace.yaml
Note

The namespace manifest includes the maas.opendatahub.io/gateway-access=true label, which is required for the Gateway to accept HTTPRoutes from this namespace. If you create the namespace manually instead of using the manifest, remember to apply this label: oc label namespace external-models maas.opendatahub.io/gateway-access=true --overwrite

Create the provider credential Secret. This is done imperatively (never stored in manifests):

RHAIE Version: 3.5, 3.6

oc create secret generic openai-api-key \
    --from-literal=api-key="$OPENAI_API_KEY" \
    -n external-models \
    --dry-run=client -o yaml | oc apply -f -

oc label secret openai-api-key -n external-models \
    inference.llm-d.ai/ipp-managed=true --overwrite
Important

The inference.llm-d.ai/ipp-managed=true label is required. Without it, the payload-processing ext-proc will not inject the API key and inference will fail with a 500 “credentials not found” error.

RHAIE Version: 3.4

oc create secret generic openai-api-key \
    --from-literal=api-key="$OPENAI_API_KEY" \
    -n external-models \
    --dry-run=client -o yaml | oc apply -f -

oc label secret openai-api-key -n external-models \
    inference.networking.k8s.io/bbr-managed=true --overwrite
Important

The inference.networking.k8s.io/bbr-managed=true label is required. Without it, the BBR ext-proc will not inject the API key and the provider will reject calls with 401.

Step 2: Apply the External Model Resources

Apply the model definition resources. The CRD structure changed between RHOAI versions:

RHAIE Version: 3.5, 3.6

oc apply -k manifests/08-external-models/openai/model/

This creates two resources - the ExternalProvider and ExternalModel:

apiVersion: inference.opendatahub.io/v1alpha1
kind: ExternalProvider
metadata:
  name: openai
  namespace: external-models
spec:
  provider: openai
  endpoint: api.openai.com
  auth:
    type: apikey
    secretRef:
      name: openai-api-key
---
apiVersion: inference.opendatahub.io/v1alpha1
kind: ExternalModel
metadata:
  name: gpt-4o-mini
  namespace: external-models
spec:
  modelName: gpt-4o-mini
  externalProviderRefs:
    - ref:
        name: openai
      targetModel: gpt-4o-mini
      apiFormat: openai-chat
      path: /v1/chat/completions

RHAIE Version: 3.4

oc apply -f manifests/08-external-models/openai/model/external-model-34.yaml

This creates the ExternalModel resource:

apiVersion: maas.opendatahub.io/v1alpha1
kind: ExternalModel
metadata:
  name: gpt-4o-mini
  namespace: external-models
spec:
  provider: openai
  targetModel: gpt-4o-mini
  endpoint: api.openai.com
  credentialRef:
    name: openai-api-key

Step 3: Apply MaaS Governance

oc apply -k manifests/08-external-models/openai/maas/

This creates three resources:

  • MaaSModelRef - registers gpt-4o-mini in the MaaS catalog
  • MaaSAuthPolicy - grants all authenticated users access
  • MaaSSubscription - sets a free tier with 10,000 tokens/hour rate limit

Verification

Check the MaaSModelRef reaches Ready:

oc get maasmodelref gpt-4o-mini -n external-models
# Expected: PHASE = Ready

Check the model appears in the MaaS API:

MAAS_GW="https://maas.$(oc get ingresses.config/cluster -o jsonpath='{.spec.domain}')"
curl -sk "${MAAS_GW}/maas-api/v1/models" \
    -H "Authorization: Bearer $(oc whoami -t)" | python3 -m json.tool

Create an API key and test inference:

# Create an API key bound to the openai-free subscription
API_KEY=$(curl -sk -X POST "${MAAS_GW}/maas-api/v1/api-keys" \
    -H "Authorization: Bearer $(oc whoami -t)" \
    -H "Content-Type: application/json" \
    -d '{"name": "openai-test", "subscription": "openai-free", "expiresIn": "1h"}' \
    | python3 -c "import sys,json; print(json.load(sys.stdin)['key'])")

# Test inference (body-based routing)
curl -sk "${MAAS_GW}/v1/chat/completions" \
    -H "Authorization: Bearer ${API_KEY}" \
    -H "Content-Type: application/json" \
    -d '{"model": "gpt-4o-mini", "messages": [{"role": "user", "content": "Say hello in 3 words."}], "max_tokens": 20}'

A successful response contains a choices array with the model’s reply.

Note

External models use the plain model name (e.g., gpt-4o-mini) as the model field, unlike local models which require the canonical publishers/{namespace}/models/{model-name} format. You can always check the correct model ID with the /v1/models endpoint.

Automated Setup

The setup script handles all of the above in a single command:

./scripts/setup-maas.sh --from-phase 8 \
    --with-external-models \
    --external-model-provider openai \
    --external-model-api-key "$OPENAI_API_KEY"

The --external-model-provider flag selects which provider manifests to deploy (openai, gemini, bedrock, anthropic, or azure-openai; default: openai).

Dashboard UI (Technology Preview)

Important

The External models tab in the RHOAI Dashboard 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 CLI workflow documented above (Steps 1-3) is the fully supported (GA) method for managing external models.

The Dashboard provides an admin-only view of external models deployed through the CLI. This tab is enabled by the externalModels: true flag in the OdhDashboardConfig (see Phase 4: Check OdhDashboardConfig flags).

Navigate to AI hub > Models > Deployments and select the External models tab:

External models tab under Deployments showing gpt-4o-mini with provider details

The tab lists each external model with its provider badge and status. Expanding a model row shows the full provider configuration: external provider name, provider URL, path, authentication type, credential secret, API format, target model ID, and weight.

Note

The Dashboard provides a read-only view of the same Kubernetes CRDs created by the CLI workflow (ExternalProvider, ExternalModel). To create or modify external models, use the CLI steps documented above. Models created via oc apply appear in the Dashboard automatically.

Other Providers

Google Gemini

Manifests for Google Gemini (gemini-2.5-flash) are included under manifests/08-external-models/gemini/. To deploy Gemini instead of OpenAI, use --external-model-provider gemini.

Note

On RHOAI 3.4, there is a known incompatibility: the BBR openai provider hardcodes the upstream path to /v1/chat/completions, but Gemini requires /v1beta/openai/chat/completions, causing inference to return HTTP 404. This was tracked in RHOAIENG-68592. On RHOAI 3.5+, the ExternalModel CRD includes a path field in externalProviderRefs that overrides the upstream path, so Gemini works end-to-end.

To deploy with Gemini:

./scripts/setup-maas.sh --from-phase 8 \
    --with-external-models \
    --external-model-provider gemini \
    --external-model-api-key "$GEMINI_API_KEY"

Anthropic

Manifests for Anthropic (claude-haiku-4-5) are included under manifests/08-external-models/anthropic/. The BBR anthropic provider translates OpenAI-format requests to the Anthropic Messages API and injects the API key via the x-api-key header - consumers still send standard OpenAI-format requests to the gateway.

Note

On RHOAI 3.4, the anthropic BBR provider must handle path rewriting internally (there is no path field on the ExternalModel CRD). This has not been validated on 3.4 - if inference returns errors, upgrade to RHOAI 3.5+ where the path field explicitly sets /v1/messages.

Warning

Clients must use the OpenAI-compatible endpoint (/v1/chat/completions) when sending requests through the MaaS gateway. The Anthropic-native Messages API endpoint (/v1/messages) is not supported for token counting or rate limiting (RHOAIENG-93984). Tools like Claude Code that default to Anthropic’s native API format need to be configured for OpenAI-compatible mode. The ExternalModel flow documented below routes through /v1/chat/completions and handles this correctly - the BBR translates to Anthropic format upstream.

Prerequisites

Get an API key from the Anthropic Console (Account Settings > API keys).

Tip

Verify the key works before deploying: curl -s "https://api.anthropic.com/v1/messages" -H "x-api-key: $ANTHROPIC_API_KEY" -H "anthropic-version: 2023-06-01" -H "Content-Type: application/json" -d '{"model":"claude-haiku-4-5-20251001","max_tokens":5,"messages":[{"role":"user","content":"Hi"}]}' | python3 -m json.tool

Manual Deployment

Create the namespace if it does not already exist (shared with other external model providers):

oc apply -f manifests/08-external-models/anthropic/namespace.yaml

Create the credential Secret (never stored in manifests):

RHAIE Version: 3.5, 3.6

oc create secret generic anthropic-api-key \
    --from-literal=api-key="$ANTHROPIC_API_KEY" \
    -n external-models \
    --dry-run=client -o yaml | oc apply -f -

oc label secret anthropic-api-key -n external-models \
    inference.llm-d.ai/ipp-managed=true --overwrite

RHAIE Version: 3.4

oc create secret generic anthropic-api-key \
    --from-literal=api-key="$ANTHROPIC_API_KEY" \
    -n external-models \
    --dry-run=client -o yaml | oc apply -f -

oc label secret anthropic-api-key -n external-models \
    inference.networking.k8s.io/bbr-managed=true --overwrite

Apply the external model and MaaS governance resources:

RHAIE Version: 3.5, 3.6

oc apply -k manifests/08-external-models/anthropic/model/
oc apply -k manifests/08-external-models/anthropic/maas/

The ExternalProvider and ExternalModel CRs:

apiVersion: inference.opendatahub.io/v1alpha1
kind: ExternalProvider
metadata:
  name: anthropic
  namespace: external-models
spec:
  provider: anthropic
  endpoint: api.anthropic.com
  auth:
    type: apikey
    secretRef:
      name: anthropic-api-key
---
apiVersion: inference.opendatahub.io/v1alpha1
kind: ExternalModel
metadata:
  name: claude-haiku-4-5
  namespace: external-models
spec:
  modelName: claude-haiku-4-5
  externalProviderRefs:
    - ref:
        name: anthropic
      targetModel: claude-haiku-4-5-20251001
      apiFormat: openai-chat
      path: /v1/messages

RHAIE Version: 3.4

oc apply -f manifests/08-external-models/anthropic/model/external-model-34.yaml
oc apply -k manifests/08-external-models/anthropic/maas/

The ExternalModel CR:

apiVersion: maas.opendatahub.io/v1alpha1
kind: ExternalModel
metadata:
  name: claude-haiku-4-5
  namespace: external-models
spec:
  provider: anthropic
  targetModel: claude-haiku-4-5-20251001
  endpoint: api.anthropic.com
  credentialRef:
    name: anthropic-api-key

Verify the model reaches Ready:

oc get maasmodelref claude-haiku-4-5 -n external-models
# Expected: PHASE = Ready

Test inference:

MAAS_GW="https://maas.$(oc get ingresses.config/cluster -o jsonpath='{.spec.domain}')"

API_KEY=$(curl -sk -X POST "${MAAS_GW}/maas-api/v1/api-keys" \
    -H "Authorization: Bearer $(oc whoami -t)" \
    -H "Content-Type: application/json" \
    -d '{"name": "anthropic-test", "subscription": "anthropic-free", "expiresIn": "1h"}' \
    | python3 -c "import sys,json; print(json.load(sys.stdin)['key'])")

curl -sk "${MAAS_GW}/v1/chat/completions" \
    -H "Authorization: Bearer ${API_KEY}" \
    -H "Content-Type: application/json" \
    -d '{"model": "claude-haiku-4-5", "messages": [{"role": "user", "content": "Say hello in 3 words."}], "max_tokens": 20}'

Automated Deployment

./scripts/setup-maas.sh --from-phase 8 \
    --with-external-models \
    --external-model-provider anthropic \
    --external-model-api-key "$ANTHROPIC_API_KEY"

AWS Bedrock

Manifests for AWS Bedrock (openai.gpt-oss-20b via the Mantle endpoint) are included under manifests/08-external-models/bedrock/. Bedrock uses the bedrock-openai provider, which routes through the OpenAI-compatible Mantle API - no request body translation is needed.

Warning

Use bedrock-mantle.<region>.api.aws, not bedrock-runtime.<region>.amazonaws.com. The BBR translator uses /v1/chat/completions, which is only available on the Mantle endpoint. Using bedrock-runtime will result in 404 errors.

Prerequisites

Bedrock requires a Bedrock API Key (ABSK key), not standard AWS access keys. Create one via IAM service-specific credentials:

# Create an IAM user for Bedrock API access
aws iam create-user --user-name bedrock-api-user

# Attach Bedrock access policy
aws iam attach-user-policy \
    --user-name bedrock-api-user \
    --policy-arn arn:aws:iam::aws:policy/AmazonBedrockLimitedAccess

# Generate a long-term ABSK key (up to 90 days)
aws iam create-service-specific-credential \
    --user-name bedrock-api-user \
    --service-name bedrock.amazonaws.com \
    --credential-age-days 90

The output contains a ServiceSpecificCredential.ServicePassword field starting with ABSK - this is the API key to use.

Tip

Verify the ABSK key works before deploying: curl -s "https://bedrock-mantle.us-east-2.api.aws/v1/models" -H "Authorization: Bearer $BEDROCK_API_KEY" | python3 -m json.tool

Manual Deployment

Create the namespace if it does not already exist (shared with other external model providers):

oc apply -f manifests/08-external-models/bedrock/namespace.yaml

Create the credential Secret (never stored in manifests):

RHAIE Version: 3.5, 3.6

oc create secret generic bedrock-api-key \
    --from-literal=api-key="$BEDROCK_API_KEY" \
    -n external-models \
    --dry-run=client -o yaml | oc apply -f -

oc label secret bedrock-api-key -n external-models \
    inference.llm-d.ai/ipp-managed=true --overwrite

RHAIE Version: 3.4

oc create secret generic bedrock-api-key \
    --from-literal=api-key="$BEDROCK_API_KEY" \
    -n external-models \
    --dry-run=client -o yaml | oc apply -f -

oc label secret bedrock-api-key -n external-models \
    inference.networking.k8s.io/bbr-managed=true --overwrite

Apply the external model and MaaS governance resources:

RHAIE Version: 3.5, 3.6

oc apply -k manifests/08-external-models/bedrock/model/
oc apply -k manifests/08-external-models/bedrock/maas/

The ExternalProvider and ExternalModel CRs:

apiVersion: inference.opendatahub.io/v1alpha1
kind: ExternalProvider
metadata:
  name: bedrock
  namespace: external-models
spec:
  provider: bedrock-openai
  endpoint: bedrock-mantle.us-east-2.api.aws
  auth:
    type: apikey
    secretRef:
      name: bedrock-api-key
---
apiVersion: inference.opendatahub.io/v1alpha1
kind: ExternalModel
metadata:
  name: aws-gpt-oss-20b
  namespace: external-models
spec:
  modelName: openai.gpt-oss-20b
  externalProviderRefs:
    - ref:
        name: bedrock
      targetModel: openai.gpt-oss-20b
      apiFormat: openai-chat
      path: /v1/chat/completions

RHAIE Version: 3.4

oc apply -f manifests/08-external-models/bedrock/model/external-model-34.yaml
oc apply -k manifests/08-external-models/bedrock/maas/

The ExternalModel CR:

apiVersion: maas.opendatahub.io/v1alpha1
kind: ExternalModel
metadata:
  name: aws-gpt-oss-20b
  namespace: external-models
spec:
  provider: bedrock-openai
  targetModel: openai.gpt-oss-20b
  endpoint: bedrock-mantle.us-east-2.api.aws
  credentialRef:
    name: bedrock-api-key
Note

The endpoint must match your AWS region. Replace us-east-2 with your region if different.

Verify the model reaches Ready:

oc get maasmodelref aws-gpt-oss-20b -n external-models
# Expected: PHASE = Ready

Test inference:

MAAS_GW="https://maas.$(oc get ingresses.config/cluster -o jsonpath='{.spec.domain}')"

API_KEY=$(curl -sk -X POST "${MAAS_GW}/maas-api/v1/api-keys" \
    -H "Authorization: Bearer $(oc whoami -t)" \
    -H "Content-Type: application/json" \
    -d '{"name": "bedrock-test", "subscription": "bedrock-free", "expiresIn": "1h"}' \
    | python3 -c "import sys,json; print(json.load(sys.stdin)['key'])")

curl -sk "${MAAS_GW}/v1/chat/completions" \
    -H "Authorization: Bearer ${API_KEY}" \
    -H "Content-Type: application/json" \
    -d '{"model": "aws-gpt-oss-20b", "messages": [{"role": "user", "content": "Say hello in 3 words."}], "max_tokens": 20}'

Automated Deployment

./scripts/setup-maas.sh --from-phase 8 \
    --with-external-models \
    --external-model-provider bedrock \
    --external-model-api-key "$BEDROCK_API_KEY"

Azure OpenAI

Manifests for Azure OpenAI (gpt-4.1-mini deployment) are included under manifests/08-external-models/azure-openai/. The BBR azure-openai provider routes requests through Azure’s OpenAI Service - consumers send standard OpenAI-format requests to the gateway and the BBR handles Azure-specific path construction and API key injection via the api-key header.

Note

On RHOAI 3.4, the azure-openai BBR provider must handle Azure path rewriting internally (there is no path field on the ExternalModel CRD). This has not been validated on 3.4 - if inference returns errors, upgrade to RHOAI 3.5+ where the path field explicitly sets the Azure deployment path.

Warning

The endpoint in the ExternalProvider manifest must match your Azure OpenAI resource. Replace <your-resource>.openai.azure.com with your actual resource hostname (e.g., myresource.openai.azure.com). Similarly, the path in the ExternalModel must match your deployment name and API version.

Prerequisites

You need an Azure OpenAI resource with a deployed model. Create one via the Azure Portal or the Azure CLI:

# Create an Azure OpenAI resource
az cognitiveservices account create \
    --name <your-resource-name> \
    --resource-group <your-resource-group> \
    --kind OpenAI \
    --sku S0 \
    --location eastus2

# Deploy gpt-4.1-mini
az cognitiveservices account deployment create \
    --name <your-resource-name> \
    --resource-group <your-resource-group> \
    --deployment-name gpt-4-1-mini \
    --model-name gpt-4.1-mini \
    --model-version "2025-04-14" \
    --model-format OpenAI \
    --sku-capacity 10 \
    --sku-name GlobalStandard

Get the API key from the Azure Portal (Resource > Keys and Endpoint) or via CLI:

export AZURE_OPENAI_API_KEY=$(az cognitiveservices account keys list \
    --name <your-resource-name> \
    --resource-group <your-resource-group> \
    --query key1 -o tsv)
Tip

Verify the key works before deploying: curl -s "https://<your-resource>.openai.azure.com/openai/deployments/gpt-4-1-mini/chat/completions?api-version=2025-04-01-preview" -H "api-key: $AZURE_OPENAI_API_KEY" -H "Content-Type: application/json" -d '{"messages":[{"role":"user","content":"Hi"}],"max_tokens":5}' | python3 -m json.tool

Manual Deployment

Create the namespace if it does not already exist (shared with other external model providers):

oc apply -f manifests/08-external-models/azure-openai/namespace.yaml

Create the credential Secret (never stored in manifests):

RHAIE Version: 3.5, 3.6

oc create secret generic azure-openai-api-key \
    --from-literal=api-key="$AZURE_OPENAI_API_KEY" \
    -n external-models \
    --dry-run=client -o yaml | oc apply -f -

oc label secret azure-openai-api-key -n external-models \
    inference.llm-d.ai/ipp-managed=true --overwrite

RHAIE Version: 3.4

oc create secret generic azure-openai-api-key \
    --from-literal=api-key="$AZURE_OPENAI_API_KEY" \
    -n external-models \
    --dry-run=client -o yaml | oc apply -f -

oc label secret azure-openai-api-key -n external-models \
    inference.networking.k8s.io/bbr-managed=true --overwrite

Apply the external model and MaaS governance resources:

RHAIE Version: 3.5, 3.6

oc apply -k manifests/08-external-models/azure-openai/model/
oc apply -k manifests/08-external-models/azure-openai/maas/

The ExternalProvider and ExternalModel CRs:

apiVersion: inference.opendatahub.io/v1alpha1
kind: ExternalProvider
metadata:
  name: azure-openai
  namespace: external-models
spec:
  provider: azure-openai
  endpoint: <your-resource>.openai.azure.com
  auth:
    type: apikey
    secretRef:
      name: azure-openai-api-key
---
apiVersion: inference.opendatahub.io/v1alpha1
kind: ExternalModel
metadata:
  name: azure-gpt-4-1-mini
  namespace: external-models
spec:
  modelName: azure-gpt-4-1-mini
  externalProviderRefs:
    - ref:
        name: azure-openai
      targetModel: gpt-4-1-mini
      apiFormat: openai-chat
      path: /openai/deployments/gpt-4-1-mini/chat/completions?api-version=2025-04-01-preview

RHAIE Version: 3.4

oc apply -f manifests/08-external-models/azure-openai/model/external-model-34.yaml
oc apply -k manifests/08-external-models/azure-openai/maas/

The ExternalModel CR:

apiVersion: maas.opendatahub.io/v1alpha1
kind: ExternalModel
metadata:
  name: azure-gpt-4-1-mini
  namespace: external-models
spec:
  provider: azure-openai
  targetModel: gpt-4-1-mini
  endpoint: <your-resource>.openai.azure.com
  credentialRef:
    name: azure-openai-api-key

Verify the model reaches Ready:

oc get maasmodelref azure-gpt-4-1-mini -n external-models
# Expected: PHASE = Ready

Test inference:

MAAS_GW="https://maas.$(oc get ingresses.config/cluster -o jsonpath='{.spec.domain}')"

API_KEY=$(curl -sk -X POST "${MAAS_GW}/maas-api/v1/api-keys" \
    -H "Authorization: Bearer $(oc whoami -t)" \
    -H "Content-Type: application/json" \
    -d '{"name": "azure-openai-test", "subscription": "azure-openai-free", "expiresIn": "1h"}' \
    | python3 -c "import sys,json; print(json.load(sys.stdin)['key'])")

curl -sk "${MAAS_GW}/v1/chat/completions" \
    -H "Authorization: Bearer ${API_KEY}" \
    -H "Content-Type: application/json" \
    -d '{"model": "azure-gpt-4-1-mini", "messages": [{"role": "user", "content": "Say hello in 3 words."}], "max_tokens": 20}'

Automated Deployment

./scripts/setup-maas.sh --from-phase 8 \
    --with-external-models \
    --external-model-provider azure-openai \
    --external-model-api-key "$AZURE_OPENAI_API_KEY"

HTTP Proxy

Some clusters cannot reach the internet directly and are only allowed to leave through a corporate HTTP/HTTPS proxy. This is common in regulated environments: the OpenShift nodes have no route to *.openai.azure.com, but a proxy that accepts CONNECT does.

External models still work in this setup, but not through any proxy setting on MaaS. This section explains why, and shows the pattern that does work, using Azure OpenAI as the example.

Note

Validated on RHOAI 3.5.2, OCP 4.21, Envoy 1.35.10 (OSSM 3.x gateway). The same pattern applies to any external provider, only the hostname changes.

Why there is no proxy setting

The gateway Envoy is the process that opens the connection to the provider. Nothing in that path reads proxy configuration:

  • HTTP_PROXY/HTTPS_PROXY do nothing. Envoy does not read these environment variables, and the cluster-wide Proxy CR (oc get proxy/cluster) only injects them into pods that honour them. The gateway is not one of them.
  • DestinationRule trafficPolicy.tunnel cannot be used. Istio does have native CONNECT support, but the API states it applies to TCP or TLS routes and cannot be applied to HTTP routes. The external provider reconciler always generates the ServiceEntry with protocol: HTTPS (or HTTP), which is an HTTP route, so tunnel never takes effect.
  • An EnvoyFilter using http_11_proxy does not work on this Envoy. On Envoy 1.35 the proxy address must come from per-endpoint typed_filter_metadata, and EnvoyFilter MERGE appends repeated fields instead of annotating the generated endpoint, so you cannot attach it to the STRICT_DNS cluster Istio builds. The other code path, which takes the address from filter state, is only reachable from compiled-in C++ filters: Http11ProxyInfoFilterState has no object factory, so set_filter_state cannot populate it. Envoy also documents that extension as having an “unknown security posture”.
  • The maas.opendatahub.io/tls and maas.opendatahub.io/port annotations are RHOAI 3.4 only. On 3.5 the resources are created by ipp-external-provider-reconciler, which ignores them. Annotating the ExternalProvider leaves the ServiceEntry on HTTPS/443 with the DestinationRule still in place.
Warning

Do not spend time on http_11_proxy EnvoyFilters. It is the suggestion most AI assistants give for this problem and it cannot be made to work against a reconciler-generated cluster on RHOAI 3.5.

How it works

Instead of teaching the gateway about the proxy, put a small TCP tunnel in front of the proxy and point the mesh at it:

MaaS gateway  --TLS-->  egress-tunnel  --CONNECT-->  corporate proxy  ----->  Azure OpenAI
(openshift-ingress)     (egress-proxy)                                        (TLS ends here)

The tunnel accepts the raw TCP that the gateway was going to send to Azure, issues CONNECT <provider>:443 to the proxy, and splices the bytes through. The important consequence is that TLS is terminated by Azure, not by the tunnel: SNI, certificate validation and the api-key header injected by IPP all stay end-to-end, and the proxy only sees an opaque tunnel.

It also sends CONNECT with a hostname, so the proxy does the DNS resolution. That matters because the generated ServiceEntry is resolution: DNS: if your cluster cannot resolve *.openai.azure.com, the Envoy cluster gets zero endpoints and returns 503 before the proxy is ever contacted.

The tunnel is Envoy’s tcp_proxy with tunneling_config, a stable documented feature, and it reuses the istio-proxyv2 image your gateway already runs, so there is no extra image to mirror and no anyuid grant needed.

Prerequisites

Azure OpenAI already working through MaaS as described in Azure OpenAI. Get that green first with direct egress if you can, so that a later failure is clearly the proxy and not the provider.

You also need a proxy that accepts CONNECT to the provider hostname on port 443. If you do not have one, or you only want to try this out, the manifests include a lab proxy and Step 1 deploys it for you.

Step 1: Deploy the proxy

Pick one of the two paths.

You already have a corporate proxy. Write down its host and port, you need them in Step 2, and remove the lab proxy from the kustomization so you do not end up with a second proxy in the cluster:

# edit manifests/08-external-models/http-proxy/kustomization.yaml
# and delete the "- forward-proxy.yaml" line
Important

Removing the file from the kustomization does not remove anything that is already running. oc apply -k does not prune. If you tried the lab path before switching to your real proxy, delete the lab proxy explicitly, otherwise it stays in the cluster as an open proxy:

oc delete deploy/egress-proxy svc/egress-proxy cm/egress-proxy-config \
    -n egress-proxy --ignore-not-found

Ask the proxy owners to allow CONNECT to your provider hostname on 443. Then go to Step 2.

You do not have a proxy and want to test. Keep forward-proxy.yaml and deploy it. It is an Envoy that terminates CONNECT and logs every tunnel, which is what makes the rest of this section verifiable:

oc apply -k manifests/08-external-models/http-proxy/
oc rollout status deploy/egress-proxy -n egress-proxy
Note

This same command also deploys the tunnel, because both live in one kustomization. That is fine, the tunnel is configured in Step 2 and restarted there.

Before wiring anything to it, check the proxy on its own. This is the step that tells you whether a later failure is the proxy or the MaaS side, so do not skip it:

oc run proxytest -n egress-proxy --rm -i --restart=Never \
    --image=registry.access.redhat.com/ubi9/ubi-minimal:latest --command -- \
    curl -sS -o /dev/null -w "http=%{http_code}\n" --max-time 30 \
    -x http://egress-proxy:3128 \
    -H "Content-Type: application/json" \
    -d '{"messages":[{"role":"user","content":"hi"}],"max_tokens":5}' \
    "https://<your-resource>.openai.azure.com/openai/deployments/gpt-4-1-mini/chat/completions?api-version=2025-04-01-preview"

You want http=401. That looks like a failure but it is the result you need: 401 comes from Azure itself, so the CONNECT tunnel opened and TLS completed, and the only thing missing is the API key, which the gateway adds later. A timeout or http=000 instead means the proxy is not reachable.

Tip

oc run prints PodSecurity warnings about the throwaway pod. They are harmless, the pod still runs.

The proxy log should show the tunnel for that request:

oc logs -n egress-proxy deploy/egress-proxy --tail=5 | grep PROXY
PROXY method=CONNECT authority=maas-aoai-kfhjq.openai.azure.com:443 upstream=20.232.91.78:443 code=200 flags=DC dur=7

That authority is exactly what a real corporate proxy has to allow-list.

Step 2: Configure and deploy the tunnel

The tunnel ships with the values from the test environment, so it is pointing at the wrong provider until you edit it. Open manifests/08-external-models/http-proxy/egress-tunnel.yaml and set three things:

  • tunneling_config.hostname - your own Azure OpenAI resource, for example my-resource.openai.azure.com:443.
  • the corporate_proxy cluster address - the proxy host and port from Step 1. Leave it as the in-cluster Service (egress-proxy.egress-proxy.svc.cluster.local:3128) if you deployed the lab proxy.
  • image - the image your gateway already runs, so there is nothing extra to pull or mirror:
oc get pod -n openshift-ingress \
    -l gateway.networking.k8s.io/gateway-name=maas-default-gateway \
    -o jsonpath='{.items[0].spec.containers[?(@.name=="istio-proxy")].image}'

Apply your edits and restart the tunnel:

oc apply -k manifests/08-external-models/http-proxy/
oc rollout restart deploy/egress-tunnel -n egress-proxy
oc rollout status deploy/egress-tunnel -n egress-proxy
Important

The restart is not optional. Envoy reads this static configuration once at start-up, so oc apply alone updates the ConfigMap while the running pod keeps the old settings. If Step 1 already started the tunnel with the shipped values, only the restart picks up yours. The same applies any time you change the hostname or the proxy address later.

Both pods should be running:

oc get pods -n egress-proxy

Step 3: Point the ServiceEntry at the tunnel

The reconciler creates the ServiceEntry with resolution: DNS, which sends the gateway straight to the internet. Switch it to STATIC so it resolves to the tunnel instead:

TUNNEL_IP=$(oc get svc egress-tunnel -n egress-proxy -o jsonpath='{.spec.clusterIP}')

oc patch serviceentry azure-openai -n external-models --type=merge \
    -p "{\"spec\":{\"resolution\":\"STATIC\",\"endpoints\":[{\"address\":\"${TUNNEL_IP}\"}]}}"

Nothing else changes. The ExternalProvider keeps the real Azure FQDN, so the Host header, SNI and certificate check stay correct.

oc get serviceentry azure-openai -n external-models -o jsonpath='{.spec}' | python3 -m json.tool
Warning

This ServiceEntry is owned by ipp-external-provider-reconciler. The edit survives a restart of ai-gateway-operator and maas-controller (verified), because the reconciler creates the resource but does not correct drift. It is still an unmanaged change: re-check it after an RHOAI upgrade, and expect to re-apply it if you delete and recreate the ExternalProvider.

Step 4: Verify

MAAS_GW="https://$(oc get route maas-default-gateway -n openshift-ingress -o jsonpath='{.spec.host}' 2>/dev/null || echo "maas.$(oc get ingress.config cluster -o jsonpath='{.spec.domain}')")"

API_KEY=$(curl -sk -X POST "${MAAS_GW}/maas-api/v1/api-keys" \
    -H "Authorization: Bearer $(oc whoami -t)" \
    -H "Content-Type: application/json" \
    -d '{"name": "proxy-test", "subscription": "azure-openai-free", "expiresIn": "1h", "ephemeral": true}' \
    | python3 -c "import sys,json; print(json.load(sys.stdin)['key'])")

curl -sk "${MAAS_GW}/v1/chat/completions" \
    -H "Authorization: Bearer ${API_KEY}" \
    -H "Content-Type: application/json" \
    -d '{"model": "azure-gpt-4-1-mini", "messages": [{"role": "user", "content": "Reply with exactly: PROXY OK"}], "max_tokens": 10}'

Then confirm the traffic really went through the proxy:

oc logs -n egress-proxy deploy/egress-tunnel --tail=5 | grep TUNNEL
oc logs -n egress-proxy deploy/egress-proxy  --tail=5 | grep PROXY

You should see the gateway pod IP arriving at the tunnel, and a CONNECT for your provider hostname in the proxy log:

TUNNEL downstream=10.232.0.2:43124 proxy=172.231.175.184:3128 flags=- dur=22
PROXY method=CONNECT authority=maas-aoai-kfhjq.openai.azure.com:443 upstream=20.232.91.137:443 code=200 flags=DC dur=13

Prove there is no direct-egress fallback by breaking the path on purpose. If you deployed the lab proxy, scale it to zero:

oc scale deploy/egress-proxy -n egress-proxy --replicas=0

Inference must then fail with HTTP 503 and TLS_error ... Connection reset by peer. With a real corporate proxy you cannot scale it, so stop the tunnel instead, which fails with HTTP 500:

oc scale deploy/egress-tunnel -n egress-proxy --replicas=0

Scale whichever you stopped back to 1 and inference recovers.

Important

The exact status does not matter, the failure does. If inference still returns 200 while the proxy or the tunnel is down, the gateway is still reaching the provider directly, which means the ServiceEntry patch in Step 3 did not take effect and nothing you tested so far went through the proxy.

Using a real corporate proxy

Proxy requires authentication. Envoy’s tunneling_config can add headers to the CONNECT request, so Basic auth works by adding to the tcp_proxy config:

tunneling_config:
  hostname: "maas-aoai-kfhjq.openai.azure.com:443"
  headers_to_add:
    - header:
        key: "Proxy-Authorization"
        value: "Basic <base64 of user:password>"

Keep that value in a Secret and mount it rather than committing it in the ConfigMap.

Proxy inspects TLS (MITM). This pattern deliberately does not terminate TLS, so an inspecting proxy breaks certificate validation at the gateway. Either allow-list the provider hostname for pass-through on the proxy, which is the usual answer, or add the proxy’s CA to the gateway trust bundle. Pass-through is strongly preferred: the api-key is in those requests.

Proxy only allows certain destinations. Ask for CONNECT to the provider hostname on 443. The lab proxy logs show exactly what to allow-list.

More than one provider. tunneling_config.hostname is a single fixed destination, so deploy one tunnel Deployment and Service per external provider and patch each ServiceEntry to its own tunnel IP.

Caveats

  • One tunnel per provider, as above.
  • The tunnel is a single replica in these manifests. Raise replicas for anything beyond a demo, it holds no state.
  • The ServiceEntry edit is unmanaged, see the warning in Step 3.
  • Nothing changes for consumers. API keys, AuthPolicy, and token rate limiting keep working exactly as before, because only the egress leg moved.

Known Issues

Gemini path incompatibility - RHOAI 3.4 only (RHOAIENG-68592)

On RHOAI 3.4, the BBR openai provider hardcodes the upstream path to /v1/chat/completions, but Gemini requires /v1beta/openai/chat/completions. Inference requests return HTTP 404 from Google’s API. Tracked in RHOAIENG-68592.

Resolved in RHOAI 3.5+: the ExternalModel CRD includes a path field in externalProviderRefs that overrides the upstream path. The Gemini manifest sets path: /v1beta/openai/chat/completions, and inference works end-to-end.

WASM auth timeout under load - HTTP 500 (RHOAIENG-71638)

External model calls through the gateway can return HTTP 500 under concurrent load even though the model backend is healthy. The signature: a 23-byte error body, an empty upstream host in the gateway access log, and a response time close to 200ms. This means the Kuadrant WASM plugin timed out waiting for Authorino to authorize the request (default: 200ms, failureMode: deny).

The fix is to increase AUTH_SERVICE_TIMEOUT on the RHCL operator Subscription. See Issue 7: WASM Auth Timeout Under Load in the troubleshooting guide for diagnosis steps and the workaround.

Anthropic Messages API - no token counting or rate limiting (RHOAIENG-93984)

The MaaS TokenRateLimitPolicy only supports the OpenAI-compatible /v1/chat/completions endpoint. Requests sent directly to /v1/messages (the Anthropic Messages API) bypass token counting and rate limiting entirely - usage is not tracked and rate limits are not enforced. Tracked in RHOAIENG-93984.

This affects clients that use Anthropic’s native API format (e.g., Claude Code with default settings). To ensure token counting works, clients must send requests to /v1/chat/completions through the MaaS gateway. The BBR anthropic provider handles the translation to the Anthropic Messages API upstream.

The upstream fix is tracked in Kuadrant/kuadrant-operator#1654.

Appendix

Directory Structure

manifests/08-external-models/
  openai/
    kustomization.yaml           # Top-level: namespace + model + maas
    namespace.yaml               # external-models namespace
    model/
      kustomization.yaml         # References 3.5+ manifests (ExternalProvider + ExternalModel)
      external-provider.yaml     # ExternalProvider CR (3.5+)
      external-model.yaml        # ExternalModel CR (3.5+, references provider)
      external-model-34.yaml     # ExternalModel CR (3.4, standalone with credentialRef)
    maas/
      kustomization.yaml
      maas-model.yaml            # MaaSModelRef
      maas-auth-policy.yaml      # MaaSAuthPolicy (system:authenticated)
      maas-subscription.yaml     # MaaSSubscription (10k tokens/hour)
  gemini/
    kustomization.yaml
    namespace.yaml
    model/
      kustomization.yaml
      external-provider.yaml     # ExternalProvider CR (3.5+)
      external-model.yaml        # ExternalModel CR (3.5+)
      external-model-34.yaml     # ExternalModel CR (3.4)
    maas/
      kustomization.yaml
      maas-model.yaml
      maas-auth-policy.yaml
      maas-subscription.yaml
  bedrock/
    kustomization.yaml
    namespace.yaml
    model/
      kustomization.yaml
      external-provider.yaml     # ExternalProvider CR (3.5+)
      external-model.yaml        # ExternalModel CR (3.5+)
      external-model-34.yaml     # ExternalModel CR (3.4)
    maas/
      kustomization.yaml
      maas-model.yaml
      maas-auth-policy.yaml
      maas-subscription.yaml
  anthropic/
    kustomization.yaml
    namespace.yaml
    model/
      kustomization.yaml
      external-provider.yaml     # ExternalProvider CR (3.5+)
      external-model.yaml        # ExternalModel CR (3.5+)
      external-model-34.yaml     # ExternalModel CR (3.4)
    maas/
      kustomization.yaml
      maas-model.yaml
      maas-auth-policy.yaml
      maas-subscription.yaml
  azure-openai/
    kustomization.yaml
    namespace.yaml
    model/
      kustomization.yaml
      external-provider.yaml     # ExternalProvider CR (3.5+)
      external-model.yaml        # ExternalModel CR (3.5+)
      external-model-34.yaml     # ExternalModel CR (3.4)
    maas/
      kustomization.yaml
      maas-model.yaml
      maas-auth-policy.yaml
      maas-subscription.yaml
  http-proxy/
    kustomization.yaml           # namespace + lab proxy + tunnel
    namespace.yaml               # egress-proxy namespace
    forward-proxy.yaml           # LAB ONLY: simulated corporate proxy (CONNECT)
    egress-tunnel.yaml           # TCP tunnel that CONNECTs through the proxy

Supported Providers

The provider field in the ExternalModel spec maps to a BBR payload translator. Currently supported values:

  • openai - OpenAI API (api.openai.com)
  • anthropic - Anthropic API (api.anthropic.com)
  • azure-openai - Azure OpenAI Service
  • bedrock-openai - AWS Bedrock (OpenAI-compatible)

References

Next step

Proceed to Architecture & Request Flow.

7 - Phase 9: External OIDC Authentication (Optional)

Integrate MaaS authentication with corporate OIDC identity providers like Keycloak, Okta, or Azure AD so users can access MaaS with their corporate credentials.
Note

This phase requires a completed MaaS installation (through Phase 4) and at least one model deployed (Phase 5) to verify the OIDC flow end-to-end.

By default, MaaS authenticates users via OpenShift tokens (TokenReview). External OIDC lets you integrate with identity providers like Keycloak, Okta, or Azure AD so users can access MaaS with their corporate credentials - no OpenShift accounts needed.

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.

How It Works

MaaS uses a two-tier authentication model with external OIDC:

  1. Platform API access - Users get an OIDC token from the identity provider and use it as a Bearer token to call the MaaS API (list models, create API keys, manage subscriptions).

  2. Model inference - Users create an API key through the MaaS API using their OIDC token. The API key is then used for inference requests (/v1/chat/completions). API keys capture the user’s group memberships at creation time.

Group-based access control works through OIDC token claims:

  1. The OIDC provider defines user groups (e.g., data-scientists, ml-engineers)
  2. The OIDC token includes a groups claim with the user’s group memberships
  3. MaaS subscriptions and authorization policies reference these group names
  4. MaaS validates group memberships directly from the OIDC token - no OpenShift group sync needed
Note

Group names in MaaS subscriptions must match the group names in the OIDC token groups claim exactly.

Important

When using external OIDC, users create API keys through the MaaS API using curl or other HTTP clients. The Red Hat OpenShift AI dashboard uses OpenShift OAuth and does not support API key creation for external OIDC users.

Automated Setup

To deploy Keycloak, configure OIDC, and run verification in one go:

# Deploy Keycloak + configure MaaS for OIDC
./manifests/09-external-oidc/setup-keycloak.sh

# Verify the OIDC flow
./manifests/09-external-oidc/test-external-oidc.sh

To tear everything down:

./manifests/09-external-oidc/setup-keycloak.sh --cleanup

The rest of this page walks through each step manually.

Step 1: Deploy Keycloak

This section deploys Red Hat Build of Keycloak (RHBK) as the OIDC provider. If you already have an external identity provider, skip to Step 3.

Install the RHBK operator

oc create namespace maas-keycloak --dry-run=client -o yaml | oc apply -f -
oc apply -k manifests/09-external-oidc/keycloak/operator/

Wait for the operator to install:

# Watch until PHASE shows "Succeeded"
oc get csv -n maas-keycloak -w

Deploy Keycloak and PostgreSQL

oc apply -k manifests/09-external-oidc/keycloak/instance/

This creates:

  • A PostgreSQL database for Keycloak storage
  • A Keycloak instance connected to PostgreSQL
  • A KeycloakRealmImport that creates the maas realm with test users and groups

Set the Keycloak hostname. Without it, the RHBK operator creates a host-less Ingress that OpenShift cannot convert into a Route, and Step 2 will find no route:

CLUSTER_DOMAIN=$(oc get ingresses.config/cluster -o jsonpath='{.spec.domain}')
KEYCLOAK_HOSTNAME="keycloak-maas-keycloak.${CLUSTER_DOMAIN}"

oc patch keycloak keycloak -n maas-keycloak --type merge \
    -p "{\"spec\": {\"hostname\": {\"hostname\": \"${KEYCLOAK_HOSTNAME}\", \"strict\": false, \"strictBackchannel\": false}}}"

Wait for Keycloak to be ready:

# Wait for PostgreSQL
oc rollout status deployment/keycloak-pgsql -n maas-keycloak --timeout=120s

# Wait for Keycloak (check Ready condition)
oc get keycloak keycloak -n maas-keycloak -w

The READY column should show True. Then check the realm import:

oc get keycloakrealmimport maas -n maas-keycloak \
    -o jsonpath='{.status.conditions[?(@.type=="Done")].status}'

Should return True.

Step 2: Discover the Keycloak Issuer URL

Get the Keycloak route hostname and construct the issuer URL:

KEYCLOAK_HOST=$(oc get route -n maas-keycloak -o jsonpath='{.items[0].spec.host}')
KEYCLOAK_ISSUER="https://${KEYCLOAK_HOST}/realms/maas"
echo "Issuer URL: ${KEYCLOAK_ISSUER}"

Verify the OIDC discovery endpoint is accessible:

curl -sSk "${KEYCLOAK_ISSUER}/.well-known/openid-configuration" | jq .

You should see a JSON document with issuer, authorization_endpoint, token_endpoint, and other OIDC metadata.

Test users and groups

The imported realm includes two test users:

UsernamePasswordGroups
maas-usermaas-userdata-scientists, ml-engineers
restricted-userrestricted-userdata-scientists

You can verify the groups claim by getting a token:

# Get a token for maas-user
TOKEN=$(curl -sSk -X POST "${KEYCLOAK_ISSUER}/protocol/openid-connect/token" \
    -d "grant_type=password" \
    -d "client_id=maas-oidc" \
    -d "username=maas-user" \
    -d "password=maas-user" \
    -d "scope=openid groups" | jq -r '.access_token')

# Decode the JWT payload and check groups
echo "$TOKEN" | cut -d. -f2 | base64 -d 2>/dev/null | jq '{groups, preferred_username}'

Expected output:

{
  "groups": [
    "data-scientists",
    "ml-engineers"
  ],
  "preferred_username": "maas-user"
}

Step 3: Configure MaaS for External OIDC

Patch the MaaS tenant resource with the OIDC provider configuration:

RHAIE Version: 3.5, 3.6

oc patch aitenants.maas.opendatahub.io models-as-a-service -n ai-tenants \
    --type merge \
    -p "{\"spec\": {\"oidc\": {\"clientId\": \"maas-oidc\", \"issuerUrl\": \"${KEYCLOAK_ISSUER}\", \"ttl\": 300}}}"

Verify the patch was applied:

oc get aitenant models-as-a-service -n ai-tenants -o jsonpath='{.spec.oidc}' | jq .

Expected output:

{
  "clientId": "maas-oidc",
  "issuerUrl": "https://keycloak-maas-keycloak.apps.<cluster-domain>/realms/maas",
  "ttl": 300
}

The fields:

  • clientId - The Keycloak client ID registered for MaaS (maas-oidc)
  • issuerUrl - The OIDC issuer URL. MaaS fetches JWKS keys from <issuerUrl>/.well-known/openid-configuration to verify token signatures
  • ttl - How long (seconds) MaaS caches the OIDC provider’s signing keys before refreshing (default: 300, minimum: 30)

RHAIE Version: 3.4

oc patch tenants.maas.opendatahub.io default-tenant -n models-as-a-service \
    --type merge \
    -p "{\"spec\": {\"externalOIDC\": {\"clientId\": \"maas-oidc\", \"issuerUrl\": \"${KEYCLOAK_ISSUER}\"}}}"

Verify the patch was applied:

oc get tenant default-tenant -n models-as-a-service -o jsonpath='{.spec.externalOIDC}' | jq .

Expected output:

{
  "clientId": "maas-oidc",
  "issuerUrl": "https://keycloak-maas-keycloak.apps.<cluster-domain>/realms/maas"
}

Step 4: Create Subscriptions for OIDC Groups

MaaS subscriptions control which groups can access which models and at what rate limits. Create subscriptions that reference the OIDC group names:

oc apply -k manifests/09-external-oidc/maas-oidc/

This creates:

  • Two MaaSSubscription resources targeting the data-scientists and ml-engineers groups
  • Two MaaSAuthPolicy resources granting those groups access to the simulator model
Note

The group names in subscriptions (data-scientists, ml-engineers) must match exactly the group names in the OIDC token groups claim. MaaS validates group memberships directly from the token without any OpenShift group sync.

Verify the resources were created:

oc get maassubscription,maasauthpolicy -n models-as-a-service

You should see the OIDC subscriptions and auth policies alongside any existing ones.

If you have models other than the simulator deployed, you can edit the subscription and auth policy manifests to reference your model names and namespaces before applying.

Step 5: Verify External OIDC

Automated verification

./manifests/09-external-oidc/test-external-oidc.sh

Expected output:

=========================================
  External OIDC Test Summary
=========================================
  MaaS URL:    https://maas.<cluster-domain>
  Keycloak:    https://keycloak-maas-keycloak.apps.<cluster-domain>
  Passed:      6
  Failed:      0
  Status:      ALL CHECKS PASSED
=========================================

Manual verification

Get an OIDC token

KEYCLOAK_HOST=$(oc get route -n maas-keycloak -o jsonpath='{.items[0].spec.host}')
KEYCLOAK_ISSUER="https://${KEYCLOAK_HOST}/realms/maas"

TOKEN=$(curl -sSk -X POST "${KEYCLOAK_ISSUER}/protocol/openid-connect/token" \
    -d "grant_type=password" \
    -d "client_id=maas-oidc" \
    -d "username=maas-user" \
    -d "password=maas-user" \
    -d "scope=openid groups" | jq -r '.access_token')

echo "Token: ${TOKEN:0:50}..."

List available models

CLUSTER_DOMAIN=$(oc get ingresses.config/cluster -o jsonpath='{.spec.domain}')

curl -sSk \
    -H "Authorization: Bearer ${TOKEN}" \
    -H "Content-Type: application/json" \
    "https://maas.${CLUSTER_DOMAIN}/maas-api/v1/models" | jq .

If authentication is successful, the API returns a list of models available to the groups in your token. An empty list means the token is valid but the user’s groups have no matching subscriptions.

Create an API key

API_KEY_RESPONSE=$(curl -sSk -X POST \
    -H "Authorization: Bearer ${TOKEN}" \
    -H "Content-Type: application/json" \
    -d '{"name": "my-oidc-key", "expiresInDays": 7}' \
    "https://maas.${CLUSTER_DOMAIN}/maas-api/v1/api-keys")

echo "$API_KEY_RESPONSE" | jq .
API_KEY=$(echo "$API_KEY_RESPONSE" | jq -r '.key')
Important

API keys capture the user’s group memberships at the time of creation. If a user is removed from a group in Keycloak, their existing API keys retain the original group associations until they expire or are manually revoked.

Run inference with the API key

Get the model ID from /v1/models and send a chat completion:

MODEL_ID=$(curl -sSk \
    -H "Authorization: Bearer ${API_KEY}" \
    "https://maas.${CLUSTER_DOMAIN}/v1/models" | jq -r '.data[0].id')

curl -sSk -X POST \
    -H "Authorization: Bearer ${API_KEY}" \
    -H "Content-Type: application/json" \
    -d "{\"model\": \"${MODEL_ID}\", \"messages\": [{\"role\": \"user\", \"content\": \"Hello from OIDC!\"}], \"max_tokens\": 20}" \
    "https://maas.${CLUSTER_DOMAIN}/v1/chat/completions" | jq .
Tip

See the OIDC Authentication demo for a presenter-ready walkthrough with a click-through UI and CLI client. The JWKS Cache demo proves that JWT signatures are verified locally from cached keys. All demos are listed on the Demos page.

Cleanup

To remove the OIDC configuration and Keycloak:

# Automated cleanup
./manifests/09-external-oidc/setup-keycloak.sh --cleanup

Or manually:

RHAIE Version: 3.5, 3.6

# Remove OIDC config from tenant
oc patch aitenants.maas.opendatahub.io models-as-a-service -n ai-tenants \
    --type json \
    -p '[{"op": "remove", "path": "/spec/oidc"}]'

# Remove OIDC subscriptions and auth policies
oc delete maassubscription oidc-data-scientists oidc-ml-engineers -n models-as-a-service
oc delete maasauthpolicy oidc-data-scientists-access oidc-ml-engineers-access -n models-as-a-service

# Remove Keycloak
oc delete namespace maas-keycloak

RHAIE Version: 3.4

# Remove OIDC config from tenant
oc patch tenants.maas.opendatahub.io default-tenant -n models-as-a-service \
    --type json \
    -p '[{"op": "remove", "path": "/spec/externalOIDC"}]'

# Remove OIDC subscriptions and auth policies
oc delete maassubscription oidc-data-scientists oidc-ml-engineers -n models-as-a-service
oc delete maasauthpolicy oidc-data-scientists-access oidc-ml-engineers-access -n models-as-a-service

# Remove Keycloak
oc delete namespace maas-keycloak

After removing the OIDC configuration, MaaS falls back to the default OpenShift TokenReview authentication. Existing API keys created by OIDC users will stop working once revoked or expired.

Bring Your Own Identity Provider

If you have an existing OIDC provider (Okta, Azure AD, etc.) instead of Keycloak, you only need:

  1. A public (or confidential) OIDC client registered for MaaS
  2. The client configured to include the groups claim in ID/access tokens
  3. User groups that map to MaaS subscription group names

Skip Steps 1-2 and go directly to Step 3, replacing the clientId and issuerUrl with your provider’s values.

8 - Upgrade (3.4 → 3.5)

Platform upgrade steps and post-upgrade troubleshooting for moving a MaaS install from 3.4 to 3.5.

8.1 - Platform Upgrade (3.4 → 3.5)

Migrate your Models as a Service configuration after upgrading the Red Hat OpenShift AI operator from 3.4 to 3.5 — DSC fields, namespaces, ExternalModel API changes, and dashboard configuration.

This page walks through migrating your Models as a Service configuration after upgrading the Red Hat OpenShift AI operator from 3.4 to 3.5. The operator upgrade itself is handled by OLM (change the subscription channel from stable-3.4 to stable-3.x). This guide covers everything else: DSC fields, namespaces, ExternalModel API changes, and dashboard configuration.

Important

This guide is not a replacement for the official Red Hat OpenShift AI 3.5 Release Notes - Known Issues. Always check the release notes for the latest updates.

Prerequisites

  • Red Hat OpenShift AI 3.5+ operator is installed (OLM has completed the upgrade)
  • cluster-admin access
  • Models as a Service was previously working on 3.4

Verify the operator version before proceeding:

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

Expected output (version must be 3.5.x or higher):

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

If the version still shows 3.4.x, the OLM upgrade has not completed yet. Check the subscription channel and InstallPlan before proceeding.

What Changes

The 3.5 release restructures how Models as a Service is configured in the DataScienceCluster. Here are the key changes that require action:

Area3.43.5+
DSC MaaS fieldkserve.modelsAsServiceaigateway.modelsAsAService
DSC Playgroundllamastackoperatorogx
maas-api namespaceredhat-ods-applicationsredhat-ai-gateway-infra
ExternalModel APImaas.opendatahub.io/v1alpha1inference.opendatahub.io/v1alpha1 (ExternalProvider)
Dashboard configmaasAuthPolicies flag supportedmaasAuthPolicies rejected by admission webhook

For the full list of structural changes (status conditions, new CRDs, Tenant CR deprecation), see the What Changes table in the troubleshooting page.

Step 1: Back Up Current State

Before making any changes, back up your current configuration:

# Back up the DataScienceCluster
oc get dsc default-dsc -o yaml > dsc-backup.yaml

# Back up the dashboard config
oc get odhdashboardconfig odh-dashboard-config -n redhat-ods-applications -o yaml > dashboard-backup.yaml

# Back up ExternalModels if you have any
oc get externalmodel.maas.opendatahub.io -A -o yaml > externalmodels-backup.yaml 2>/dev/null || true

Step 2: Add aigateway Component to the DSC

The Models as a Service control plane moved from kserve.modelsAsService to its own top-level aigateway component in 3.5. Add it to the DSC:

oc patch datasciencecluster default-dsc --type=merge \
  -p '{"spec":{"components":{"aigateway":{"managementState":"Managed","modelsAsAService":{"managementState":"Managed"}}}}}'
Warning

Without aigateway set to Managed, regular (non-admin) users will not see the AI asset endpoints page (under Gen AI studio) in the Red Hat OpenShift AI Dashboard. Admin users may still see it, which makes this a silent failure that only affects your end users.

Verify the patch was applied:

oc get datasciencecluster default-dsc \
  -o jsonpath='{.spec.components.aigateway.modelsAsAService.managementState}'
# Expected: Managed

Step 3: Add ogx Component (AI Playground)

The llamastackoperator DSC component was renamed to ogx in 3.5. Add the new component and explicitly remove the old one in the same patch:

oc patch datasciencecluster default-dsc --type=merge \
  -p '{"spec":{"components":{"ogx":{"managementState":"Managed"},"llamastackoperator":{"managementState":"Removed"}}}}'
Important

Do not leave llamastackoperator as Managed (and do not just omit it - on some clusters the field already defaults to Managed). Reproduced and confirmed on a live 3.5.0 cluster: having both llamastackoperator: Managed and ogx: Managed at the same time causes the operator to reject the ogx module with "LlamaStackOperator is set to Managed; it has been deprecated, set it to Removed before enabling OGX". That error aborts the entire module-provisioning batch at runlevel 32 - which also includes aigateway and mlflowoperator. The practical symptom is not just a missing Playground tab: aigateway’s CRDs never get installed, maas-api never deploys, ModelsAsAServiceReady stays False, and applying MaaSModelRef fails with no matches for kind "MaaSModelRef" even though modelsAsAService shows Managed. See Issue 14 for the full diagnosis and fix if you already hit this.

Warning

On some RHOAI 3.5.0 installations, the OGX CRD may still not be available after removing llamastackoperator. If the DSC reports OGXReady: False with no matches for kind "OGX", set ogx back to Removed to unblock the DSC - this one genuinely only affects the AI Playground feature, not Models as a Service.

# Only if OGX is still blocking DSC Ready after removing llamastackoperator:
oc patch datasciencecluster default-dsc --type=merge \
  -p '{"spec":{"components":{"ogx":{"managementState":"Removed"}}}}'

Step 4: Handle the Frozen kserve.modelsAsService Field

The old kserve.modelsAsService field is frozen by CEL validation (self == oldSelf). You cannot change its value in-place. This is by design - it prevents accidental removal of a running Models as a Service configuration during the transition period.

You will see a policy 299 deprecation warning:

DataScienceCluster default-dsc violates policy 299 - "spec.components.kserve.modelsAsService is deprecated;
use spec.components.aigateway.modelsAsAService instead. Clear to Removed after migration (re-enabling is blocked).
The field remains respected at least through 3.6."

This warning is expected at this point. Both old and new paths coexist through 3.6, so Models as a Service continues to work while both are present.

After you have confirmed that aigateway.modelsAsAService is working (Step 11), you can silence the warning by setting the old field to Removed:

oc patch datasciencecluster default-dsc --type=json \
  -p '[{"op":"replace","path":"/spec/components/kserve/modelsAsService/managementState","value":"Removed"}]'
Important

On fresh Red Hat OpenShift AI 3.5+ installs, do NOT add kserve.modelsAsService to the DSC. The CEL validation will reject any attempt to re-enable it after it has been set to Removed.

Step 5: Wait for DSC Ready

Wait for the DataScienceCluster to finish reconciling after the patches:

oc wait datasciencecluster default-dsc --for=condition=Ready --timeout=600s

If the DSC does not become Ready within the timeout, check which component is blocking:

oc get datasciencecluster default-dsc -o jsonpath='{range .status.conditions[*]}{.type}: {.status} ({.reason}) {.message}{"\n"}{end}'
Tip

The MCP Lifecycle Operator (new in 3.5) is a common blocker - it can OOMKill on clusters with many secrets. See Issue 1: MCP Lifecycle Operator OOMKill for the workaround.

Step 6: Verify Namespace and Secrets

In 3.5, maas-api moves to the redhat-ai-gateway-infra namespace. The controller should auto-create this namespace and copy the maas-db-config secret.

Verify the namespace exists:

oc get namespace redhat-ai-gateway-infra

Verify the maas-db-config secret was copied to the new namespace:

oc get secret maas-db-config -n redhat-ai-gateway-infra

If the secret is missing, copy it manually:

oc get secret maas-db-config -n redhat-ods-applications -o json | \
  jq 'del(.metadata.resourceVersion, .metadata.uid, .metadata.creationTimestamp, .metadata.ownerReferences) | .metadata.namespace = "redhat-ai-gateway-infra"' | \
  oc apply -f -

Verify maas-api is running in the new namespace:

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

Step 7: Label Namespace for Gateway Access

If the MaaS gateway is configured with label-based namespace selection (the secure configuration), the new namespace needs the matching label. Without it, the gateway rejects HTTPRoutes from redhat-ai-gateway-infra and the Dashboard shows “Error loading components”.

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

Verify the HTTPRoutes are accepted:

oc get httproute -n redhat-ai-gateway-infra -o wide

If HTTPRoutes show NotAccepted, see Issue 3: MaaS Gateway Namespace Label for diagnosis steps.

Step 8: Migrate LLMInferenceServices to Body-Based Routing (BBR)

In 3.5, the MaaS gateway enables body-based routing (BBR) by default: clients call /v1/chat/completions with the model in the request body instead of the path-based /llm/{model-namespace}/{model-name} URL. However, this only applies to new LLMInferenceServices. LLMInferenceServices that existed before the upgrade are not automatically re-rendered against the new serving presets - the operator pins the preset on each LLMInferenceService via the serving.kserve.io/config-llm-template status annotation, so existing instances deliberately keep their old configuration to avoid spurious rollouts. Upgraded models keep serving the old path-based endpoint, and BBR requests against them fail. If you expect to take advantage of the new feature, you must trigger the update from the pinned presets.

List all LLMInferenceServices; every one that existed before the upgrade is affected:

oc get llminferenceservice -A

Migrate each LLMInferenceService using one of the following paths.

Path A: Delete and let the operator re-reconcile

Delete the LLMInferenceService and re-create it from your manifest or GitOps repository. The operator re-renders it against the latest presets, including the new BBR HTTPRoute and all other policy changes:

oc delete llminferenceservice <name> -n <namespace>
# Re-create it from your manifest or GitOps repository
oc apply -f <llminferenceservice>.yaml -n <namespace>
Warning

Deleting the LLMInferenceService guarantees downtime: the model is unavailable until the operator recreates the service and the replacement pod is Ready.

Path B: Remove the pinned status annotation

Remove the pinned preset annotation from the status subresource to trigger a reconcile against the latest presets without recreating the custom resource:

oc patch llminferenceservice <name> -n <namespace> --subresource=status --type=json \
  -p '[{"op":"remove","path":"/status/annotations/serving.kserve.io~1config-llm-template"}]'
Warning

This path might still come with downtime: if the latest presets change more than the HTTPRoute and gateway policy objects, the underlying deployments roll. Whether users observe downtime depends on your ability to perform a rolling update - you need enough spare cluster capacity to run the old and new pods side by side.

Note

The status patch is an out-of-band change that GitOps does not track, so the resource drifts until the next sync. If you manage LLMInferenceServices with OpenShift GitOps or a similar tool, Path A fits your workflow more naturally.

Verify BBR works against each migrated model:

MAAS_HOST=$(oc get gateway maas-default-gateway -n openshift-ingress \
  -o jsonpath='{.spec.listeners[?(@.name=="https")].hostname}')
API_KEY=$(oc whoami -t)

# Get the model ID (canonical form for body-based routing)
MODEL_ID=$(curl -sk "https://${MAAS_HOST}/v1/models" \
  -H "Authorization: Bearer ${API_KEY}" | jq -r '.data[0].id')

# Send a chat completion request (body-based routing)
curl -sk "https://${MAAS_HOST}/v1/chat/completions" \
  -H "Authorization: Bearer ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d "{
    \"model\": \"${MODEL_ID}\",
    \"messages\": [{\"role\": \"user\", \"content\": \"Hello!\"}]
  }"

Step 9: Migrate ExternalModels (if applicable)

If you have ExternalModel resources (third-party LLM APIs like OpenAI, Bedrock, Gemini), they need manual migration. The old ExternalModel CRD under maas.opendatahub.io/v1alpha1 is not auto-migrated to the new ExternalProvider CRD under inference.opendatahub.io/v1alpha1.

Check for existing ExternalModels:

# Old API group (3.4)
oc get externalmodel.maas.opendatahub.io -A

# New API group (3.5)
oc get externalprovider.inference.opendatahub.io -A

If you have old ExternalModels, recreate each one under the new API. Example for an OpenAI provider:

# 1. Create the new ExternalProvider
cat <<EOF | oc apply -f -
apiVersion: inference.opendatahub.io/v1alpha1
kind: ExternalProvider
metadata:
  name: openai
  namespace: <model-namespace>
spec:
  endpoint: "api.openai.com"
  provider: "openai"
  auth:
    type: apikey
    secretRef:
      name: openai-api-key
EOF

# 2. Delete the old ExternalModel (after verifying the new one is Ready)
oc get externalprovider openai -n <model-namespace>
oc delete externalmodel.maas.opendatahub.io openai -n <model-namespace>
Warning

The 3.5 ExternalProvider CRD has a stricter validation regex on spec.auth.secretRef.name that does not allow dots. If your secret names contain dots (e.g. glm5.1-w8a8-key), you must rename them first. See Issue 2: ExternalModel Migration - Secret Names with Dots for details.

Step 10: Update OdhDashboardConfig

The maasAuthPolicies flag was removed from the OdhDashboardConfig CRD in 3.5. The admission webhook rejects any manifest that includes it.

Check if your dashboard config has the flag:

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

If it returns a value, remove it:

oc patch odhdashboardconfig odh-dashboard-config -n redhat-ods-applications --type=json \
  -p '[{"op":"remove","path":"/spec/dashboardConfig/maasAuthPolicies"}]'

Step 11: Verification Checklist

Run through these checks to confirm the migration is complete:

CheckCommand
DSC is Readyoc get dsc default-dsc -o jsonpath='{.status.conditions[?(@.type=="Ready")].status}'
Expected: True
maas-api in new namespaceoc get pods -n redhat-ai-gateway-infra | grep maas-api
Expected: Running
MaaS Config CR existsoc get configs.maas.opendatahub.io default
Expected: resource found
ModelsAsAServiceReadyoc get dsc default-dsc -o jsonpath='{.status.conditions[?(@.type=="ModelsAsAServiceReady")].status}'
Expected: True
Health endpointCLUSTER_DOMAIN=$(oc get ingresses.config.openshift.io cluster -o jsonpath='{.spec.domain}')
curl -sk "https://maas.${CLUSTER_DOMAIN}/maas-api/health"
Expected: {"status":"healthy"}
BBR works against pre-3.5 models/v1/chat/completions request per the Step 8 verification
Expected: JSON completion response
Regular user sees AI asset endpointsLog into the Red Hat OpenShift AI Dashboard as a non-admin user and verify the AI asset endpoints page is visible under Gen AI studio
No policy 299 warning (after Step 4 cleanup)oc get dsc default-dsc -o jsonpath='{.spec.components.kserve.modelsAsService.managementState}'
Expected: Removed (or empty if the field was deleted)

Troubleshooting

If you hit issues during migration, see the Post-Upgrade Troubleshooting page. Here is a quick mapping from migration symptoms to known issues:

Symptom During MigrationSee
DSC stuck not-ready after patchingIssue 1 (MCP Lifecycle Operator OOM)
Dashboard shows “Error loading components”Issue 3 (namespace label) or Issue 4 (hostname discovery)
maas-api returns 500 on /v1/tenantsIssue 4 (gateway hostname discovery)
ExternalProvider creation fails on secret nameIssue 2 (dotted secret names)
HTTPRoutes show NotAcceptedIssue 3 (namespace label)
HTTP 500/503 under load after migrationIssue 7 (WASM auth timeout)
HTTP 429 Too Many RequestsIssue 9 (token rate limit default)

References

8.2 - Post-Upgrade Troubleshooting (3.4 → 3.5)

Known issues and workarounds for customers who upgraded Red Hat OpenShift AI from 3.4 to 3.5 with Models as a Service enabled.

This page covers known issues and workarounds for customers who upgraded Red Hat OpenShift AI from 3.4 to 3.5 with Models as a Service enabled. All issues listed here have been reproduced and validated on test clusters.

Important

This guide is not a replacement for the official Red Hat OpenShift AI 3.5 Release Notes - Known Issues. Always check the release notes for the latest updates.

Tip

For step-by-step migration instructions, see Platform Upgrade (3.4 -> 3.5). This page covers troubleshooting for issues that occur during or after the migration.

What Changes in the 3.4 -> 3.5 Upgrade

The 3.5 release introduces several structural changes to the Models as a Service platform:

AreaChange
DSC fieldkserve.modelsAsService is frozen (CEL: self == oldSelf). New path is aigateway.modelsAsAService. Both coexist through 3.6.
maas-api namespaceMoves from redhat-ods-applications to redhat-ai-gateway-infra. The controller auto-copies the maas-db-config secret with FQDN conversion.
DSC status conditionModelsAsServiceReady (3.4) becomes ModelsAsAServiceReady (3.5). The old condition is removed after upgrade.
New componentMCP Lifecycle Operator is added to the DSC. It watches all ConfigMaps and Secrets cluster-wide.
New CRDsaitenants.maas.opendatahub.io, configs.maas.opendatahub.io, maastenantconfigs.maas.opendatahub.io.
ExternalModel APIMoves from maas.opendatahub.io/v1alpha1 to inference.opendatahub.io/v1alpha1 as ExternalProvider. Old resources are not auto-migrated.
OdhDashboardConfigThe maasAuthPolicies flag is removed. The 3.5 webhook rejects it if present.
Tenant CRTenant is deprecated. Replaced by MaasTenantConfig. Legacy values are preserved during AITenant bootstrap.
DSC component renamellamastackoperator is renamed to ogx. If upgrading from 3.4, update the DSC spec or the Playground section will not appear.

Issue 1: MCP Lifecycle Operator OOMKill

Jira: RHOAIENG-82694

The MCP Lifecycle Operator is new in 3.5. It watches all ConfigMaps and Secrets cluster-wide using full structured informers, loading complete object data into the operator’s in-memory cache. On clusters with many namespaces and secrets, memory consumption grows proportionally and exceeds the default limit, causing the operator pod to enter CrashLoopBackOff with OOMKilled.

This blocks the DataScienceCluster from reaching Ready state, which breaks all downstream features: Model Catalog, Models as a Service, API Keys.

Symptoms

  • DSC status: "Some modules are not ready: mcplifecycleoperator"
  • mcp-lifecycle-operator-controller-manager pod in CrashLoopBackOff
  • All Models as a Service dashboard pages show errors

Diagnosis

# Check DSC status
oc get datasciencecluster default-dsc -o jsonpath='{.status.conditions[?(@.type=="Ready")]}'

# Check MCP lifecycle operator pod
oc get pods -n redhat-ods-applications | grep mcp-lifecycle

# Check for OOMKilled events (get the pod name from the previous command)
oc describe pod -n redhat-ods-applications \
  $(oc get pods -n redhat-ods-applications -o name | grep mcp-lifecycle) | grep -A5 "Last State"

Workaround

Set the MCP Lifecycle Operator management state to Removed in the DSC:

oc patch datasciencecluster default-dsc --type=merge \
  -p '{"spec":{"components":{"mcplifecycleoperator":{"managementState":"Removed"}}}}'

Wait for the DSC to reconcile:

oc wait datasciencecluster default-dsc --for=condition=Ready --timeout=300s
Note

Setting the MCP Lifecycle Operator to Removed disables the Model Context Protocol server management feature. If you need MCP server support, contact Red Hat support for guidance on increasing the operator’s memory limits.

Issue 2: ExternalModel Migration - Secret Names with Dots

Jira: RHOAIENG-89784

In 3.5, the ExternalModel API moved from maas.opendatahub.io/v1alpha1 to inference.opendatahub.io/v1alpha1 as ExternalProvider. The new CRD introduces a stricter validation regex on spec.auth.secretRef.name:

^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$

Dots in secret names (which are valid Kubernetes names) now fail this validation. If you have an ExternalModel referencing a secret like glm5.1-w8a8-key, the migration to ExternalProvider will fail silently.

Additionally, old ExternalModel resources under maas.opendatahub.io are not auto-migrated to the new inference.opendatahub.io ExternalProvider CRD. You need to recreate them manually.

Symptoms

  • ExternalModel resource exists under maas.opendatahub.io but has no status
  • No corresponding ExternalProvider exists under inference.opendatahub.io
  • External models do not appear in the dashboard

Diagnosis

# Check old ExternalModels (3.4 API group)
oc get externalmodel.maas.opendatahub.io -A

# Check new ExternalProviders (3.5 API group)
oc get externalprovider.inference.opendatahub.io -A

# Look for secrets with dots in the name (exclude Helm and service-account tokens)
oc get secrets -A -o custom-columns='NS:.metadata.namespace,NAME:.metadata.name' --no-headers \
  | awk '$2 ~ /\./ && $2 !~ /^sh\.helm/ && $2 !~ /dockercfg/ {print}'

Workaround

For each ExternalModel with a dotted secret name:

# 1. Create a replacement secret without dots
oc create secret generic glm51-w8a8-key -n <model-ns> \
  --from-literal=api-key=<same-api-key-value>

# 2. Delete the old secret
oc delete secret glm5.1-w8a8-key -n <model-ns>

# 3. Create the new ExternalProvider (inference.opendatahub.io)
cat <<EOF | oc apply -f -
apiVersion: inference.opendatahub.io/v1alpha1
kind: ExternalProvider
metadata:
  name: glm51-w8a8
  namespace: <model-ns>
spec:
  endpoint: "your-provider-endpoint.com"
  provider: "openai"  # or anthropic, azure-openai, bedrock-openai
  auth:
    type: apikey
    secretRef:
      name: glm51-w8a8-key
EOF

# 4. Delete the old ExternalModel
oc delete externalmodel.maas.opendatahub.io <name> -n <model-ns>

# 5. Verify the new ExternalProvider is Ready
oc get externalprovider -n <model-ns>

For ExternalModels without dots in the secret name, the same manual recreation is still needed - just skip the secret rename step.

Issue 3: MaaS Gateway Namespace Label

Jira: RHOAIENG-83207

When the Models as a Service gateway is configured with label-based namespace selection (the secure configuration), the namespaces that host HTTPRoutes need to carry the matching label. The exact label depends on your gateway configuration - the setup-maas guide uses maas.opendatahub.io/gateway-access=true, while the release notes reference maas-gateway-access=true. Without the correct label, the gateway rejects the internal HTTPRoute that serves the Models as a Service API, and the dashboard shows “Error loading components”.

This only applies when the gateway uses allowedRoutes.namespaces.from: Selector. If your gateway uses from: All (the default insecure configuration), this issue does not affect you. After upgrading to 3.5, if the gateway was reconfigured to use label-based selection (per RHOAIENG-80360 security hardening), the missing label will break Models as a Service.

Symptoms

  • API Keys page shows “Error loading components”
  • Model Catalog page shows “Models as a Service could not be loaded”
  • HTTPRoutes in redhat-ods-applications show NotAccepted status

Diagnosis

# First, check what label your gateway expects
oc get gateway maas-default-gateway -n openshift-ingress \
  -o jsonpath='{.spec.listeners[0].allowedRoutes.namespaces}'

# Then check if the required label exists on the namespaces
oc get namespace redhat-ods-applications --show-labels | grep -i maas
oc get namespace redhat-ai-gateway-infra --show-labels | grep -i maas

# Check HTTPRoute status
oc get httproute -n redhat-ods-applications -o wide
oc get httproute -n redhat-ai-gateway-infra -o wide

Workaround

Apply the label that your gateway selector expects. Check the matchLabels from the diagnosis step above, then apply it:

# If your gateway uses maas.opendatahub.io/gateway-access (setup-maas guide default):
oc label namespace redhat-ods-applications maas.opendatahub.io/gateway-access=true
oc label namespace redhat-ai-gateway-infra maas.opendatahub.io/gateway-access=true

# If your gateway uses maas-gateway-access (release notes workaround):
# oc label namespace redhat-ods-applications maas-gateway-access=true
# oc label namespace redhat-ai-gateway-infra maas-gateway-access=true

Wait a few seconds for the HTTPRoute to be accepted, then reload the dashboard.

Issue 4: Gateway Hostname Discovery (ClusterIP + Route Topology)

Jira: RHOAIENG-89775

When the Models as a Service gateway is deployed without a cloud load balancer (common on on-premise, bare-metal, or any cluster using ClusterIP + Route topology), the maas-api /v1/tenants endpoint returns HTTP 500 with "Failed to resolve gateway". This happens because:

  1. extractGatewayMetadata() in maas-api first tries spec.listeners[].hostname on the Gateway - but only for listeners with attachedRoutes > 0. If the hostname is not set in the spec, or routes are not yet attached after upgrade, this returns empty.
  2. It then falls back to status.addresses - which is either empty (no LoadBalancer) or contains the internal .svc.cluster.local address.
  3. There is no fallback to discover the OpenShift Route hostname.

This breaks the Models as a Service dashboard because maas-ui calls /v1/tenants at startup to auto-detect the gateway hostname (new in 3.5). In 3.4 the hostname was hardcoded, so this code path was never exercised.

Symptoms

  • Dashboard shows “Error loading API keys” or “Error loading components”
  • maas-api logs show: Failed to extract gateway metadata - could not determine external hostname from gateway
  • Gateway condition shows Programmed: False with reason AddressNotAssigned

Diagnosis

# Check if spec.listeners have an explicit hostname
oc get gateway maas-default-gateway -n openshift-ingress \
  -o jsonpath='{.spec.listeners[*].hostname}'

# Check what address the gateway reports
oc get gateway maas-default-gateway -n openshift-ingress \
  -o jsonpath='{.status.addresses[*]}'

# Check attachedRoutes count (must be > 0 for hostname discovery to work)
oc get gateway maas-default-gateway -n openshift-ingress \
  -o jsonpath='{range .status.listeners[*]}{.name}: attachedRoutes={.attachedRoutes}{"\n"}{end}'

# Check maas-api logs for the error
oc logs deploy/maas-api -n redhat-ai-gateway-infra | grep -i "hostname\|external\|gateway metadata"

If spec.listeners[].hostname is empty and status.addresses is empty or shows a .svc.cluster.local address, this issue is confirmed.

Workaround

Set the hostname explicitly on the Gateway listeners. This workaround is confirmed for passthrough routes. For re-encrypt routes, additional adjustments may be needed - check the Jira ticket comments for the latest guidance.

Note

The Models as a Service team recommends re-encrypt routes over passthrough when using cluster wildcard default domain certs, to avoid HTTP coalescing issues.

Replace <cluster-domain> with your cluster’s apps domain:

CLUSTER_DOMAIN=$(oc get ingress.config.openshift.io cluster -o jsonpath='{.spec.domain}')

oc patch gateway maas-default-gateway -n openshift-ingress --type=json \
  -p "[
    {\"op\": \"add\", \"path\": \"/spec/listeners/0/hostname\", \"value\": \"maas.${CLUSTER_DOMAIN}\"},
    {\"op\": \"add\", \"path\": \"/spec/listeners/1/hostname\", \"value\": \"maas.${CLUSTER_DOMAIN}\"}
  ]"

# Restart maas-api to pick up the new hostname
oc rollout restart deploy/maas-api -n redhat-ai-gateway-infra
oc rollout status deploy/maas-api -n redhat-ai-gateway-infra --timeout=60s

After the restart, verify the fix:

TOKEN=$(oc whoami -t)
MAAS_URL="https://maas.${CLUSTER_DOMAIN}"
curl -sk -w "\nHTTP: %{http_code}\n" \
  -H "Authorization: Bearer ${TOKEN}" \
  "${MAAS_URL}/maas-api/v1/tenants"

You should see HTTP 200 with the correct externalUrl in the response.

Issue 5: Payload-Processing OOMKill

Jira: RHOAIENG-88898
Target fix: RHOAI 3.5.1

The payload-processing pods in openshift-ingress have a hardcoded memory limit of 256Mi. Under load or with large payloads, they get OOMKilled. Manual oc set resources patches are reverted within seconds by the maas-controller SSA reconciliation loop.

Symptoms

  • payload-processing pod in CrashLoopBackOff with OOMKilled
  • Inference requests fail intermittently
  • Manual resource patches are reverted

Diagnosis

# Check current limits
oc get deployment payload-processing -n openshift-ingress \
  -o jsonpath='{.spec.template.spec.containers[0].resources}'

# Check for OOMKilled restarts
oc describe pod -n openshift-ingress -l app=payload-processing | grep -A3 "Last State"

Workaround

First, annotate the deployment to prevent the controller from reverting your changes, then increase the memory limit:

# Prevent SSA reconciliation
oc annotate deployment payload-processing -n openshift-ingress \
  opendatahub.io/managed=false

# Increase memory limit
oc set resources deployment payload-processing -n openshift-ingress \
  --limits=memory=1Gi --requests=memory=256Mi

Wait for the rollout to complete:

oc rollout status deployment payload-processing -n openshift-ingress --timeout=60s
Important

Remove the opendatahub.io/managed=false annotation before any future Red Hat OpenShift AI upgrades so the controller can manage the deployment again.

Issue 6: RHCL 1.4.x Rate Limiting and Gateway OOM

Jira: RHOAIENG-76586

Red Hat Connectivity Link (RHCL) 1.4.x changed how the WASM plugin is injected into the gateway. This breaks rate limiting silently - counters that use auth.identity.user.username fail because the identity data is not passed into the WASM plugin context. Additionally, the RHCL 1.4 WASM plugin requires more memory to compile, which can cause gateway pods to OOMKill at the default 1Gi limit.

Symptoms

  • Rate limiting stops working - requests are never throttled even when limits are exceeded
  • Gateway pod OOMKilled at 1Gi memory limit (RHCL 1.4 WASM requires more memory)
  • TokenRateLimitPolicy shows Enforced but limits have no effect

Diagnosis

# Check RHCL version
oc get csv -A | grep rhcl-operator | head -1

# Check gateway memory limits (deployment name = <gateway-name>-<gatewayclass-name>)
GATEWAY_DEPLOY=$(oc get deployments -n openshift-ingress -o name \
  | grep maas-default-gateway | head -1)
oc get "${GATEWAY_DEPLOY}" -n openshift-ingress \
  -o jsonpath='{.spec.template.spec.containers[0].resources.limits.memory}'

Workaround

Note

Downgrading RHCL is probably not the way out of this. 1.3.x does not appear in the configurations matrix for Red Hat OpenShift AI 3.4 and 3.5 (see Version Notes), so the workarounds below are the better starting point.

If you are on RHCL 1.4.x, apply both workarounds from the release notes:

1. Disconnect the Gateway from operator management and increase memory to 2Gi:

GATEWAY_NAME="maas-default-gateway"

# Prevent operator from reverting gateway changes
oc annotate gateway ${GATEWAY_NAME} -n openshift-ingress \
  opendatahub.io/managed=false

oc apply -f - <<EOF
apiVersion: v1
kind: ConfigMap
metadata:
  name: ${GATEWAY_NAME}-proxy-config
  namespace: openshift-ingress
data:
  deployment: |
    spec:
      template:
        spec:
          containers:
            - name: istio-proxy
              resources:
                limits:
                    memory: 2Gi
EOF

oc patch gateway ${GATEWAY_NAME} -n openshift-ingress --type=merge \
  -p "{\"spec\":{\"infrastructure\":{\"parametersRef\":{\"group\":\"\",\"kind\":\"ConfigMap\",\"name\":\"${GATEWAY_NAME}-proxy-config\"}}}}"

2. Add identity filter to AuthPolicy:

Add a response.success.filters.identity section to your AuthPolicy so that Authorino writes the user identity into the WASM plugin context. Without this, rate limit counters that use auth.identity.user.username fail silently. See the full AuthPolicy patch in the release notes.

Important

Remove the opendatahub.io/managed=false annotation from the Gateway before any future Red Hat OpenShift AI upgrades so the controller can manage it again.

Issue 7: WASM Auth Timeout Under Load

Jira: RHOAIENG-71638

RHCL configures the Kuadrant WASM plugin with a default 200ms Authorino authentication service timeout. Under high concurrent request load, Authorino authentication latency can exceed this threshold due to cache misses. The WASM plugin uses failureMode: deny, so timed-out authentication requests result in HTTP 500 or 503 responses even when model backends are healthy.

This affects both Red Hat OpenShift AI 3.4 and 3.5.

Symptoms

  • HTTP 500 or 503 on inference requests under concurrent load
  • Model pods are healthy with no errors in their logs
  • Gateway Envoy logs show WASM auth timeout errors

Diagnosis

# Check for 500/503 errors in gateway logs
oc logs -n openshift-ingress -l gateway.istio.io/managed=istio.io-gateway-controller \
  -c istio-proxy --tail=100 | grep -E "50[03]"

# Check current AUTH_SERVICE_TIMEOUT
oc get subscription -n openshift-operators rhcl-operator \
  -o yaml | grep -A5 AUTH_SERVICE_TIMEOUT

Workaround

Set AUTH_SERVICE_TIMEOUT to 10s on the RHCL operator Subscription:

RHCL_NAMESPACE=openshift-operators
RHCL_SUBSCRIPTION=rhcl-operator

oc patch subscription "${RHCL_SUBSCRIPTION}" -n "${RHCL_NAMESPACE}" \
  --type=merge \
  -p '{"spec":{"config":{"env":[{"name":"AUTH_SERVICE_TIMEOUT","value":"10s"}]}}}'
Warning

The merge patch replaces the entire spec.config.env array. If your subscription already has other env vars, edit the subscription manually (oc edit subscription) and add the entry to the existing list instead.

Wait for the operator to roll out:

oc wait --for=jsonpath='{.status.state}'=AtLatestKnown \
  subscription/${RHCL_SUBSCRIPTION} -n ${RHCL_NAMESPACE} --timeout=300s
oc wait --for=condition=Available --timeout=120s \
  deployment/kuadrant-operator-controller-manager -n ${RHCL_NAMESPACE}

Issue 8: Envoy ext_proc Body Corruption

Jira: OSSM-15498
Priority: Blocker
Status: In progress

When two or more ext_proc filters are chained on the same Envoy listener, body data can be corrupted or truncated. The upstream fix landed in Envoy 1.37.1+, but has not been backported to the 1.36.x or 1.35.x branches used by OSSM 3.x.

The AI Gateway data plane requires chained ext_proc stages (pre-processing + main processing via Praxis). Until this is fixed, model-level subscription enforcement through the data plane may be bypassed.

Diagnosis

# Check Envoy version
GATEWAY_POD=$(oc get pods -n openshift-ingress \
  -l gateway.istio.io/managed=istio.io-gateway-controller \
  -o jsonpath='{.items[0].metadata.name}' 2>/dev/null)
oc exec "$GATEWAY_POD" -n openshift-ingress -c istio-proxy -- envoy --version

If the version is below 1.37.1, the fix is not available.

Status

No workaround exists. This is being tracked as a blocker for RHOAI 3.5 Z-stream and 3.6 GA. The fix depends on an OSSM update that includes the upstream Envoy patch.

Issue 9: Token Rate Limiting (429 Too Many Requests)

Jira: RHOAIENG-89785

The default tokenRateLimits in a MaaSSubscription is 1000 tokens per hour. This is easily exhausted with even a single chat conversation. When the limit is hit, all subsequent requests return HTTP 429 Too Many Requests - even though the model backend is healthy and has capacity.

The 429s come from Kuadrant’s TokenRateLimitPolicy, not from the model itself. Every 429 response has a tiny 18-byte body and 15-30ms latency - far too fast to be an actual LLM response.

This affects both Red Hat OpenShift AI 3.4 and 3.5.

Symptoms

  • Playground shows [server_error] Too Many Requests
  • Gateway access logs show HTTP 429 on /v1/chat/completions
  • Model pod is healthy with no errors in its logs

Diagnosis

# Check the current token rate limit
oc get maassubscription -A -o yaml | grep -A5 tokenRateLimits

# Check the generated TokenRateLimitPolicy
oc get tokenratelimitpolicy -A -o yaml | grep -A5 "limit:"

# Confirm 429s in gateway logs
oc logs -n openshift-ingress -l gateway.istio.io/managed=istio.io-gateway-controller \
  -c istio-proxy --tail=100 | grep "429"

Workaround

Increase the token limit in your MaaSSubscription. Edit the subscription directly:

# List subscriptions
oc get maassubscription -A

# Edit the subscription and increase tokenRateLimits[].limit
oc edit maassubscription <name> -n <namespace>

Change the tokenRateLimits section:

spec:
  modelRefs:
  - name: <model-name>
    namespace: <model-ns>
    tokenRateLimits:
    - limit: 100000   # was 1000
      window: 1h

Wait for the TokenRateLimitPolicy to reconcile:

oc get tokenratelimitpolicy -A -o yaml | grep -A5 "limit:"
Note

Do not edit the TokenRateLimitPolicy directly - the maas-controller will overwrite it. Always edit the MaaSSubscription source.

Issue 10: Duplicate AI Playground Endpoints (LlamaStackDistribution)

Jira: RHOAIENG-89786

After upgrading to 3.5 and enabling the ogx component in the DSC, the AI Playground may show two provider endpoints for the same model. The MaaS-routed endpoint (maas-vllm-inference-1/publishers/...) works, but the default endpoint (vllm-inference-2/...) talks directly to the KServe pod and bypasses MaaS auth - failing with connection errors or model-not-found errors depending on timing.

The root cause is a leftover LlamaStackDistribution CR in the model namespace. Deleting it removes the duplicate provider.

Symptoms

  • Playground shows two AI asset endpoints for the same model
  • One endpoint works (MaaS), the other fails with “Server error” or “model does not exist”
  • Intermittent failures when Playground picks the wrong provider

Diagnosis

# Check for LlamaStackDistribution in model namespaces
oc get llamastackdistribution -A

# Check providers visible to the playground
oc logs -n <model-ns> -l app=lsd-genai-playground --tail=50 | grep provider

Workaround

Delete the LlamaStackDistribution from the model namespace:

oc delete llamastackdistribution -n <model-ns> --all

Then recreate the playground to pick up only the MaaS provider:

# Delete the old playground pod
oc delete pod -n <model-ns> -l app=lsd-genai-playground

# Or recreate the playground from the dashboard:
# Add to playground -> select only the model with publishers/ prefix -> Create

Issue 11: OTEL Collector Proxy Interception (Observability Metrics Showing 0)

Jira: RHOAIENG-91640

On clusters behind a corporate HTTP proxy, the RHOAI observability pipeline breaks silently after upgrade. The OTEL collector pods (data-science-collector-collector-*) and TargetAllocator (data-science-collector-targetallocator) in redhat-ods-monitoring inherit the cluster-wide HTTP_PROXY/HTTPS_PROXY env vars. When the collector tries to reach the TargetAllocator to discover scrape targets, the request goes through the proxy. The proxy returns an HTML page (authentication or redirect), which the collector fails to parse as JSON. With no scrape targets, no metrics reach the RHOAI Prometheus instance, and the MaaS usage dashboard shows 0 for all metrics.

The collector config uses a short hostname to reach the TargetAllocator (http://data-science-collector-targetallocator:80). This short hostname has no dots and no .svc suffix, so it does not match the NO_PROXY entries (.svc, .cluster.local). Go’s net/http proxy resolution checks the original hostname against NO_PROXY before DNS resolution, so the request gets routed through the corporate proxy.

This does not affect clusters without an HTTP proxy.

Symptoms

  • MaaS usage dashboard shows 0 for all token metrics
  • OTEL collector logs: "Failed to retrieve the job list" with "unexpected key name <!DOCTYPE html..."
  • RHOAI Thanos Querier returns “Empty query result” for all metrics (including authorized_calls_total, vllm:num_requests_running)
  • Limitador metrics are correct when queried directly inside the pod

Diagnosis

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

# Check OTEL collector logs for HTML parse errors
oc logs -n redhat-ods-monitoring data-science-collector-collector-0 \
  | grep -i "Failed to retrieve"

# Check if TargetAllocator has proxy env vars
oc get deploy data-science-collector-targetallocator -n redhat-ods-monitoring \
  -o jsonpath='{.spec.template.spec.containers[0].env[*].name}' | tr ' ' '\n' | grep -i proxy

# Verify TargetAllocator returns JSON (not HTML) when accessed directly
oc exec -n redhat-ods-monitoring data-science-collector-collector-0 -- \
  curl -s http://data-science-collector-targetallocator:8080/jobs | head -1

If the last command returns HTML (<!DOCTYPE html...) instead of JSON, this issue is confirmed.

Workaround

Patch the OpenTelemetryCollector CR to override the proxy env vars to empty on both the collector and TargetAllocator:

oc patch opentelemetrycollector data-science-collector -n redhat-ods-monitoring --type=merge -p '{
  "spec": {
    "env": [
      {"name": "HTTP_PROXY", "value": ""},
      {"name": "HTTPS_PROXY", "value": ""},
      {"name": "http_proxy", "value": ""},
      {"name": "https_proxy", "value": ""}
    ],
    "targetAllocator": {
      "env": [
        {"name": "HTTP_PROXY", "value": ""},
        {"name": "HTTPS_PROXY", "value": ""},
        {"name": "http_proxy", "value": ""},
        {"name": "https_proxy", "value": ""}
      ]
    }
  }
}'

Wait for the pods to restart:

oc rollout status deployment/data-science-collector-targetallocator -n redhat-ods-monitoring --timeout=60s
oc rollout status statefulset/data-science-collector-collector -n redhat-ods-monitoring --timeout=120s

Verify the collector discovers scrape jobs:

oc logs -n redhat-ods-monitoring data-science-collector-collector-0 --tail=20 | grep "Scrape job added"

You should see scrape jobs listed (e.g., serviceMonitor/redhat-ods-monitoring/limitador-metrics/0).

Important

Do NOT use oc set env statefulset/... or oc set env deployment/... directly. The OTel operator reconciles the StatefulSet and Deployment from the CR spec, so manual env changes get reverted immediately. You must patch the OpenTelemetryCollector CR itself.

Warning

The RHOAI operator manages the OpenTelemetryCollector CR and may revert changes on reconciliation. If that happens, annotate the CR to prevent operator management: oc annotate opentelemetrycollector data-science-collector -n redhat-ods-monitoring opendatahub.io/managed=false. Remove this annotation before any future Red Hat OpenShift AI upgrades.

Issue 12: HTTPRoute Rule Name Collision (Multi-Model Gateway)

Jira: RHOAIENG-93709
Status: New

In Red Hat OpenShift AI 3.5, the v3-5-0-kserve-config-llm-router-route LLMInferenceServiceConfig preset introduces 12 hardcoded HTTPRoute.spec.rules[].name entries (e.g., chat-completions, completions, models). When multiple LLMInferenceServices are attached to the same MaaS Gateway, Istio merges all their HTTPRoutes into a single Virtual Host. Because the rule names are identical across services, Envoy treats them as duplicates - one service’s Endpoint Picker (EPP) configuration overwrites the other’s, causing all traffic to be routed to a single EPP regardless of which model was requested.

This is a regression from Red Hat OpenShift AI 3.4 where the name field was omitted in the preset, allowing Istio to auto-generate unique rule names per service. Related upstream issues: istio#58392, istio#61594.

Symptoms

  • Inference requests to a second model return responses from the first model (or vice versa)
  • Only one EPP pod receives traffic even though multiple models are deployed
  • Prefix caching and KV cache-aware routing break because requests land on the wrong EPP

Diagnosis

# List all HTTPRoutes attached to the MaaS gateway
oc get httproute -A -o json | jq -r '
  .items[]
  | select(.spec.parentRefs[]? | .name == "maas-default-gateway")
  | "\(.metadata.namespace)/\(.metadata.name)"'

# Check for duplicate rule names across HTTPRoutes
oc get httproute -A -o json | jq -r '
  [.items[]
   | select(.spec.parentRefs[]? | .name == "maas-default-gateway")
   | .spec.rules[]? | .name // empty]
  | group_by(.) | map(select(length > 1) | {name: .[0], count: length})
  | .[]'

If the second command returns results, you have duplicate rule names causing route shadowing.

Workaround

No workaround exists. The upstream fix is tracked in istio#61601, which resolves InferencePool endpoint pickers per backendRef instead of per rule name. The LLMInferenceService routing may also add suffixes to sectionNames to avoid collisions at the HTTPRoute level.

Issue 13: Stale DNSRecord After Gateway Service Type Change

Jira: RHOAIENG-93962

When a Models as a Service gateway is initially deployed with a LoadBalancer service type and then switched to ClusterIP (via ConfigMap parametersRef), the DNS operator does not clean up the dnsrecord object created for the original LoadBalancer. The stale record has a CNAME pointing to a defunct AWS ELB hostname, which breaks DNS resolution for the gateway hostname from both inside and outside the cluster.

The root cause is that the dnsrecord is owned by the Service via ownerReferences. When the service type changes from LoadBalancer to ClusterIP, the service is patched in place - not deleted and recreated - so the ownerReference stays valid and Kubernetes garbage collection does not remove the dnsrecord. The DNS operator does not watch for service type changes.

Symptoms

  • Dashboard shows “Error loading API keys” with dial tcp: lookup maas.apps.<cluster> on 172.30.0.10:53: no such host
  • The Models as a Service URL resolves from outside the cluster but not from inside (or fails from both sides depending on timing)
  • Gateway and Route are correctly configured, service is ClusterIP with no external IP

Diagnosis

# Check for stale dnsrecord objects in openshift-ingress
oc get dnsrecord -n openshift-ingress

# If a dnsrecord exists, check its target
oc get dnsrecord -n openshift-ingress -o jsonpath='{range .items[*]}{.metadata.name}: {.spec.dnsName} -> {.spec.targets}{"\n"}{end}'

# Check the gateway service type
oc get svc -n openshift-ingress -l gateway.networking.k8s.io/gateway-name=maas-default-gateway \
  -o jsonpath='{.items[0].spec.type}'

# Verify the ELB target is dead
nslookup $(oc get dnsrecord -n openshift-ingress -o jsonpath='{.items[0].spec.targets[0]}')

If the service type is ClusterIP but a dnsrecord exists with a CNAME target that returns NXDOMAIN, this issue is confirmed.

Workaround

Delete the stale dnsrecord:

oc delete dnsrecord -n openshift-ingress \
  $(oc get dnsrecord -n openshift-ingress -o name)

After deletion, internal DNS resolves immediately via the wildcard *.apps.* record (pointing to the OpenShift Router). External DNS may take longer due to negative caching of the stale CNAME.

Note

This only affects clusters where the gateway service type was changed from LoadBalancer to ClusterIP. Fresh ClusterIP deployments (where LoadBalancer was never used) are not affected.

Issue 14: LlamaStackOperator/OGX Conflict Blocks the Entire AIGateway Module

Reproduced live on a RHOAI 3.5.0 cluster (stable-3.x channel) during a fresh Models as a Service install: aigateway.modelsAsAService showed Managed in the DSC spec, but maas-api never deployed, ModelsAsAServiceReady stayed False, and applying MaaSModelRef failed with no matches for kind "MaaSModelRef" in version "maas.opendatahub.io/v1alpha1" - even though the health check, gateway, and PostgreSQL all looked fine. setup-maas.sh timed out waiting 300s for the maas-api deployment to appear.

The root cause has nothing to do with Models as a Service itself: the DSC also had llamastackoperator.managementState: Managed (either left over from a previous state, or defaulted by the CRD schema when the field is omitted). The opendatahub-operator provisions modules in batches by runlevel, and aigateway, mlflowoperator, and ogx are all provisioned together at runlevel 32. Having both llamastackoperator: Managed and ogx: Managed set makes the operator reject the ogx module outright, which aborts that entire batch - so aigateway’s CRDs (maasmodelrefs.maas.opendatahub.io, configs.maas.opendatahub.io, etc.) and mlflowoperator’s CRD never get installed either, even though nothing in the DSC spec or status message mentions llamastackoperator at all.

Symptoms

  • oc get datasciencecluster default-dsc -o jsonpath='{.status.conditions[?(@.type=="Ready")]}' shows "Some modules are not ready: aigateway, mlflowoperator, ogx"
  • AIGatewayReady condition: Failed to get module status: no matches for kind "AIGateway" in version "components.platform.opendatahub.io/v1alpha1"
  • oc get crd | grep maas.opendatahub.io returns nothing - the MaaS CRDs were never installed
  • maas-api deployment does not exist in redhat-ai-gateway-infra (or redhat-ods-applications on 3.4-style layouts), even 5+ minutes after the DSC was applied
  • oc apply -f manifests/05-maas-models/.../maas-model.yaml (or any MaaSModelRef) fails with no matches for kind "MaaSModelRef" ... ensure CRDs are installed first
  • rhods-operator logs (oc logs -n redhat-ods-operator deployment/rhods-operator) repeat "module CRDs not yet available, requesting requeue" for aigateway, mlflowoperator, ogx in an endless loop, interleaved with an ERROR: "BuildModuleCR failed" / error":"LlamaStackOperator is set to Managed; it has been deprecated, set it to Removed before enabling OGX" and "provisioning failed: module provisioning failed: ogx"

Diagnosis

# Confirm the DSC is not Ready and which modules are stuck
oc get datasciencecluster default-dsc -o jsonpath='{.status.conditions[?(@.type=="Ready")]}'

# Check both fields - this is the smoking gun if both show Managed
oc get datasciencecluster default-dsc -o jsonpath='{.spec.components.llamastackoperator}{"\n"}'
oc get datasciencecluster default-dsc -o jsonpath='{.spec.components.ogx}{"\n"}'

# Confirm via operator logs
oc logs -n redhat-ods-operator deployment/rhods-operator --tail=500 \
  | grep -i "LlamaStackOperator is set to Managed"

Workaround

Set llamastackoperator to Removed explicitly (it is superseded by ogx in 3.5 and does not need to stay Managed for anything, including 3.4 compatibility):

oc patch datasciencecluster default-dsc --type=merge \
  -p '{"spec":{"components":{"llamastackoperator":{"managementState":"Removed"}}}}'

# Should flip to True within ~60-90s
oc wait datasciencecluster default-dsc --for=condition=Ready --timeout=180s

Once Ready=True, the aigateway, mlflowoperator, and MaaS CRDs install automatically and maas-api/maas-controller deploy without any further action. Re-run the phase that timed out (for example ./scripts/setup-maas.sh --from-phase 4) to finish deploying models and governance resources.

Important

manifests/04-rhoai-config/datasciencecluster.yaml in this guide now sets llamastackoperator: Removed explicitly alongside ogx: Managed, so fresh installs following Phase 4 as written should not hit this. This issue is most likely to surface on clusters where the DSC already existed (e.g. a prior 3.4 install, or a partially-completed 3.5 attempt) before setup-maas.sh ran - the script detects modelsAsAService: Managed and skips re-applying the DSC, so a pre-existing llamastackoperator: Managed value is never corrected. See Step 3 for the equivalent guidance during a 3.4 -> 3.5 upgrade.

Quick Reference: Triage Order

When you hit problems after upgrading from 3.4 to 3.5, check in this order:

StepCheckFix
1Is DSC Ready? (oc get dsc default-dsc -o jsonpath='{.status.conditions[?(@.type=="Ready")].status}')If not, check for MCP Lifecycle Operator OOM (Issue 1)
2Is the namespace labeled? (oc get ns redhat-ods-applications --show-labels | grep -i maas)Apply label (Issue 3)
3Does maas-api report a hostname error? (check logs in redhat-ai-gateway-infra)Set spec.listeners[].hostname on Gateway (Issue 4)
4Are payload-processing pods OOMKilled?Annotate + increase memory (Issue 5)
5Are ExternalModels missing after upgrade?Recreate as ExternalProvider (Issue 2)
6HTTP 500/503 under load?Set AUTH_SERVICE_TIMEOUT to 10s (Issue 7)
7HTTP 429 Too Many Requests?Increase tokenRateLimits in MaaSSubscription (Issue 9)
8RHCL 1.4.x installed? (oc get csv -n openshift-operators | grep rhcl)Apply WasmPlugin + 2Gi gateway memory fix (Issue 6)
9ext_proc filter_chain_not_found errors in gateway logs?No workaround yet, track OSSM update (Issue 8)
10Playground shows two endpoints for same model?Delete LlamaStackDistribution (Issue 10)
11Cluster behind HTTP proxy and observability metrics show 0? (oc get proxy/cluster -o jsonpath='{.spec.httpProxy}')Override proxy env vars via OpenTelemetryCollector CR (Issue 11)
12Multiple models on same gateway and traffic goes to wrong model?No workaround yet, track RHOAIENG-93709 (Issue 12)
13Changed gateway from LoadBalancer to ClusterIP and DNS broken? (oc get dnsrecord -n openshift-ingress)Delete stale dnsrecord (Issue 13)
14maas-api never appears / MaaSModelRef CRD missing, but modelsAsAService: Managed? (oc get datasciencecluster default-dsc -o jsonpath='{.spec.components.llamastackoperator}')Set llamastackoperator to Removed (Issue 14)

References

9 - Running MaaS on OpenShift 5

Field notes from the first end-to-end MaaS install on OpenShift 5.0 — what carries over unchanged and the seven issues with workarounds.

What happens when you install Red Hat OpenShift AI MaaS on OpenShift 5, which blocks, and what to change. The guide’s other phases are written against OpenShift 4.19+, and this page records the first end-to-end walkthrough on a 5.0 cluster.

Important

This guide is not a replacement for the official Red Hat OpenShift AI MaaS documentation (3.5 | 3.4). OpenShift 5.0 does not appear in the RHOAI 3.x supported configurations matrix at the time of writing, so treat everything here as field notes, not a support statement.

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

Test Cluster

PropertyValue
OpenShift5.0.0-rc.7 (Kubernetes v1.36.5, RHCOS 10.2, cri-o 1.36.6)
PlatformBareMetal, 3 nodes, every node control-plane,master,worker
Node IPs10.10.10.10, 10.10.10.11, 10.10.10.12 (consecutive, which matters for Issue 5)
GPUNone, so the CPU-only simulator model
StorageODF, default StorageClass ocs-external-storagecluster-ceph-rbd
Pre-installedRed Hat Connectivity Link 1.4.2, Service Mesh 3 operator 3.5.0 (Istio 1.31.1), cert-manager, COO, Tempo, GitOps

This was a shared workshop cluster rather than a clean one, which surfaced Issue 4. A clean OpenShift 5 cluster hits Issues 1, 2, 3 and 5 only.

Outcome

MaaS runs on OpenShift 5. After working around the issues below, the full verification suite passed: 15 of 15 end-to-end checks, including inference, authentication enforcement and rate limiting.

Nothing in the MaaS data path needed changing. Every problem was either operator packaging (Issue 1, Issue 2) or a pre-existing assumption in this repo’s own automation that OpenShift 5 happened to expose (Issues 3, 5 and 6). The automation in scripts/setup-maas.sh and manifests/06-verification/verify.sh now handles all of them.

Warning

Everything on this page is RHOAI 3.4.2 on OpenShift 5.0.0-rc.7. RHOAI 3.5 GA was not tested, because the only catalog on this cluster that carries RHOAI is a snapshot taken before 3.5 shipped. That is a property of the test cluster, not a statement about 3.5 on OpenShift 5.

What Works Unchanged

Verified on the cluster above before changing anything:

AreaResult
OLM v0 (operators.coreos.com)Still present and working. Subscription, CSV, InstallPlan and OperatorGroup all behave as on 4.x, so every subscription manifest in manifests/01-prerequisites/ stays valid. OLM v1 (olm.operatorframework.io) exists alongside it but is not needed.
Gateway APIgateway.networking.k8s.io is v1 only. v1beta1 is gone, including for ReferenceGrant. The manifests in this repo already use v1 everywhere, so nothing had to change.
openshift-default GatewayClassStill backed by Istio. The controller name openshift.io/gateway-controller/v1 is unchanged, istiod-openshift-gateway runs in openshift-ingress, and the gateway pod is still an istio-proxy container. This matters because Kuadrant attaches its policies through Istio EnvoyFilters.
Kuadrant policy attachmentWorks. The RHCL operator ships ISTIO_GATEWAY_CONTROLLER_NAMES=openshift.io/gateway-controller/v1, and AuthPolicy / RateLimitPolicy produce the expected kuadrant-auth-*, kuadrant-ratelimiting-* and kuadrant-* EnvoyFilters.
SecurityContextConstraintsThe 28 default SCCs are still present. Nothing in this guide needed an SCC change.
Deprecated APIsoc get apirequestcounts reports no in-use API with a removedInRelease set, so nothing this guide applies is on a removal path.
Operator installsRHOAI 3.4.2, Leader Worker Set 1.0.1 and cert-manager 1.20.1 all reach Succeeded on 5.0.0-rc.7.

Issue 1: The RHOAI Operator Is Not in the OpenShift 5 Catalog

Tracked as RHOAIENG-102811.

Important

Tested on RHOAI 3.4.2 only. GA RHOAI 3.5 could not be tested on OpenShift 5, because no Red Hat catalog publishes a 3.5 channel for it.

Symptoms

The RHOAI Subscription is created and then nothing happens. No InstallPlan, no CSV, and no error that names the cause.

Diagnosis

On OpenShift 5 the redhat-operators CatalogSource points at the 5.0 index, which does not carry the rhods-operator package at all:

oc get catalogsource redhat-operators -n openshift-marketplace -o jsonpath='{.spec.image}{"\n"}'
# registry.redhat.io/redhat/redhat-operator-index:v5.0

oc get packagemanifest -n openshift-marketplace -l catalog=redhat-operators \
  -o jsonpath='{range .items[*]}{.metadata.name}{"\n"}{end}' | grep -icE 'rhods|rhoai|opendatahub'
# 0

That index carries 129 packages and none of them is RHOAI. cert-manager, leader-worker-set and metallb-operator are all there, so the gap is specific to RHOAI.

Note

The OLM v1 ClusterCatalog named openshift-redhat-operators uses the same v5.0 index image, so switching to OLM v1 does not help.

Workaround

Subscribe from a catalog that does publish RHOAI. On RHPDS workshop clusters a snapshot of the 4.22 index is already present:

oc get packagemanifest -n openshift-marketplace --field-selector metadata.name=rhods-operator \
  -o jsonpath='{range .items[*]}{.status.catalogSource}{" default="}{.status.defaultChannel}{"\n"}{end}'
# redhat-operators-v422 default=stable-3.x

oc patch subscription rhods-operator -n redhat-ods-operator --type=merge \
  -p '{"spec":{"source":"redhat-operators-v422","channel":"stable-3.x"}}'

scripts/setup-maas.sh now does this automatically: it looks up which catalog actually publishes each package and repoints the Subscription if the one in the manifest cannot resolve. Use --catalog-source <name> to prefer a specific catalog; the installer still falls back, with a warning, if that catalog does not carry the package.

That snapshot is pinned to a date (v4.22_2026_08_03 on the cluster used here), so what it offers depends on when it was taken. On this one:

oc get packagemanifest -n openshift-marketplace --field-selector metadata.name=rhods-operator \
  -o jsonpath='{range .items[*]}{range .status.channels[*]}{.name}{" -> "}{.currentCSV}{"\n"}{end}{end}'
# stable-3.x -> rhods-operator.3.4.2   <- default
# stable-3.4 -> rhods-operator.3.4.2
# stable-3.3 -> rhods-operator.3.3.4
# beta       -> rhods-operator.3.5.0-ea.2

There is no stable-3.5 channel, because the snapshot predates 3.5 GA. stable-3.x therefore still resolves to 3.4.2, which causes Issue 3.

Note

beta does carry 3.5.0-ea.2, so a 3.5 code path can be exercised with --rhoai-version 3.5 once the Subscription is pointed at that channel. It is a pre-GA build, so treat failures there with suspicion. A newer snapshot, or the official index once it carries RHOAI for OpenShift 5, is the better route to a GA 3.5.

Issue 2: The RHCL Channel stable Does Not Exist

Tracked as RHOAIENG-102811. Same root cause as Issue 1: what the OpenShift 5 index publishes. Worked around automatically, see below.

Symptoms

The Red Hat Connectivity Link Subscription never resolves. Same silent symptom as Issue 1: no InstallPlan, no CSV.

Diagnosis

The guide and the official docs subscribe RHCL with channel: stable. The OpenShift 5 index renamed it:

oc get packagemanifest -n openshift-marketplace -l catalog=redhat-operators \
  --field-selector metadata.name=rhcl-operator \
  -o jsonpath='{.status.defaultChannel}{" | "}{range .status.channels[*]}{.name}{"="}{.currentCSV}{" "}{end}{"\n"}'
# stable-1.5 | stable-1.5=rhcl-operator.v1.5.0

Only stable-1.5 is published, pointing at RHCL 1.5.0. For comparison, the 4.22 snapshot on the same cluster still has stable at rhcl-operator.v1.4.2, so this is a channel rename between the two indexes.

Workaround

Use the channel the cluster publishes:

oc patch subscription rhcl-operator -n openshift-operators --type=merge \
  -p '{"spec":{"channel":"stable-1.5"}}'

That installs RHCL 1.5.0. The manifests in this repo are written against 1.4.2, which is what Multi-Tenancy needs for the gateway-scoped AuthPolicy, and 1.5.0 is covered separately in Running MaaS with RHCL 1.5.

scripts/setup-maas.sh therefore looks for a catalog that publishes the channel the manifest asks for before falling back to any catalog’s default channel. On a cluster that also carries the 4.22 snapshot, RHCL resolves to redhat-operators-v422 / stable and stays on 1.4.2. redhat-operators wins ties, so a snapshot catalog never shadows the official index for an operator both of them publish. Only when no catalog offers the requested channel does the installer fall back to a default, and it warns when it does.

Note

On a cluster carrying only the 5.0 index, stable-1.5 is the single option and you get RHCL 1.5.0. That was validated on OpenShift 4.21 with RHOAI 3.5.2, not on OpenShift 5, see Running MaaS with RHCL 1.5.

Issue 3: The Installer Assumes 3.5 While the Catalog Gives 3.4

Tracked as RHOAIENG-102811. The version mismatch is a consequence of the channel gap. Fixed in this repo’s installer, see below.

Symptoms

setup-maas.sh reports RHOAI 3.5 during preflight, but the CSV that lands is 3.4.2:

# Phase 0
[INFO]   RHOAI version:      3.5 (3.5+: true)
[INFO]   maas-api namespace: redhat-ai-gateway-infra

# Summary, same run
[INFO] RHOAI version: 3.4.2

Diagnosis

With no RHOAI installed, the script defaults to 3.5, which sets IS_35_PLUS=true and selects the 3.5 namespace and DSC layout. The version is detected once in Phase 0, before the operator exists, and never re-read afterwards. Because the only usable channel resolves to 3.4.2 (Issue 1), the run then applies the 3.5 DSC path (aigateway.modelsAsAService) against a 3.4 operator.

The failure mode is quiet, and which command you use decides whether you get any hint at all. On RHOAI 3.4.2 the DataScienceCluster CRD has no aigateway component in either schema version and does not set x-kubernetes-preserve-unknown-fields, so the API server prunes the field. It is never stored.

oc patch does warn. oc apply, which is what the installer and the docs use, does not:

$ oc patch datasciencecluster default-dsc --type=merge --dry-run=server \
    -p '{"spec":{"components":{"aigateway":{"modelsAsAService":{"managementState":"Managed"}}}}}'
Warning: unknown field "spec.components.aigateway"
datasciencecluster.../default-dsc patched (no change)

$ oc apply --dry-run=server -f dsc-with-aigateway.yaml
datasciencecluster.../default-dsc configured (server dry run)

So with oc apply the field is dropped with no warning, the command reports success, and the stored DSC comes back without it. MaaS is simply never enabled.

oc get crd datascienceclusters.datasciencecluster.opendatahub.io -o json | python3 -c "
import json,sys
d=json.load(sys.stdin)
for v in d['spec']['versions']:
    comps=v['schema']['openAPIV3Schema']['properties']['spec']['properties']['components']['properties']
    print(v['name'], '->', sorted(comps.keys()))
"

On 3.4.2 neither schema version lists aigateway, while kserve exposes modelsAsService:

v1 -> ['codeflare', 'dashboard', ..., 'kserve', ...]
v2 -> ['aipipelines', 'dashboard', ..., 'kserve', ...]

This is not specific to OpenShift 5. Any cluster whose stable-3.x channel has not moved to 3.5 hits the same thing.

Workaround

Pin the version explicitly so the code path matches what the catalog will give you:

./scripts/setup-maas.sh --rhoai-version 3.4

setup-maas.sh now also re-reads the installed version from the CSV after Phase 1 and again at the start of Phase 4, and switches the code path with a warning if it differs from what was requested.

Issue 4: An Existing Kuadrant Instance in Another Namespace

RHOAIENG-102811 covers the OpenShift 5 findings overall. This one is environmental rather than a product defect, and the installer handles it, see below.

Only applies to clusters that already run RHCL for something else. Skip on a clean cluster.

Symptoms

MaaS expects Kuadrant, Authorino and Limitador in kuadrant-system. A cluster that already uses RHCL may have them somewhere else, and the install then creates a second set.

Diagnosis

The RHCL operator supports AllNamespaces install mode only, and runs with an empty OPERATOR_NAMESPACE:

oc get csv rhcl-operator.v1.4.2 -n <operator-ns> \
  -o jsonpath='{range .spec.installModes[*]}{.type}={.supported}{" "}{end}{"\n"}'
# OwnNamespace=false SingleNamespace=false MultiNamespace=false AllNamespaces=true

So it watches every namespace and will reconcile a second Kuadrant CR as well. There is no validating webhook to stop you. Both instances then manage the same gateways’ EnvoyFilters, which is why one instance per cluster is the only safe arrangement.

Workaround

Keep one Kuadrant instance. Back up the existing one, remove its policies and CR, and let MaaS create its own in kuadrant-system. The operator itself stays installed:

oc get kuadrant,authorino,limitador,authpolicy,ratelimitpolicy -A -o yaml > kuadrant-backup.yaml

oc delete authpolicy,ratelimitpolicy --all -n <their-namespace>
oc delete kuadrant <name> -n <their-namespace>
Warning

If the existing instance is managed by GitOps, deletions get reverted. Argo CD applications with syncPolicy.automated.selfHeal: true restore the CR within minutes, and an app-of-apps pattern also restores any change you make to the child application. Suspend automated sync on the parent and the child first, then delete.

setup-maas.sh now detects an operator already subscribed from a different namespace, skips creating a duplicate Subscription, and waits for the CSV in the namespace where the operator actually lives instead of the one the manifest expects.

Issue 5: The MetalLB Pool Can Land on a Node IP

Not a product issue: this was a bug in this repo’s own installer, fixed in (#203).

Symptoms

After MaaS installs on a non-cloud cluster, the OpenShift console and OAuth stop answering. curl against the console route returns nothing at all.

Diagnosis

On a platform with no cloud load balancer, the gateway Service stays Pending and the installer brings up MetalLB. The address for the pool used to be derived as “first node IP plus one”. On a cluster whose nodes have consecutive addresses, that formula lands the pool on another node:

oc get nodes -o jsonpath='{range .items[*]}{range .status.addresses[?(@.type=="InternalIP")]}{.address}{"\n"}{end}{end}'
# 10.10.10.10
# 10.10.10.11   <- nodeIP+1 would claim this
# 10.10.10.12

MetalLB then advertises an address that a node already owns, and the two compete for port 443.

Workaround

Never give MetalLB an address that belongs to a node. setup-maas.sh now collects every node InternalIP and skips all of them when choosing the pool address, failing with an explicit message if it cannot find a free one rather than picking a colliding address.

To check an existing install:

GW=$(oc get gateway maas-default-gateway -n openshift-ingress -o jsonpath='{.status.addresses[0].value}')
oc get nodes -o jsonpath='{.items[*].status.addresses[?(@.type=="InternalIP")].address}' | grep -q "$GW" \
  && echo "COLLISION: gateway address is a node IP" || echo "OK"

Issue 6: verify.sh Inference Checks Fail on RHOAI 3.4

Not a product issue: this was a bug in this repo’s own verify.sh, fixed in (#203).

Symptoms

verify.sh reports the platform healthy but three checks fail, and every failure is HTTP 404:

[FAIL] Inference returned HTTP 404 (expected 200)
[FAIL] Unauthenticated request returned HTTP 404 (expected 401/403)
[FAIL] Invalid token returned HTTP 404 (expected 401/403)
[WARN] No 429 responses in 16 requests.

A 404 on the unauthenticated request is the giveaway. If authentication were the problem the gateway would answer 401 or 403. A 404 means no route matched at all, so the request never reached the auth filter.

Diagnosis

The two RHOAI releases expose inference differently.

On 3.5 the gateway serves /v1/chat/completions at the root and picks the backend from the model field in the request body (body-based routing). On 3.4 there is no root route. Each model is reachable only under its own path prefix, and no body-based routing EnvoyFilter exists:

oc get httproute -n llm -o jsonpath='{range .items[0].spec.rules[*]}{range .matches[*]}{.path.value}{"\n"}{end}{end}'
# /llm/facebook-opt-125m-simulated/v1/completions
# /llm/facebook-opt-125m-simulated/v1/chat/completions
# /llm/facebook-opt-125m-simulated/v1/responses
# /llm/facebook-opt-125m-simulated

verify.sh built the inference URL from the gateway base, which resolves to https://maas.<domain>/v1/chat/completions. That path only exists on 3.5. The models listing passed because /v1/models is served at the root by maas-api-route, which is what made the failure look like an auth or timing problem rather than a routing one.

Workaround

Use the per-model URL that the API already returns in the listing:

MODEL_URL=$(curl -sk "https://maas.${CLUSTER_DOMAIN}/maas-api/v1/models" \
  -H "Authorization: Bearer ${API_KEY}" | jq -r '.data[0].url')

curl -sk "${MODEL_URL}/v1/chat/completions" \
  -H "Authorization: Bearer ${API_KEY}" -H 'Content-Type: application/json' \
  -d '{"model":"facebook/opt-125m","messages":[{"role":"user","content":"hi"}],"max_tokens":10}'

verify.sh now reads .data[0].url from the listing and falls back to the gateway root when the listing does not provide one, so it is correct on both 3.4 and 3.5. With that change the same cluster reports 15 of 15 passing.

Note

Expect a short window right after deploying a model where requests still return 404 while Envoy picks up the new route. It clears on its own in about two minutes.

Issue 7: The Gateway HPA Sits at Maximum Replicas

Tracked upstream as RHOAIENG-71755 (gateway resource workaround, open) and RHOAIENG-68589 (gateway OOMKill). Worked around in this repo, see below.

Not specific to OpenShift 5, but easy to miss and expensive on a small cluster.

Symptoms

The MaaS gateway runs at its replica ceiling with no traffic to justify it:

oc get hpa maas-default-gateway-openshift-default -n openshift-ingress
# TARGETS         MINPODS   MAXPODS   REPLICAS
# cpu: 186%/80%   2         10        10

Ten gateway pods, each with a 2Gi memory limit, on a three node cluster.

Diagnosis

The gateway HPA scales on CPU utilisation measured against the container’s CPU request. manifests/02-platform-config/gateway-resources.yaml sets that request to 100m, so the 80% target is 80 millicores. A gateway running the Kuadrant Wasm filters idles well above that:

oc adm top pods -n openshift-ingress | grep maas-default-gateway
# ... 145m   404Mi
# ... 271m   419Mi

Observed usage of 145m to 271m against an 80m threshold means the HPA scales up until it hits maxReplicas and stays there. Memory is not the constraint: the pods use around 400Mi of the 2Gi limit.

Workaround

Give the HPA a realistic baseline by raising the CPU request. manifests/02-platform-config/gateway-resources.yaml now ships cpu: 500m instead of 100m, so a fresh install gets this by default. The Gateway picks it up through spec.infrastructure.parametersRef, so no Deployment patch is needed.

For a cluster already installed, re-apply the ConfigMap:

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

# Istio merges it into the Deployment within seconds
oc get deployment maas-default-gateway-openshift-default -n openshift-ingress \
  -o jsonpath='{.spec.template.spec.containers[0].resources.requests.cpu}{"\n"}'

Measured on the cluster used here: the request went from 100m to 500m, and the gateway dropped from 10 replicas back to minReplicas: 2 within ten seconds, with the health endpoint still returning HTTP 200.

Note

The gateway still spikes above the threshold while it compiles the Wasm filters at startup, so you may briefly see it scale up after a rollout. That is the HPA doing its job. The problem being fixed here is it never scaling back down.

Keep the 2Gi memory limit. That is the RHOAIENG-68589 workaround and it is still required: the gateway container defaults to 1Gi, and this cluster confirmed the default is unchanged on OpenShift 5 with Service Mesh 3.5.0 and Istio 1.31.1.

Verification Results

Measured on the cluster described above, RHOAI 3.4.2, after applying the workarounds.

CheckResultDetail
verify.sh end-to-end15 / 15Includes inference HTTP 200, unauthenticated 401, invalid token 401, rate limiting 3 allowed and 13 limited out of 16
Gateway addressPASSMetalLB assigned 10.10.10.13, which is not any node address
Gateway memory and restartsPASS2Gi limit, 0 restarts, no OOMKill
Console and OAuthPASSHTTP 200, so no MetalLB collision
RHOAI dashboardPASSHTTP 301 to login
llm namespace labelsPASSdashboard, gateway-access and generated-namespace all present
RHCLPASS1.4.2, Succeeded, Automatic approval
Model storage initPASSNo pods stuck in Init, no Xet hang
MaaS CRDsPASSmaasmodelrefs, maasauthpolicies, maassubscriptions registered
Health endpointPASSReturns {"status":"healthy"}
DSC readinessPASSModelsAsServiceReady=True, postgres, maas-api, maas-controller and authorino each at 1 replica

Operator Versions

OperatorVersion
RHOAI3.4.2
Red Hat Connectivity Link1.4.2
cert-manager1.20.1
Leader Worker Set1.0.1
Service Mesh 3 (Istio)3.5.0 (Istio 1.31.1)
MetalLB5.0.0

Troubleshooting Quick Reference

SymptomCause
Subscription sits with no InstallPlan and no CSVThe channel or the package is not published in the catalog the Subscription targets. See Issue 1 and Issue 2. Run oc get packagemanifest -n openshift-marketplace --field-selector metadata.name=<pkg> to see which catalogs have it.
maas-api never deploys, ModelsAs(A)ServiceReady stays FalseA 3.5-shaped DSC was applied to a 3.4 operator and the API server pruned the unknown field. See Issue 3.
Console and OAuth stop answering after installMetalLB is advertising an address that belongs to a node. See Issue 5.
Inference returns 404, including without credentialsWrong inference URL for the RHOAI version, or Envoy has not yet synced a freshly deployed route. See Issue 6.
Gateway pods CrashLoopBackOff with exit code 137The 1Gi default memory limit. Apply the maas-gateway-options ConfigMap, see Issue 7.
Two sets of Authorino and Limitador podsMore than one Kuadrant CR on the cluster. See Issue 4.

10 - Running MaaS with RHCL 1.5

Field notes from installing Red Hat OpenShift AI 3.5.2 MaaS on Red Hat Connectivity Link (RHCL) 1.5.0, side by side with the MCP Gateway GA that ships inside RHCL 1.5.

Field notes from installing Red Hat OpenShift AI 3.5.2 MaaS on Red Hat Connectivity Link (RHCL) 1.5.0, side by side with the MCP Gateway GA that ships inside RHCL 1.5. The rest of this guide is written against RHCL 1.4.x.

Important

At the time of writing (November 2026) the RHCL supported configurations article only lists releases up to 1.4, and the Red Hat OpenShift AI 3.x supported configurations matrix points to it for RHCL versions. So this page is a validation run, not a support statement. Check both articles before you go to production with this combination. A support statement is requested in RHOAIENG-103137.

Tip

All file paths and oc apply commands in this guide are relative to the CAI-Field-Manual-MaaS repository root.

Why This Page Exists

The MCP Gateway went GA in RHCL 1.5 (announcement). In the RHCL 1.4 timeframe it was a Technology Preview mcp-gateway operator (0.7.1, preview channel). Customers who deploy MaaS and also want the GA MCP Gateway are asking if they can run RHCL 1.5 under Red Hat OpenShift AI 3.5.2. This page records what was tested and what had to change.

Test Cluster

PropertyValue
OpenShift4.21.36, single node (control-plane,master,worker), BareMetal, no GPU
Red Hat OpenShift AIrhods-operator.3.5.2 from stable-3.x, fresh install
RHCLrhcl-operator.v1.5.0 from stable-1.5, fresh install in openshift-operators
MCP GatewayBundled in RHCL 1.5 (chart 1.0.2, API mcp.kuadrant.io/v1), installed with the MCP Gateway guide
GatewayClassopenshift-default (Ingress Operator managed), shared by the MaaS and MCP gateways
ModelCPU-only simulator

Outcome

Both work on the same cluster, sharing one RHCL and one Kuadrant instance:

  • scripts/verify-maas.sh: 15 of 15 checks passed (API keys, inference, 401 on missing and invalid tokens, token rate limiting).
  • MCP Gateway guide verify.sh: 16 tools discovered across two servers, tools/call through the hairpin works.
  • An AuthPolicy on the MCP gateway was enforced by the shared Authorino in kuadrant-system (403 without credentials, 200 with).
  • No EnvoyFilter or Wasm reconcile loop. With both gateways idle the Kuadrant operator logged 0 Wasm config builds and 0 EnvoyFilter events in 4 minutes.

It needed two fixes on the MaaS side and one on the MCP side, all described below. Multi-Tenancy, Observability, External Models and External OIDC were not exercised on 1.5.

What Changes in RHCL 1.5

RHCL 1.5 is a consolidated operator. In 1.4 the rhcl-operator pulled in Authorino, Limitador and DNS as separate OLM dependencies, and the MCP Gateway was one more operator on top. In 1.5 there is one CSV and one Subscription:

oc get csv -n openshift-operators -l '!olm.copiedFrom'
NAME                   PHASE
rhcl-operator.v1.5.0   Succeeded

The operator then deploys the other components itself from bundled Helm charts, tracked by a cluster-scoped KuadrantControlPlane named default:

oc get kuadrantcontrolplane default \
  -o jsonpath='{range .status.components[*]}{.name}{"\t"}{.chartVersion}{"\t"}{.ready}{"\n"}{end}'
dns-operator                  0.18.0   true
mcp-gateway                   1.0.2    true
authorino-operator            0.27.0   true
limitador-operator            0.19.0   true
developer-portal-controller   0.3.1    true

All of them run as plain Deployments in the operator namespace (openshift-operators here). The MCP Gateway controller is always deployed, even if you never create an MCPGatewayExtension, and its CRDs serve only mcp.kuadrant.io/v1. v1alpha1 is no longer served.

Installing RHCL 1.5 for MaaS

The checked-in Subscription in manifests/01-prerequisites/operators/connectivity-link/ uses channel: stable, which is still RHCL 1.4.x on OpenShift 4.x. To get 1.5, subscribe to stable-1.5:

oc apply -f - <<'EOF'
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: rhcl-operator
  namespace: openshift-operators
spec:
  channel: stable-1.5
  installPlanApproval: Automatic
  name: rhcl-operator
  source: redhat-operators
  sourceNamespace: openshift-marketplace
EOF

Then install the other three operators one by one. Do not run oc apply -k manifests/01-prerequisites/operators/ as a whole, because it also applies the checked-in RHCL Subscription and resets the channel to stable:

oc apply -k manifests/01-prerequisites/operators/rhoai-operator/
oc apply -k manifests/01-prerequisites/operators/cert-manager/
oc apply -k manifests/01-prerequisites/operators/leader-worker-set/

scripts/setup-maas.sh leaves an existing RHCL Subscription alone, installed or still pending, so it will not flip it back to stable.

Issue 1: Kuadrant Stuck on AuthorinoNotReady, API Keys Return 500

This one breaks MaaS on a fresh RHCL 1.5 install if you follow the documented order.

Tracked as RHOAIENG-103136 (MaaS and docs) and CONNLINK-1976 (Authorino operator).

Symptoms

The install finishes, the model is Ready, but every call through the gateway that needs Authorino fails. verify-maas.sh reports Failed to create API key with Internal Server Error, and maas-api never logs the request:

oc get kuadrant kuadrant -n kuadrant-system \
  -o jsonpath='{.status.conditions[?(@.type=="Ready")].message}{"\n"}'
listener secret name authorino-server-cert not found, err: Secret "authorino-server-cert" not found

Diagnosis

Phase 2 (and the Red Hat OpenShift AI docs) create the authorino-authorino-authorization Service with the service.beta.openshift.io/serving-cert-secret-name annotation before the Kuadrant CR, so service-ca issues the certificate. With RHCL 1.5 the Authorino operator takes that Service over when it reconciles the new Authorino CR and rewrites it without the annotation. Since authorino-operator 0.27.0 that Service is headless (CONNLINK-1913), and clusterIP cannot change in place, so the operator replaces the ClusterIP Service the manifest created. RHCL 1.4.4 ships the same operator change, so it is likely affected too (not tested). No annotation means no Secret, and Authorino’s TLS listener never starts:

oc get svc authorino-authorino-authorization -n kuadrant-system \
  -o jsonpath='{.metadata.annotations.service\.beta\.openshift\.io/serving-cert-secret-name}{"\n"}'

Empty output confirms it.

It only happens once, at adoption. An annotation added after Authorino exists survives an operator restart and later changes to the Authorino CR.

Workaround

Annotate the Service again once Authorino is running, then restart Authorino:

oc annotate svc authorino-authorino-authorization -n kuadrant-system \
  service.beta.openshift.io/serving-cert-secret-name=authorino-server-cert --overwrite

for i in $(seq 1 24); do
  oc get secret authorino-server-cert -n kuadrant-system &>/dev/null && break
  sleep 5
done
oc get secret authorino-server-cert -n kuadrant-system \
  || { echo "Secret not created after 120s, check the service-ca operator"; false; }

oc rollout restart deployment/authorino -n kuadrant-system
oc wait kuadrant/kuadrant -n kuadrant-system --for=condition=Ready --timeout=180s

scripts/setup-maas.sh now re-applies the annotation after it patches the Authorino CR and waits for the Secret, which is harmless on 1.4.

Issue 2: The Kuadrant Operator Runs Close to Its Memory Limit

Tracked as CONNLINK-1878, filed on RHCL 1.4.3 where the limit was 300Mi and the memory growth came from repeated Wasm EnvoyFilter reconciles.

Symptoms

The operator pod is OOM-killed or restarts after more gateways, policies or subscriptions are added. In the field this was reported after “a few subscriptions”.

Diagnosis

The CSV gives kuadrant-operator-controller-manager a 500Mi limit. On the test cluster it was already at 368Mi before any Kuadrant CR existed, and peaked at 481Mi with one MaaS gateway, one MCP gateway and their policies:

oc adm top pod -n openshift-operators | grep kuadrant-operator
oc get deploy kuadrant-operator-controller-manager -n openshift-operators \
  -o jsonpath='{.spec.template.spec.containers[0].resources}{"\n"}'

Workaround

Raise it through the Subscription. The Deployment is owned by the CSV, so oc patch deployment is reverted by OLM:

oc patch subscription rhcl-operator -n openshift-operators --type=merge -p '{
  "spec": {"config": {"resources": {
    "requests": {"cpu": "100m", "memory": "512Mi"},
    "limits":   {"memory": "2Gi"}
  }}}
}'

The RHCL 1.5 CSV contains only this one Deployment, so the setting does not touch Authorino, Limitador or the MCP controller, which the operator deploys on its own.

Running the MCP Gateway Next to MaaS

These apply when you also follow the MCP Gateway guide on the same cluster.

One Kuadrant Instance

Tracked as CONNLINK-1713 (reject a second instance instead of ignoring it) and CONNLINK-1886 (RFE for several isolated instances).

RHCL 1.5 treats Kuadrant as a singleton. A second CR in another namespace gets no status, no event and no Authorino or Limitador. It is ignored without any message. The MCP Gateway guide creates its own Kuadrant in mcp-gateway for authentication, so:

  • If MaaS is installed first, skip that step. The MaaS instance in kuadrant-system enforces AuthPolicy on the MCP gateway too.
  • If the MCP Gateway guide ran first, delete its Kuadrant CR before Phase 2. Otherwise the MaaS one is the instance that gets ignored, and MaaS never gets its Authorino in kuadrant-system.
oc get kuadrant -A

There should be exactly one row, in kuadrant-system.

Point the MCP Auth EnvoyFilter at kuadrant-system

MaaS turns on Authorino’s TLS listener, so every gateway that uses an AuthPolicy needs an EnvoyFilter that talks TLS to Authorino. The MCP guide ships one (manifests/07-authentication/envoyfilter-auth-ssl.yaml), but it assumes Authorino lives in mcp-gateway. Point it at kuadrant-system:

sed 's/authorino-authorino-authorization.mcp-gateway.svc/authorino-authorino-authorization.kuadrant-system.svc/g' \
  <path-to>/mcp-gateway-guide/manifests/07-authentication/envoyfilter-auth-ssl.yaml | oc apply -f -

Without it, every request to the MCP endpoint returns 500 once an AuthPolicy is attached, with or without valid credentials.

Only One LoadBalancer IP

On clusters without a cloud load balancer, setup-maas.sh installs MetalLB with a single-address pool. Any gateway Service of type LoadBalancer competes for it. On the test cluster the MCP gateway, created first, took the address and maas-default-gateway stayed Programmed=False with AddressNotAssigned. The model reported GatewaysNotReady.

The MCP gateway is exposed through an OpenShift Route and does not need a load balancer. Switch its Service to ClusterIP (Phase 2 Step 4 of the MCP guide):

oc apply -f - <<EOF
apiVersion: v1
kind: ConfigMap
metadata:
  name: mcp-gateway-infra
  namespace: mcp-gateway
data:
  service: |
    spec:
      type: ClusterIP
EOF

oc patch gateway mcp-gateway -n mcp-gateway --type=merge -p '{
  "spec": {"infrastructure": {"parametersRef": {
    "group": "", "kind": "ConfigMap", "name": "mcp-gateway-infra"}}}
}'

MetalLB then hands the address to maas-default-gateway within seconds.

Upgrading an Existing RHCL 1.4 Install

Upgrade guidance is requested in CONNLINK-1973. Not tested here. Two things to know from the upstream code (kuadrant-operator v1.6.0, which is what RHCL 1.5.0 is built from):

  • At startup the 1.5 operator removes the old Authorino, Limitador and DNS operator Subscriptions and CSVs, then deploys those components itself.
  • It looks for the old mcp-gateway Subscription only in the mcp-system namespace. The MCP Gateway guide installs it in mcp-gateway, so the TP 0.7.1 operator would be left running next to the GA controller. Remove the mcp-gateway Subscription and CSV yourself before upgrading, and migrate your MCP manifests to mcp.kuadrant.io/v1.

Do this on a test cluster first.

  • Field reports that triggered this validation: RHCL 1.5 with Red Hat OpenShift AI 3.5.2 MaaS for the GA MCP Gateway, with operator memory pressure and an EnvoyFilter/Wasm reconcile loop when using the MCP Gateway. The memory issue reproduced (Issue 2). The loop did not reproduce on this setup with one Kuadrant instance, nor after adding a second one.
  • Running MaaS on OpenShift 5, Issue 2: on OpenShift 5 only stable-1.5 is published.
  • RHOAIENG-103137: docs request for an RHCL 1.5 support statement with Red Hat OpenShift AI 3.5.x and for MaaS and the MCP Gateway on one cluster.
  • RHOAIENG-98735: MCP Gateway GA documentation, targeted at Red Hat OpenShift AI 3.6.

11 - Reference

Architecture, request deep dive, API key security, multi-tenancy, CORS, and model swap.

11.1 - Architecture & Request Flow

How Red Hat OpenShift AI Models as a Service works under the hood — what each component does and how a request travels from a user’s laptop to a model and back.

This page explains how Red Hat OpenShift AI Models as a Service works under the hood — what each component does and how a request travels from a user’s laptop to a model and back.

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.

Component Overview

Models as a Service is built from four layers, each with a distinct responsibility:

LayerComponentsRole
GatewayGateway API, IstioEntry point for all traffic. HTTPRoutes direct requests to the right model endpoint.
PolicyKuadrant, Authorino, LimitadorEnforce authentication, authorization, and rate limiting at the edge — before requests reach any model.
API & Tokenmaas-api, PostgreSQLAPI key lifecycle: mint, validate, and revoke sk-oai-* keys. Stores hashed keys and subscription bindings.
Model ServingKServe (LLMInferenceService), vLLM, ExternalModelRun inference. Internal models run as vLLM pods on-cluster; external models proxy to third-party APIs (Anthropic, OpenAI, etc.).

Request Flow: Step by Step

Here is what happens when a user makes an inference request, from their laptop to the model and back.

graph TB
    subgraph UserLayer["User"]
        U[User]
    end

    subgraph GatewayLayer["Gateway & Policy"]
        G[Gateway]
        MAP[MaaSAuthPolicy<br/>Authorino]
        MS[MaaSSubscription<br/>Limitador]
    end

    subgraph MaaSLayer["Token Management"]
        API[MaaS API]
    end

    subgraph ModelLayer["Model Serving"]
        INV[Inference Service]
        LLM[LLM]
    end

    U -->|"1. Inference + API key"| G
    G -->|"2. Validate identity"| MAP
    MAP -.->|"3. Validate key"| API
    MAP -->|"4. Check limits"| MS
    MS -.->|"5. Within limits"| INV
    INV -->|"6. Forward"| LLM
    LLM -->|"7. Completion"| U

    MAP -.->|"401/403"| U
    MS -.->|"429"| U

Diagram source: Upstream MaaS Architecture

1. Create an API Key

The user authenticates with their OpenShift token (or an external IdP token) and requests an API key:

curl -X POST https://maas.${CLUSTER_DOMAIN}/maas-api/v1/api-keys \
  -H "Authorization: Bearer <identity-token>" \
  -d '{"subscription": "my-subscription", "expiresIn": "24h"}'

Authorino validates the identity token. If valid, maas-api generates a random sk-oai-* key, hashes it with SHA-256, stores the hash and subscription binding in PostgreSQL, and returns the plaintext key once.

Note

The subscription field is optional. If you omit it, maas-api binds the highest-priority subscription your groups have access to. The field name is subscription (not subscriptionName).

2. Send an Inference Request

The user sends a chat completion request using the API key:

curl https://maas.${CLUSTER_DOMAIN}/v1/chat/completions \
  -H "Authorization: Bearer sk-oai-..." \
  -H "Content-Type: application/json" \
  -d '{"model": "my-model", "messages": [{"role": "user", "content": "Hello"}]}'

3. Gateway Receives the Request

The request hits the maas-default-gateway in the openshift-ingress namespace. The Gateway API controller (backed by Istio) matches the request against HTTPRoutes to determine which backend to forward to.

4. Authorino Validates the API Key

Before the request reaches any model, Authorino intercepts it (via MaaSAuthPolicy) and calls the maas-api /internal/v1/api-keys/validate endpoint:

  • Looks up the salted hash in PostgreSQL
  • Returns the user identity (username, groups, key ID) and the subscription name bound to that key
  • Rejects unknown, revoked, expired, or malformed keys with 401 Unauthorized

5. Subscription Access Check

Using the subscription name from the key record (not from client headers), Authorino checks:

  • Is the user/group allowed to use this subscription?
  • Is the requested model included in the subscription?

If either check fails, the request is rejected with 403 Forbidden.

6. Rate Limiting

Limitador checks the request against the rate limits defined in the MaaSSubscription CR:

  • Requests per minute/hour
  • Token budgets per time window

If the user has exceeded their limits, the request is rejected with 429 Too Many Requests.

7. Forward to Model

If all checks pass, the request is forwarded to the model backend:

  • Internal model (InferenceService): routed to a vLLM pod running on-cluster via KServe
  • External model (ExternalModel): proxied to a third-party API (e.g., Anthropic Claude, OpenAI GPT)

The model processes the request and returns a completion response.

8. Response Returns to User

The response flows back through the Gateway to the user. Limitador updates usage counters (tokens consumed, requests made) for the subscription.

Sequence Diagram

The full inference flow as a sequence diagram, showing every component interaction:

sequenceDiagram
    participant Client
    participant GatewayAPI
    participant Authorino
    participant MaaS as MaaS API
    participant Limitador
    participant LLMInferenceService

    Client->>GatewayAPI: Inference + API Key
    GatewayAPI->>Authorino: Validate credentials

    alt API key (sk-oai-*)
        Authorino->>MaaS: POST /internal/v1/api-keys/validate
        MaaS->>MaaS: Lookup hash in PostgreSQL
        MaaS-->>Authorino: { valid, userId, groups, subscription }
    end

    Authorino->>MaaS: POST /internal/v1/subscriptions/select (subscription check)
    MaaS-->>Authorino: Selected subscription

    Authorino->>GatewayAPI: Auth success (cached)
    GatewayAPI->>Limitador: Check TokenRateLimitPolicy
    Limitador-->>GatewayAPI: Within limits
    GatewayAPI->>LLMInferenceService: Forward request
    LLMInferenceService-->>Client: Response

Interactive Flow Visualizer

To see all of the above in action, explore the interactive animated visualizer — it walks through 5 complete flows (including auth failures and rate limiting) step by step with clickable components and a request/response inspector.

For pod-by-pod debugging with oc commands, see Request Deep Dive.

Note

5 Flows | 5 Providers | Two-stage IPP | 33 Steps | 30+ Components Corrected two-stage IPP (pre/post Kuadrant), WasmPlugin CRs, ExternalProvider/ExternalModel split, ipp-managed label, redhat-ai-gateway-infra namespace.

References

11.2 - Request Deep Dive: Pod-by-Pod Tracing

Traces an inference request through every pod in the Red Hat OpenShift AI 3.5 Models as a Service stack, with the oc commands to debug each hop.

This page traces an inference request through every pod in the Red Hat OpenShift AI 3.5 Models as a Service stack. Use it to understand where to look when debugging, what each component does to the request, and which oc commands to run.

Tip

For an animated walkthrough of these flows, see the RHOAI 3.5 Flow Visualizer .

Envoy Filter Chain (Inside the Gateway)

The maas-default-gateway Envoy proxy in openshift-ingress processes every request through this filter chain:

Envoy filter chain - 4 stages inside the Gateway
OrderFilterPod / MechanismWhat It Does
①ext_proc (IPP Pre)payload-pre-processingRuns two plugins: model-extractor (body-field-to-header) copies the model field from the body into the X-Gateway-Model-Name header, and model-provider-resolver resolves it. Runs BEFORE auth so Kuadrant can use the header for per-model policy matching.
②wasm (Kuadrant)WasmPlugin CR (in-process)Auth via Authorino (gRPC), rate limiting via Limitador (gRPC). Uses X-Gateway-Model-Name for route-level policy enforcement.
③ext_proc (IPP Post)payload-processingHeader guarding, usage enforcement, provider resolution, API format translation, credential injection. Runs AFTER auth completes.
④router(built-in)Routes the mutated request to the upstream - external provider API or on-cluster InferencePool/InferenceService.
# View the EnvoyFilter that configures the two-stage IPP
oc get envoyfilter payload-processing -n openshift-ingress -o yaml

# View the Kuadrant WasmPlugin
oc get wasmplugin -n openshift-ingress -o yaml

# View all filters on the gateway
oc get envoyfilters -n openshift-ingress

Namespace Map

Every component lives in a specific namespace. Here is the full layout for RHOAI 3.5:

RHOAI 3.5 namespace map
NamespaceComponentsPurpose
openshift-ingressmaas-default-gateway (Envoy), payload-pre-processing, payload-processing, istiod, kube-auth-proxy, router-defaultGateway, IPP ext_proc pods, Istio control plane
redhat-ai-gateway-inframaas-api, maas-api-key-cleanup (CronJob)API key management (moved from redhat-ods-applications in 3.5)
redhat-ods-applicationsmaas-controller, maas-ui, postgresMaaS controller, UI, PostgreSQL database
kuadrant-systemauthorino, limitador-limitadorAuth server, rate limit server
models-as-a-serviceMaaSAuthPolicy, MaaSSubscription CRsUser-facing access control and quota definitions
ai-tenantsAITenant CRsMulti-tenancy configuration
model namespace (e.g., llm)vLLM pods, MaaSModelRef, TokenRateLimitPolicy, LLMInferenceServiceModel serving workloads
external-models namespaceExternalProvider, ExternalModel CRsThird-party API proxy configuration
# Quick view of all MaaS-related pods across namespaces
oc get pods -n openshift-ingress -l app.kubernetes.io/part-of=maas 2>/dev/null; \
oc get pods -n redhat-ai-gateway-infra; \
oc get pods -n redhat-ods-applications | grep -E 'maas|postgres'; \
oc get pods -n kuadrant-system

Pod-by-Pod Request Trace

External Model Request (e.g., Anthropic)

External model request sequence
StepPodNamespaceWhat HappensDebug Command
1client-Sends POST /v1/chat/completions with Authorization: Bearer sk-oai-...curl -v https://maas.${CLUSTER_DOMAIN}/v1/chat/completions ...
2-4payload-pre-processingopenshift-ingressParses JSON body, extracts model field, sets X-Gateway-Model-Name header. Resolves model type.oc logs -n openshift-ingress deploy/payload-pre-processing -f
5-6maas-default-gateway (Wasm)openshift-ingressKuadrant WasmPlugin triggers auth-service actionoc logs -n openshift-ingress deploy/maas-default-gateway-istio -c istio-proxy -f
7authorinokuadrant-systemReceives gRPC call from Wasm shim. Calls MaaS API to validate the sk-oai-* key. On success, injects the identity headers (X-MaaS-Username, X-MaaS-Group, X-MaaS-Subscription) from the validation result via the MaaSAuthPolicy response stage.oc logs -n kuadrant-system deploy/authorino -f
8-9maas-apiredhat-ai-gateway-infraLooks up key hash in PostgreSQL. Returns the validation result {valid, userId, groups, subscription} to Authorino (a JSON body, not headers). The subscription comes from the key record bound at mint time.oc logs -n redhat-ai-gateway-infra deploy/maas-api -f
10limitador-limitadorkuadrant-systemReceives gRPC call from Wasm shim. Checks token quota for the subscription.oc logs -n kuadrant-system deploy/limitador-limitador -f
11-17payload-processingopenshift-ingressRuns post-processing plugins in order: maas-headers-guard, stream-usage-enforcer, model-provider-resolver (resolves ExternalModel CRD), api-translation (OpenAI to Anthropic format), apikey-injection (injects provider key from Secret).oc logs -n openshift-ingress deploy/payload-processing -f
18-19maas-default-gateway (router)openshift-ingressRoutes mutated request to https://api.anthropic.com/v1/messagesoc logs -n openshift-ingress deploy/maas-default-gateway-istio -c istio-proxy -f
20Anthropic API-Processes request, returns Anthropic Messages format response-
21-22payload-processingopenshift-ingressResponse plugins: api-translation converts Anthropic response back to OpenAI format (only when response translation is enabled - see note below)oc logs -n openshift-ingress deploy/payload-processing -f
23-25maas-default-gateway (Wasm)openshift-ingressKuadrant Wasm reads usage.total_tokens from response body. Reports consumed tokens to Limitador via gRPC.oc logs -n openshift-ingress deploy/maas-default-gateway-istio -c istio-proxy -f
26client-Receives OpenAI-format response regardless of which provider was used-
Note

Response api-translation is off by default. The payload-processing-plugins ConfigMap ships with an empty response profile (response: []) so streaming (SSE) is not held by a response processor. Providers that rewrite responses (for example Anthropic Messages to OpenAI) need it enabled manually on the ConfigMap. Steps 21-22 above only run once you opt in. See the upstream MaaS docs (External Model Setup - IPP response translation).

Internal Model Request (P/D Disaggregated)

Internal Model P/D disaggregated sequence

After step 16 (IPP Post returns to Gateway), the internal model flow diverges:

StepPodNamespaceWhat HappensDebug Command
17-19EPP (ext_proc)model namespaceEndpoint Picker selects optimal Prefill and Decode pods based on KV cache utilization and queue depthoc logs -n <model-ns> deploy/<epp-deploy> -f
20-21Sidecarmodel namespaceCoordinates the Prefill/Decode transactionoc logs -n <model-ns> <sidecar-pod> -f
22-23Prefill Pod (vLLM)model namespaceProcesses input prompt, generates KV cache, returns KVXfer metadataoc logs -n <model-ns> <prefill-pod> -c kserve-container -f
24-25NIXLmodel namespaceHigh-speed KV cache transfer from Prefill to Decode pod (GPU-direct RDMA or DCN)-
26-27Decode Pod (vLLM)model namespacePulls KV cache via NIXL, generates tokens auto-regressively, streams response back to Gatewayoc logs -n <model-ns> <decode-pod> -c kserve-container -f

Key Configuration Resources

CRD relationship hierarchy

These are the ConfigMaps, Secrets, and CRDs that control the request flow:

ResourceNamespacePurpose
ConfigMap/payload-processing-pluginsopenshift-ingressDefines which plugins run in IPP pre and post stages
Secret with label inference.llm-d.ai/ipp-managed=trueexternal-models namespaceProvider API keys for apikey-injection plugin (3.5 label; was bbr-managed in 3.4)
Config/default(cluster-scoped)Platform anchor CR that triggers MaaS controller reconciliation
AITenantai-tenantsMulti-tenancy configuration for the AI Gateway
MaaSModelRefmodel namespaceMaps user-facing model name to provider endpoint and target model ID
MaaSAuthPolicymodels-as-a-serviceConfigures API key authentication via K8s Secret
MaaSSubscriptionmodels-as-a-serviceDefines quota - associates user/team with allowed models and rate limits
ExternalProviderexternal-models namespaceProvider connection config (URL, auth type)
ExternalModelexternal-models namespaceMaps model name to provider and target model
AuthPolicyopenshift-ingressGenerated by maas-controller from MaaSAuthPolicy
TokenRateLimitPolicymodel namespaceGenerated by maas-controller from MaaSSubscription
# View IPP plugin configuration
oc get cm payload-processing-plugins -n openshift-ingress -o yaml

# View provider secrets (check label)
oc get secrets -l inference.llm-d.ai/ipp-managed=true -A

# View all MaaS CRDs
oc get maasmodelref -A
oc get maasauthpolicy -A
oc get maassubscription -A
oc get externalmodel -A
oc get externalprovider -A

# View platform config
oc get config default -o yaml
oc get aitenant -A

Common Debugging Scenarios

Debugging decision tree

500 Error on External Model

The request reaches the provider but credential injection failed:

# Check if the Secret has the correct label
oc get secrets -n <external-models-ns> -l inference.llm-d.ai/ipp-managed=true

# Check payload-processing logs for apikey-injection errors
oc logs -n openshift-ingress deploy/payload-processing | grep -i "apikey\|credential\|secret"

# Check ExternalModel CRD is correct
oc get externalmodel <model-name> -n <external-models-ns> -o yaml

401 Unauthorized

The API key is invalid, expired, or revoked:

# Check Authorino logs
oc logs -n kuadrant-system deploy/authorino | grep -i "denied\|reject\|invalid"

# Check MaaS API key validation
oc logs -n redhat-ai-gateway-infra deploy/maas-api | grep -i "validate\|invalid"

# Check MaaSAuthPolicy
oc get maasauthpolicy -A -o yaml

429 Too Many Requests

Token quota exceeded:

# Check Limitador logs
oc logs -n kuadrant-system deploy/limitador-limitador | grep -i "rate\|limit\|exceed"

# Check subscription limits
oc get maassubscription -A -o yaml | grep -A5 "rateLimits"

# Check TokenRateLimitPolicy
oc get tokenratelimitpolicy -A -o yaml

Model Not Found

The model name doesn’t match any MaaSModelRef:

# List all registered models
oc get maasmodelref -A

# Check payload-processing logs for resolver errors
oc logs -n openshift-ingress deploy/payload-processing | grep -i "resolver\|model.*not.*found"

# Check the pre-processing header extraction
oc logs -n openshift-ingress deploy/payload-pre-processing | grep -i "model\|header"

RHOAI 3.4 vs 3.5 Differences

RHOAI 3.4 vs 3.5 architecture comparison

If you are debugging a 3.4 cluster, these are the key differences:

What3.43.5
DSC componentkserve.modelsAsServiceaigateway.modelsAsAService
MaaS API namespaceredhat-ods-applicationsredhat-ai-gateway-infra
Secret labelinference.networking.k8s.io/bbr-managed=trueinference.llm-d.ai/ipp-managed=true
Kuadrant integrationEnvoyFilter-based WasmWasmPlugin CRs
External model CRDSingle ExternalModelExternalProvider + ExternalModel
IPP architectureSingle ext_proc stage (after auth)Two stages: pre (before auth) + post (after auth)
IPP plugins (post)model-provider-resolver, body-field-to-header, api-translation, apikey-injectionmaas-headers-guard, stream-usage-enforcer, model-provider-resolver, api-translation, apikey-injection

11.3 - API Key Security

A security reference for Red Hat OpenShift AI Models as a Service API keys, covering the full lifecycle of an sk-oai-* key from cryptographic generation through inference-time validation to expiry and revocation.

This page is a security reference for Red Hat OpenShift AI Models as a Service API keys. It covers the full lifecycle of an sk-oai-* key – from cryptographic generation through inference-time validation to expiry and revocation. For the high-level request flow, see Architecture & Request Flow. For pod-by-pod debugging, see Request Deep Dive.

Note

This page describes the security internals of the maas-api component. You do not need to understand these details to use Models as a Service, but they are useful for security reviews, incident response, and compliance documentation.

Key Anatomy

A Models as a Service API key has four components:

sk-oai-{key_id}_{secret}
╰─────╯ ╰──────╯ ╰──────╯
 prefix   96-bit   256-bit
 (fixed)  salt     secret
          (Base62) (Base62)
ComponentValuePurpose
sk-oai-Fixed stringIndustry convention prefix. Allows grep/scan tooling to detect leaked keys in logs and repos.
key_id96-bit Base62 (~16 chars)Per-key salt (FIPS 180-4 compliant). First input to the SHA-256 hash derivation.
_Underscore separatorUnambiguous boundary between key_id and secret.
secret256-bit Base62 (~43 chars)Cryptographic secret generated by crypto/rand. 256 bits of entropy makes brute-force infeasible (2^256 keyspace).

Hash Derivation

The maas-api never stores the plaintext key. Instead, it derives a hash at creation time:

SHA-256( key_id + "\x00" + secret )  →  key_hash (hex-encoded, stored)

The null byte (\x00) delimiter prevents ambiguous component boundaries. Without it, key_id "ab" + secret "cdef" would hash identically to key_id "abc" + secret "def".

Important

The plaintext key is returned exactly once in the HTTP response at creation time. There is no “retrieve my key” operation. If you lose the key, create a new one.

Key Creation

The key generation process uses OS-level cryptographic randomness:

  1. crypto/rand generates 12 random bytes (key_id) + 32 random bytes (secret)
  2. Both components are Base62-encoded
  3. The plaintext key is assembled as sk-oai-{key_id}_{secret}
  4. SHA-256(key_id + "\x00" + secret) is computed and stored in PostgreSQL
  5. The plaintext key is returned in the HTTP response body
  6. The server discards the plaintext from memory
# Create an API key (the plaintext key is shown once in the response)
DOMAIN=$(oc get ingresses.config/cluster -o jsonpath='{.spec.domain}')
curl -sk -X POST \
  -H "Authorization: Bearer $(oc whoami -t)" \
  -H "Content-Type: application/json" \
  -d '{"name":"security-test","expiresIn":"1h","subscription":"<subscription-name>"}' \
  "https://maas.${DOMAIN}/maas-api/v1/api-keys" | jq .

The response contains the key field with the full plaintext. Subsequent GET requests return only metadata:

# List your keys (no plaintext in the response)
curl -sk -X POST \
  -H "Authorization: Bearer $(oc whoami -t)" \
  -H "Content-Type: application/json" \
  -d '{}' \
  "https://maas.${DOMAIN}/maas-api/v1/api-keys/search" | jq '.data[] | {id, name, status, creationDate, expirationDate}'
Warning

Store the key immediately upon creation. If you lose it, you must create a new one.

For the complete key creation procedure, see upstream: Create an API Key.

Persistence

The database stores identity and policy metadata, not the bearer secret:

StoredNot Stored
SHA-256 key_hash (hex-encoded)Plaintext API key
Database UUID (id)Secret component
Username, key name, descriptionDisplay prefix (sk-oai-XXXX...)
Immutable group snapshot (user_groups[])
Subscription, tenant
Status (active / revoked / expired)
Timestamps (created_at, expires_at, last_used_at)
Ephemeral flag
Note

Database access alone does not reveal usable keys. An attacker with full database read access must brute-force 256 bits of entropy to reconstruct a valid secret.

# View stored key metadata in PostgreSQL (no plaintext visible)
oc exec -n redhat-ods-applications deploy/postgres -it -- \
  psql -U postgres -d maas \
  -c "SELECT id, username, name, status, tenant, ephemeral, created_at, expires_at FROM api_keys LIMIT 5;"

# Confirm only the hash is stored, not the plaintext
oc exec -n redhat-ods-applications deploy/postgres -it -- \
  psql -U postgres -d maas \
  -c "SELECT id, left(key_hash, 16) || '...' as key_hash_prefix, length(key_hash) as hash_length FROM api_keys LIMIT 3;"

Validation Flow

Every inference request triggers API key validation on the hot path. The high-level flow is covered in Architecture: Authorino Validates the API Key. This section details the internal steps of ValidateAPIKey() inside maas-api.

sequenceDiagram
    participant App as Application
    participant GW as API Gateway
    participant Auth as Authorino
    participant API as MaaS API
    participant DB as PostgreSQL

    App->>GW: POST /v1/chat/completions<br/>Authorization: Bearer sk-oai-...
    GW->>Auth: gRPC auth check (Wasm shim)
    Auth->>API: POST /internal/v1/api-keys/validate

    rect rgb(240, 248, 255)
    Note over API: ValidateAPIKey()
    Note over API: 1. Format check (reject malformed)
    Note over API: 2. SHA-256(key_id + 0x00 + secret)
    API->>DB: SELECT WHERE key_hash=$1 AND tenant=$2
    DB-->>API: key record
    Note over API: 3. Expiry and status check
    Note over API: 4. Subscription check (fail closed)
    Note over API: 5. UUID validation
    end

    API-->>Auth: {valid, userId, groups, subscription}
    Note over API,DB: Async: update last_used_at (background, 2s timeout)
    Auth-->>GW: Auth success + identity headers
    GW->>App: Forward to model

ValidateAPIKey() Steps

  1. Format check – reject malformed keys before any database access. If the key does not match sk-oai-{key_id}_{secret}, return invalid immediately.
  2. SHA-256 hash – compute SHA-256(key_id + "\x00" + secret) to produce key_hash.
  3. Hash lookup – query PostgreSQL using the (key_hash, tenant) unique index. Single B-tree indexed lookup.
  4. Expiry and status check – reject if status != 'active' or expires_at < now().
  5. Subscription check (fail closed) – verify the key’s subscription exists and is valid. Missing subscription causes rejection.
  6. UUID validation (fail closed) – confirm the key’s UUID is well-formed. Invalid UUID causes rejection.
Rejection ReasonBehavior
Missing subscriptionReject (fail closed)
Invalid UUIDReject (fail closed)
Parse failureReject (fail closed)
Expired or revokedReject

Performance Characteristics

The validation design protects both the credential and the performance of the inference path:

TechniqueImplementationPurpose
Indexed lookupUNIQUE (key_hash, tenant) B-treeO(log n) validation on every inference request
Constant-time comparisoncrypto/subtle.ConstantTimeComparePrevents timing side-channel attacks that could leak hash information
Async usage trackingBackground goroutine + 2-second timeoutlast_used_at update never blocks the validation response path
Debounced updatessync.Map + CAS, TTL 60 secondsPrevents row-lock storms under high concurrency (CWE-362 safe)
# Watch validation in real-time during an inference request
oc logs -n redhat-ai-gateway-infra deploy/maas-api -f | grep "api-keys/validate\|subscriptions/select"

# Check Authorino calling the internal validate endpoint
oc logs -n kuadrant-system deploy/authorino -f | grep -i "api-key\|external"

Access Control

Authentication identifies the caller. Tenant and ownership rules determine which records that caller may operate on.

Tenant Isolation

Every database query includes WHERE tenant = $1. There is no code path that allows cross-tenant data access at the query level.

Owner-or-Admin

Users can see and revoke only their own keys. Admin privileges are detected via Kubernetes SubjectAccessReview – the maas-api checks whether the caller has admin permissions on the cluster, not through a separate admin flag in the database.

Unauthorized requests to key endpoints return 404 (not 403). This IDOR protection prevents attackers from enumerating valid key IDs by probing for different HTTP status codes.

Group Validation

Groups must match regex ^[a-zA-Z0-9:._-]+$. Groups are snapshotted at key creation time and never updated after that. This immutability prevents privilege escalation by modifying group membership after key creation.

# Verify IDOR protection: accessing a nonexistent key returns 404
DOMAIN=$(oc get ingresses.config/cluster -o jsonpath='{.spec.domain}')
curl -sk -o /dev/null -w '%{http_code}' \
  -H "Authorization: Bearer $(oc whoami -t)" \
  "https://maas.${DOMAIN}/maas-api/v1/api-keys/nonexistent-uuid"

# Check access control in maas-api logs
oc logs -n redhat-ai-gateway-infra deploy/maas-api | grep -i "tenant\|denied\|403\|404"

Admin Key Management

Two questions come up regularly from administrators. Both answers follow directly from the ownership model above.

Can an Admin Create a Key Owned by Another User?

Not directly. POST /v1/api-keys has no owner or username field – the key always belongs to the identity of the Bearer token that created it, and it snapshots that identity’s group memberships (see Group Validation). This is by design: the groups baked into the key are what resolve the subscription, so the key must be minted from a token that actually carries the user’s groups.

Warning

A commonly suggested shortcut does not work:

oc --as=alice whoami -t   # returns YOUR token, not alice's

--as only adds impersonation headers to Kubernetes API requests. oc whoami -t prints the token from your kubeconfig without contacting the server, so the output is identical with and without --as (easy to verify: run both and compare). A key created with that token is owned by the admin – the maas-api resolves identity from a TokenReview of the presented token, and impersonation headers never reach it.

What works instead:

ApproachWhen to use it
Self-service (intended flow)The user creates their own key with their own token. This is the design center: keys are self-service, and admins govern through subscriptions and auth policies rather than by minting keys.
Token from the identity providerWith external OIDC (Phase 9), an admin who controls the IdP can obtain a token as the user (password grant or token exchange in Keycloak) and create the key with it. The key is then owned by the user with the user’s groups. This is exactly how the Phase 9 test script and the OIDC demos mint user-owned keys.
ServiceAccount tokenFor workloads rather than humans: oc create token <sa> -n <ns> mints a token whose identity is system:serviceaccount:<ns>:<sa>, and the key created with it is owned by the ServiceAccount. See the Service Account Access demo.

What admins can do to other users’ keys, per Owner-or-Admin: view, search, revoke individual keys, and bulk-revoke by username – just not create them.

Can the Number of Keys per User Be Capped?

There is no per-user key count limit in the current maas-api. Two things make this less of a problem than it sounds:

  • Extra keys do not multiply quota. Rate limits are counted per subscription, not per key. A user who mints five keys against the same subscription shares one token budget across all five – creating a second key does not reset or extend the limit. (The corporate scenario demo verifies exactly this: a second key is rate-limited immediately after the first key exhausts the subscription quota.)
  • Lifetime is capped centrally. The API_KEY_MAX_EXPIRATION_DAYS setting on the maas-api bounds how long any key can live, and ephemeral keys default to 1 hour, so unused key sprawl ages out.

For cleanup, admins can audit and bulk-revoke a user’s keys (dry run first):

DOMAIN=$(oc get ingresses.config/cluster -o jsonpath='{.spec.domain}')

# Preview what would be revoked for a user
curl -sk -X POST "https://maas.${DOMAIN}/maas-api/v1/api-keys/bulk-revoke" \
  -H "Authorization: Bearer $(oc whoami -t)" \
  -H "Content-Type: application/json" \
  -d '{"username": "alice", "dryRun": true}'

# Revoke them
curl -sk -X POST "https://maas.${DOMAIN}/maas-api/v1/api-keys/bulk-revoke" \
  -H "Authorization: Bearer $(oc whoami -t)" \
  -H "Content-Type: application/json" \
  -d '{"username": "alice"}'

Lifecycle

There are no permanent Models as a Service API keys. State transitions are one-way – there is no mechanism to reactivate a revoked or expired key.

graph TD
    A([ACTIVE]) -->|"Owner/admin revokes"| R([REVOKED])
    A -->|"expires_at reached"| E([EXPIRED])
    style A fill:#d5f5e3,stroke:#27ae60,color:#333
    style R fill:#f5b7b1,stroke:#e74c3c,color:#333
    style E fill:#fdebd0,stroke:#f39c12,color:#333

Standard Keys

  • Mandatory expiry controlled by API_KEY_MAX_EXPIRATION_DAYS environment variable on maas-api
  • Can be revoked by the key owner or a cluster admin at any time
  • Bulk revocation available for offboarding via POST /v1/api-keys/bulk-revoke
  • Key metadata is retained after expiry or revocation for audit purposes

Ephemeral Keys

  • Maximum 1 hour lifetime
  • Auto-cleaned by the maas-api-key-cleanup CronJob in redhat-ai-gateway-infra
  • Hard deleted 30 minutes after expiry via POST /internal/v1/api-keys/cleanup
  • Use case: temporary access for demos, CI/CD pipelines, testing

Database Constraints

The database enforces the lifecycle at the schema level:

CHECK (status IN ('active', 'revoked', 'expired'))

No reactivation is possible even via direct database manipulation.

Important

State transitions are one-way. There is no mechanism to reactivate a revoked or expired key. Create a new key instead.

# Check the cleanup CronJob
oc get cronjob -n redhat-ai-gateway-infra | grep cleanup

# View cleanup job history
oc get jobs -n redhat-ai-gateway-infra | grep cleanup

# Revoke a key
DOMAIN=$(oc get ingresses.config/cluster -o jsonpath='{.spec.domain}')
curl -sk -X DELETE \
  -H "Authorization: Bearer $(oc whoami -t)" \
  "https://maas.${DOMAIN}/maas-api/v1/api-keys/<key-id>"

# Verify revocation in the database
oc exec -n redhat-ods-applications deploy/postgres -it -- \
  psql -U postgres -d maas \
  -c "SELECT id, status, expires_at FROM api_keys ORDER BY created_at DESC LIMIT 5;"

# List ephemeral keys
oc exec -n redhat-ods-applications deploy/postgres -it -- \
  psql -U postgres -d maas \
  -c "SELECT id, username, status, ephemeral, expires_at FROM api_keys WHERE ephemeral=true;"

Service Accounts

Service accounts are first-class Models as a Service API key identities. They use the same API, the same ValidateAPIKey() code path, and the same lifecycle rules as human users.

AspectDetail
IdentityKubernetes service account format: system:serviceaccount:<namespace>:<name>
BindingMaaSSubscription subjects.users (not groups) – direct user binding
ValidationSame API, same hash, same tenant scope
LifecycleSame expiry, revocation, and cleanup rules
# Check subscription owner bindings (groups and users)
oc get maassubscription -n models-as-a-service -o yaml | grep -A10 "owner:"

API Surface

Public management and internal validation are separate API surfaces with different trust boundaries.

Authenticated Endpoints (/v1/api-keys)

Auth via X-MaaS-Username and X-MaaS-Group headers injected by the ExtractUserInfo() middleware after Authorino validates the identity token. These headers are set by the gateway, not by the client.

MethodPathPurpose
GET/v1/api-keys/configGet API key configuration limits (max expiry, etc.)
POST/v1/api-keysCreate a new API key (returns plaintext once)
POST/v1/api-keys/searchSearch keys with filters, sort, pagination
POST/v1/api-keys/bulk-revokeRevoke all keys for a user (offboarding)
GET/v1/api-keys/:idRetrieve key metadata
DELETE/v1/api-keys/:idRevoke a specific key

Internal Endpoints (/internal/v1)

MethodPathCaller
POST/internal/v1/api-keys/validateAuthorino (on every inference request)
POST/internal/v1/api-keys/cleanupCronJob (ephemeral key cleanup)
POST/internal/v1/subscriptions/selectAuthorino (subscription resolution)
Warning

Internal APIs have no application-level authentication. Access is restricted by Kubernetes NetworkPolicy. This is a different trust boundary, not a defect – only pods in kuadrant-system and redhat-ai-gateway-infra can reach them.

# Verify NetworkPolicy restricting internal endpoints
oc get networkpolicy -n redhat-ai-gateway-infra -o yaml

# Test the health endpoint (public)
DOMAIN=$(oc get ingresses.config/cluster -o jsonpath='{.spec.domain}')
curl -sk "https://maas.${DOMAIN}/maas-api/health"

# List your keys via the authenticated endpoint
curl -sk -X POST \
  -H "Authorization: Bearer $(oc whoami -t)" \
  -H "Content-Type: application/json" \
  -d '{}' \
  "https://maas.${DOMAIN}/maas-api/v1/api-keys/search" | jq .

Threat Model

No single control carries the security model. Each threat is addressed by a specific primary control:

ThreatAttack VectorPrimary Control
Credential guessingBrute-force the API key256-bit secret (2^256 keyspace)
Database breachRead DB to reconstruct keysHash-only storage (SHA-256, no plaintext)
Timing analysisMeasure response time to infer hash matchcrypto/subtle.ConstantTimeCompare
Cross-tenant accessUser A accesses User B’s keysTenant-scoped queries (WHERE tenant=$1)
ID enumerationProbe key IDs to discover valid ones404 for unauthorized (IDOR protection)
Forgotten credentialsOld keys remain active indefinitelyMandatory expiration (API_KEY_MAX_EXPIRATION_DAYS)
Update stormsHigh-concurrency last_used_at writesAsync debounce (sync.Map + CAS, 60s TTL)
OffboardingDeparted user’s keys remain activeBulk revocation (POST /v1/api-keys/bulk-revoke)
Tip

For incident response, use POST /v1/api-keys/bulk-revoke to immediately disable all keys for a departing user. This is faster than revoking keys one by one.

Database Schema

api_keys Table

ColumnTypeNotes
idTEXT (PK)UUID
usernameTEXT NOT NULLKey owner identity
nameTEXT NOT NULLUser-assigned key name
descriptionTEXTOptional description
key_hashTEXT NOT NULLSHA-256 hex digest
statusTEXT NOT NULLDEFAULT 'active'; CHECK IN ('active', 'revoked', 'expired')
user_groupsTEXT[] NOT NULLImmutable snapshot at creation
subscriptionTEXT NOT NULLBound subscription name
tenantTEXT NOT NULLTenant identifier
ephemeralBOOLEAN NOT NULLDEFAULT FALSE
created_atTIMESTAMPTZ NOT NULLCreation time
expires_atTIMESTAMPTZExpiry time
last_used_atTIMESTAMPTZLast validation time (async updated)

Indexes

IndexColumnsPurpose
Unique validation(key_hash, tenant)Fast lookup during ValidateAPIKey(); ensures no hash collisions within a tenant
Key listing(tenant, username, created_at)User-facing key list queries
Audit / cleanup(last_used_at) WHERE NOT NULLFind unused keys; cleanup CronJob
Group queries(user_groups) GINGroup-based access control queries
User key listing(username, created_at DESC)User-scoped key listing (without tenant filter)
Ephemeral cleanupPartial on status + expires_at WHERE ephemeral=trueCronJob: find expired ephemeral keys for deletion
# View the actual table schema
oc exec -n redhat-ods-applications deploy/postgres -it -- \
  psql -U postgres -d maas -c "\d api_keys"

# View indexes
oc exec -n redhat-ods-applications deploy/postgres -it -- \
  psql -U postgres -d maas -c "\di+ *api_keys*"

References

11.4 - Multi-Tenancy

A reference for Red Hat OpenShift AI Models as a Service multi-tenancy (RHOAI 3.5+): multiple MaaS tenants on one shared platform, isolation boundaries, and provisioning an additional tenant.

This page is a reference for Red Hat OpenShift AI Models as a Service multi-tenancy (RHOAI 3.5+). It answers the question that comes up in every architecture discussion: “Can we have a MaaS per team or per namespace in the same cluster?” The short answer: you get multiple MaaS tenants on one shared platform, not multiple independent MaaS instances. This page explains what that difference means, what is isolated, what is shared, and how to provision an additional tenant.

Important

MaaS multi-tenancy 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. See the official RHOAI 3.5 multi-tenancy documentation for the supported scope.

Tenants, Not Instances

A tenant is a slice of one shared MaaS platform, bootstrapped by an AITenant custom resource. From the user’s point of view each tenant behaves like an independent MaaS environment: its own gateway hostname, its own identity configuration, its own API keys, subscriptions, and model catalog. From the platform’s point of view there is still one maas-controller, one PostgreSQL database, and one model serving infrastructure underneath.

What each tenant gets (dedicated):

ResourceDetail
GatewayA dedicated Gateway API Gateway with a unique hostname (e.g. finance-maas.apps.<cluster-domain>). The controller claims each Gateway for exactly one tenant - two AITenant resources cannot share a Gateway.
Tenant namespaceCreated as ai-tenant-<name> for additional tenants. Holds the tenant-scoped MaaS resources: MaaSSubscription, MaaSAuthPolicy, MaaSModelRef, and the tenant’s MaasTenantConfig.
API infrastructureA per-tenant maas-api instance (maas-api-<name> in redhat-ai-gateway-infra), plus gateway-scoped authentication and rate-limit policies for that tenant’s Gateway.
Identity realmEach tenant can point at its own OIDC issuer (spec.oidc on the AITenant), or fall back to OpenShift TokenReview. Tokens minted for one tenant are rejected by other tenants’ gateways.
RBAC RolesThe controller creates aitenant-<name>-tenant-admin (manage subscriptions, auth policies, tenant config in the tenant namespace) and aitenant-<name>-object-admin (read the AITenant object). You grant access by creating standard RoleBindings.

What stays shared across all tenants:

ResourceDetail
PostgreSQL databaseAll tenants store API keys in the same database instance. Keys are stored as salted SHA-256 hashes together with the username, group memberships, subscription, and tenant name, and every lookup is scoped by the (key_hash, tenant) index - a key created in tenant A returns 404 API key not found on tenant B’s gateway. See API Key Security for the full storage and validation internals.
maas-controllerOne controller reconciles all tenants.
Model serving infrastructureGPU nodes, model weights, and the serving stack (KServe / llm-d / vLLM) are cluster resources. Tenants govern access to models; they do not get dedicated copies of them.
Authorino and LimitadorPlatform-level authentication and rate limiting components are shared; the policies they enforce are per tenant.
Observability stackPrometheus, OTEL collectors, and dashboards are shared. Metrics, traces, and structured logs carry the tenant name, so usage can be filtered and attributed per tenant.

So “a MaaS per namespace” is not quite the model. The model is: one platform, and per team a tenant slice consisting of a gateway, a tenant namespace, and labeled model namespaces. Traffic separation comes from the dedicated gateways; governance separation comes from the tenant scoping in maas-api and the per-tenant policies.

Isolation Boundaries

The official docs list four cross-tenant protections, all enforced at the application layer:

  • API key rejection - a key created in one tenant returns HTTP 404 (API key not found) against another tenant’s gateway. Each tenant’s maas-api instance queries only its own tenant’s keys.
  • OIDC token rejection - tokens are validated against the tenant-specific identity provider configuration; tokens from another tenant’s IdP are rejected by the gateway AuthPolicy.
  • Subscription scoping - GET /v1/subscriptions returns only the requesting tenant’s data.
  • Model discovery scoping - GET /v1/models returns only models associated with the tenant through MaaSModelRef resources in the tenant namespace or with a matching tenantRef.
Note

Network-layer isolation is not part of MaaS tenancy. The boundaries above are gateway, identity, and RBAC boundaries. Pods in different tenant namespaces still share the cluster network. If your isolation requirements go further (e.g. tenants must not reach each other’s model pods directly, bypassing the gateway), add NetworkPolicies or, on OVN-Kubernetes, User Defined Networks (UDN) on top - that is standard OpenShift multi-tenancy hardening, independent of MaaS. This guide has not validated a UDN setup with MaaS.

The Default Tenant

Deploying MaaS (Phase 4) automatically creates the default tenant, which is exactly what this guide has been using all along:

oc get aitenant models-as-a-service -n ai-tenants
NAME                  READY   TENANT NAMESPACE      GATEWAY                AGE
models-as-a-service   True    models-as-a-service   maas-default-gateway   1h

The default tenant uses the models-as-a-service namespace and claims maas-default-gateway. On upgrade from 3.4, the controller migrates the old Tenant resource to a MaasTenantConfig, preserving API keys, subscriptions, and models.

Important

ExternalModel resources (Phase 8) are supported only in the default tenant. The controller disables the ExternalModel controller for non-default tenants (DISABLE_EXTERNAL_MODEL_CONTROLLER=true) to prevent HTTPRoute conflicts between tenant gateways. Access external models through the default tenant gateway.

Provisioning an Additional Tenant

Condensed from the official procedure. Prerequisites: the default tenant is Ready, cert-manager is installed, and RHCL is at Kuadrant v1.4.2 or later (the gateway-scoped AuthPolicy needs spec.defaults.rules).

Step 1: Pick a tenant name (DNS-1123 label, max 41 characters), detect the TLS certificate name (same derivation as Phase 2 - the official docs hardcode router-certs-default, which is wrong on clusters with a custom ingress certificate), and label the namespaces that must attach routes to the tenant Gateway:

TENANT_NAME="finance"
CLUSTER_DOMAIN=$(oc get ingresses.config.openshift.io cluster -o jsonpath='{.spec.domain}')
GATEWAY_HOSTNAME="${TENANT_NAME}-maas.${CLUSTER_DOMAIN}"

CERT_NAME=$(oc get ingresscontroller default -n openshift-ingress-operator \
  -o jsonpath='{.spec.defaultCertificate.name}' 2>/dev/null)
CERT_NAME="${CERT_NAME:-router-certs-default}"

# infrastructure namespace (per-tenant maas-api HTTPRoute)
oc label namespace redhat-ai-gateway-infra \
  "maas.opendatahub.io/gateway-access-${TENANT_NAME}=true" --overwrite

# every model namespace this tenant should serve from
oc label namespace <model_namespace> \
  "maas.opendatahub.io/gateway-access-${TENANT_NAME}=true" --overwrite

Step 2: Create the dedicated Gateway. The two annotations are required - opendatahub.io/managed: "false" keeps the ODH model controller from overriding MaaS policies, and the TLS bootstrap annotation enables Gateway-to-Authorino TLS (same pattern as Phase 2). The heredoc expands the variables from Step 1:

cat <<EOF | oc apply -f -
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
  name: ${TENANT_NAME}
  namespace: openshift-ingress
  annotations:
    opendatahub.io/managed: "false"
    security.opendatahub.io/authorino-tls-bootstrap: "true"
spec:
  gatewayClassName: openshift-default
  listeners:
    - name: https
      hostname: "${GATEWAY_HOSTNAME}"
      port: 443
      protocol: HTTPS
      allowedRoutes:
        namespaces:
          from: Selector
          selector:
            matchLabels:
              maas.opendatahub.io/gateway-access-${TENANT_NAME}: "true"
      tls:
        mode: Terminate
        certificateRefs:
          - group: ""
            kind: Secret
            name: ${CERT_NAME}
EOF
Note

On non-cloud platforms (baremetal, SNO, OpenStack) the same LoadBalancer considerations as in Phase 2 apply: each additional Gateway needs its own external IP from MetalLB (extend the IPAddressPool), or a passthrough/reencrypt Route through the OpenShift router. Check whether the Gateway controller auto-provisioned a Route (oc get route -n openshift-ingress -l gateway.networking.k8s.io/gateway-name=<tenant-name>) and create one manually if not.

Step 3: Create the AITenant. It must live in the ai-tenants management namespace - the admission webhook rejects any other namespace:

cat <<EOF | oc apply -f -
apiVersion: maas.opendatahub.io/v1alpha1
kind: AITenant
metadata:
  name: ${TENANT_NAME}
  namespace: ai-tenants
spec:
  gateway:
    name: ${TENANT_NAME}
  # optional - per-tenant identity provider (BYOIDP), see Phase 9 for the Keycloak setup
  # oidc:
  #   issuerUrl: "https://<oidc_provider>/realms/<tenant_realm>"
  #   clientId: <client_id>
  #   ttl: 300
EOF

Step 4: Wait for the tenant to become Ready and verify the bootstrap:

oc get aitenant ${TENANT_NAME} -n ai-tenants -w

# tenant namespace, config, and per-tenant maas-api
oc get namespace ai-tenant-${TENANT_NAME}
oc get maastenantconfig default-tenant -n ai-tenant-${TENANT_NAME}
oc get deployment maas-api-${TENANT_NAME} -n redhat-ai-gateway-infra

# tenant endpoint answers with tenant-scoped models
curl -sk "https://${GATEWAY_HOSTNAME}/v1/models" \
  -H "Authorization: Bearer $(oc whoami -t)" | jq .

Step 5: Grant tenant admins access by binding the controller-created Roles (the spec.rbac field on AITenant is deprecated and ignored):

oc create rolebinding finance-tenant-admins \
  -n ai-tenant-${TENANT_NAME} \
  --role=aitenant-${TENANT_NAME}-tenant-admin \
  --group=finance-admins

From there, the tenant admin creates MaaSSubscription and MaaSAuthPolicy resources in the tenant namespace exactly as in Phase 5, and users mint API keys against the tenant’s own gateway hostname.

Deleting a Tenant

Delete the AITenant CR. The controller revokes the tenant’s API keys, removes the per-tenant maas-api, releases the Gateway claim, and deletes the controller-owned Roles and RoleBindings. User-created RoleBindings are preserved - review and remove stale ones before re-creating a tenant with the same name, or former admins regain access.

Quick Answers

QuestionAnswer
Can we run a MaaS per namespace in the same cluster?You run one MaaS platform with multiple isolated tenants. Each tenant maps to a dedicated gateway + tenant namespace + labeled model namespaces, not to an arbitrary namespace.
Multiple MaaS instances then?No - multiple tenants. One controller, one database, one serving infrastructure. The per-tenant pieces are the gateway, identity realm, namespace, maas-api instance, and policies.
Are the API keys separated?Logically yes, physically no. All keys live in the shared PostgreSQL database (as salted hashes with tenant metadata, see API Key Security), and every validation is tenant-scoped: a tenant A key gets 404 on tenant B’s gateway.
Can each tenant bring its own IdP?Yes - spec.oidc on the AITenant points that tenant at its own issuer. Without it, the tenant uses OpenShift TokenReview.
Are external models per tenant?No - ExternalModel works only in the default tenant in 3.5 (Technology Preview limitation).
Is there network isolation between tenants?Not from MaaS itself - isolation is at the gateway/identity/RBAC layer. Add NetworkPolicies or UDN separately if you need network-level separation.

References

11.5 - Browser Access (CORS)

Calling the Models as a Service gateway directly from a browser fails out of the box; this page shows the one EnvoyFilter that fixes both CORS preflights and response headers.

Calling the Models as a Service gateway directly from a browser – pointing a browser-based chat UI at https://<gateway-host> with a MaaS API key – fails out of the box: CORS preflights are rejected (404 or 401, depending on whether the gateway’s route matching or auth chain rejects OPTIONS first), and success responses carry no CORS headers. This page shows the one EnvoyFilter that fixes both.

Tip

Prerequisites: cluster-admin access on the MaaS cluster, at least one model deployed (local or external), and a MaaS API key. A key comes from POST /maas-api/v1/api-keys with your OpenShift token.

Important

Status: undocumented and unsupported in RHOAI/Kuadrant docs – but verified end-to-end on a live cluster (2026-09-22, RHOAI 3.5.1 + MaaS from this repo’s setup-maas.sh): all three CORS checks pass and the browser flow was confirmed working. Model-agnostic: the same gateway reconfiguration works for local models, external models, and the /maas-api/* control plane. No AuthPolicy changes – authentication is untouched.

What Has to Happen for CORS to Work

Three things, all on the gateway:

  1. Preflights must be answered before the auth filters run. Browsers never send Authorization on a CORS preflight (fetch spec: preflights are credentialless). Without the Lua filter, OPTIONS fails – typically 404 because no HTTPRoute matches the method, or 401 if the auth chain intercepts first:

    $ curl -i -X OPTIONS "https://<HOST>/v1/chat/completions" \
        -H "Origin: https://<your-app>" \
        -H "Access-Control-Request-Method: POST" \
        -H "Access-Control-Request-Headers: authorization, content-type"
    HTTP/2 404               <1>

    <1> May be 401 with x-ext-auth-reason: Authentication required on some Kuadrant/gateway configurations. Either way, CORS fails.

  2. Actual responses must carry CORS headers. A preflight alone is not enough – the browser also validates every real response (200, 401, 429, …). No access-control-allow-origin on a response means the browser blocks it from JavaScript.

  3. Never add a second set of CORS headers. OpenAI-compatible upstreams (LiteLLM-style) often run permissive CORSMiddleware and already emit access-control-allow-origin (plus access-control-allow-credentials: true). Adding another one merges into access-control-allow-origin: *,*, which browsers treat as invalid. Verified on-cluster 2026-09-22 – an unguarded headers():add() produced exactly that.

How to Reconfigure the Gateway

One EnvoyFilter. A Lua filter inserted FIRST in the gateway’s HTTP filter chain – before the Kuadrant WASM/ext-authz filters – does both jobs: it answers preflights itself (auth never sees them) and adds CORS headers to responses that the upstream did not already decorate. No AuthPolicy changes, no auth touched.

The applied, verified manifest is manifests/99-cors/envoyfilter-cors.yaml in the repo. The block below mirrors it – if the filter changes, update both together.

apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
  name: maas-cors-headers
  namespace: openshift-ingress
spec:
  workloadSelector:
    labels:
      gateway.networking.k8s.io/gateway-name: maas-default-gateway
  configPatches:
  - applyTo: HTTP_FILTER
    match:
      context: GATEWAY
      listener:
        filterChain:
          filter:
            name: envoy.filters.network.http_connection_manager
    patch:
      operation: INSERT_FIRST
      value:
        name: envoy.filters.http.lua
        typed_config:
          "@type": type.googleapis.com/envoy.extensions.filters.http.lua.v3.Lua
          default_source_code:
            inline_string: |
              function envoy_on_request(request_handle)
                local method = request_handle:headers():get(":method")
                if method == "OPTIONS" and request_handle:headers():get("access-control-request-method") then
                  -- CORS preflight: answer here, before auth filters run
                  request_handle:respond({
                    [":status"] = "204",
                    ["access-control-allow-origin"] = "*",
                    ["access-control-allow-methods"] = "GET, POST, OPTIONS",
                    ["access-control-allow-headers"] = request_handle:headers():get("access-control-request-headers") or "authorization, content-type",
                    ["access-control-max-age"] = "86400"
                  })
                end
              end
              function envoy_on_response(response_handle)
                -- CORS headers on every response (200/401/429/...) — but only
                -- when the upstream did not already send them (OpenAI-compatible
                -- upstreams like LiteLLM run their own CORSMiddleware; adding
                -- again would merge into an invalid multi-value header)
                if not response_handle:headers():get("access-control-allow-origin") then
                  response_handle:headers():add("access-control-allow-origin", "*")
                  response_handle:headers():add("access-control-expose-headers", "x-request-id, retry-after")
                end
              end

Apply from the repository root:

oc apply -f manifests/99-cors/envoyfilter-cors.yaml

Three properties make this work:

  • operation: INSERT_FIRST – the Lua filter sits ahead of the Kuadrant ext-authz/WASM filters, so preflights are answered before auth can 401 them, and every response that comes back passes through the Lua on_response (including auth-generated 401s, which the upstream never sees).
  • The workloadSelector matches the gateway pods – verify the label with oc get pod -n openshift-ingress --show-labels. The generic istio: ingressgateway label would hit every gateway on the node.
  • The guard in on_response – only add CORS headers the upstream did not already send.

On anything shared, pin access-control-allow-origin to the real origin instead of * (both in the preflight respond() and in on_response).

Why Not the Alternatives

  • Native envoy.filters.http.cors filter (VIRTUAL_HOST/ROUTE typed_per_filter_config CorsPolicy): works – Istio ships it – but its position in the filter chain is not controllable. If the Kuadrant ext-authz filter is inserted before it, preflights 401 before the cors filter ever sees them. Lua INSERT_FIRST guarantees ordering. (header_mutation was also considered: it mutates headers but cannot answer preflights with local replies.)
  • AuthPolicy with an anonymous rule gated to OPTIONS (when: predicate: "request.method == 'OPTIONS'" – documented Kuadrant syntax, predicate per the Authorino 1.5.x features doc): only worth it if EnvoyFilters are blocked on your gateway. It is risky: the MaaS AuthPolicy on this setup is Gateway-targeting (maas-gateway-auth in openshift-ingress), and a route-level policy may REPLACE the gateway defaults for that route rather than OR-combine – the CRD says gateway defaults are enforced on “routes that lack a more specific policy attached to”. If it replaces, non-OPTIONS requests have no active authentication rules -> anonymous access -> the route silently opens. If you must, target the specific model HTTPRoute, then MANDATORY: verify an unauthenticated request still returns 401 and roll back (oc delete authpolicy allow-cors-preflight -n <HTTPROUTE_NS>) if it does not.
  • Authorino response headers (rules.response.unauthenticated.headers – documented CRD fields): makes the 401 carry CORS headers (error bodies readable in-browser) but NOT success responses – the CRD’s response.success.headers are “wrapped as HTTP headers to be injected in the request” (the upstream request, not the client response). Success-response CORS needs the EnvoyFilter or a permissive upstream.

Verify

# 1. Preflight: expect 204 WITH a single access-control-allow-origin
curl -sS -o /dev/null -D - -X OPTIONS "https://<HOST>/v1/chat/completions" \
  -H "Origin: <ALLOWED_ORIGIN>" \
  -H "Access-Control-Request-Method: POST" \
  -H "Access-Control-Request-Headers: authorization, content-type" | tr -d '\r'

# 2. Actual request WITH a key: expect 200 + CORS headers
curl -sS -o /dev/null -D - "https://<HOST>/v1/models" \
  -H "Origin: <ALLOWED_ORIGIN>" \
  -H "Authorization: Bearer <MAAS_KEY>" | tr -d '\r'

# 3. Actual request WITHOUT a key: expect 401 (auth untouched -- a 200 means
#    something else opened the route)
curl -sS -o /dev/null -w '%{http_code}\n' "https://<HOST>/v1/models" \
  -H "Origin: <ALLOWED_ORIGIN>"

Then the browser: point the chat UI at https://<HOST> with a MaaS key, click Test connection. Expect “Connected – N model(s)”.

Undo

One resource, one delete. The procedure on this page changed nothing else – auth, routes, and policies are untouched – and nothing re-creates the filter afterwards: setup-maas.sh never applies manifests/99-cors/, and cleanup-maas.sh never deletes it, so the whole lifecycle is manual.

  1. Check whether the filter is currently active. Resource existence is not proof – a silent NACK leaves the EnvoyFilter in place but ineffective. The preflight is answered before auth, so an unauthenticated OPTIONS is the cleanest probe: 204 means the filter is live, 404 means stock gateway behavior (OPTIONS does not match any HTTPRoute, so the gateway returns 404 before auth runs):

    oc get envoyfilter maas-cors-headers -n openshift-ingress
    
    # 204 = filter live, 404 = stock behavior (no CORS, no route match for OPTIONS)
    curl -sS -o /dev/null -w '%{http_code}\n' -X OPTIONS "https://<HOST>/v1/chat/completions" \
      -H "Origin: <ALLOWED_ORIGIN>" \
      -H "Access-Control-Request-Method: POST"
  2. Delete it:

    oc delete envoyfilter maas-cors-headers -n openshift-ingress
  3. Verify the rollback. Re-run the probe: expect 404 – without the Lua filter, OPTIONS does not match any HTTPRoute and the gateway returns 404 before auth runs. Re-run the three checks in the Verify section: expect no access-control-allow-origin on any response. The xDS config push is immediate; no pod restarts needed.

  • Access ends immediately. Browsers cache preflight decisions for up to 24h (access-control-max-age), but a cached preflight grants nothing after the delete: real responses stop carrying CORS headers, so the browser blocks them regardless. Cross-origin access ends as soon as the gateway stops emitting the headers.
  • Outlives teardown. A full cleanup-maas.sh run leaves maas-cors-headers (with * CORS) sitting in openshift-ingress on an otherwise torn-down gateway – delete it manually if you want the cluster clean. Platform upgrades do not re-create it: the MaaS controller re-applies only its own filters (such as authorino-tls-bootstrap), never this one.

Caveats

  • Silent NACK: if the listener update is rejected, Envoy keeps its last-known-good config – the EnvoyFilter resource still exists but CORS never appears. Check oc logs -n openshift-ingress deploy/maas-default-gateway-openshift-default -c istio-proxy for config rejections before concluding the filter applied.
  • Controller reconcile: the MaaS controller manages EnvoyFilters on this gateway (it creates the authorino-tls-bootstrap one itself) and may re-apply its own set on upgrade – re-check after platform upgrades.
  • If chat requests break: remove the filter first (oc delete envoyfilter maas-cors-headers -n openshift-ingress) – the MaaS disconnected setup shows the gateway falls back to deny-all when its WASM filter fails, so filter-chain interference is the prime suspect.

11.6 - Model Swap

Replace a model backend in Red Hat OpenShift AI Models as a Service without changing anything from the customer’s perspective — same API key, same model ID.

This page explains how to replace a model backend in Red Hat OpenShift AI Models as a Service without changing anything from the customer’s perspective - same API key, same model ID. The key is the MaaSModelRef abstraction layer that decouples the customer-facing API from the actual inference backend. Customers must use the body-based routing (BBR) endpoint (/v1/chat/completions) for seamless swaps.

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.

Overview

A model swap is the process of replacing the inference backend behind a model without affecting customers. Typical scenarios include:

  • Upgrading to a newer model version (e.g. Qwen 3.6 to Qwen 3.8)
  • Replacing a GPU model with a more efficient one
  • Moving from a simulator to a real model (or vice versa)
  • Switching hardware (e.g. different GPU type or node pool)

The swap works because MaaSModelRef acts as an indirection layer. Auth policies, subscriptions, and API keys all reference the MaaSModelRef by name - they have no knowledge of which LLMInferenceService sits behind it. Swapping the backend is a one-field patch.

Resource Hierarchy

Understanding how resources relate to each other is critical for a safe swap. Some resources are created by the admin, others are auto-created by maas-controller.

ResourceNamespaceCreated ByRole
LLMInferenceServicellm (model ns)AdminDefines the inference workload: container, model weights, resources, gateway routing. This is the actual serving pod.
MaaSModelRefllm (model ns)AdminRegisters the model with the MaaS control plane. Points to an LLMInferenceService (or ExternalModel) via spec.modelRef. This is the stable identity that customers interact with.
MaaSAuthPolicymodels-as-a-serviceAdminControls who can access the model. References MaaSModelRef by name + namespace.
MaaSSubscriptionmodels-as-a-serviceAdminDefines rate-limiting tiers. References MaaSModelRef by name + namespace. API keys are permanently bound to a subscription at creation time.
HTTPRoutellm (model ns)Controller (KServe)Routes traffic from the Gateway to the model pod. Created automatically when the LLMInferenceService is deployed.
TokenRateLimitPolicyllm (model ns)Controller (maas-controller)Enforces token rate limits from MaaSSubscription. Owned by the HTTPRoute - garbage collected when the HTTPRoute is deleted.
AuthPolicy (singleton)Gateway nsController (maas-controller)Shared gateway-level auth policy. One per gateway, not per model.

The Abstraction Layer

The diagram below shows how the resources connect. The MaaSModelRef is the pivot point - everything above it (auth, subscriptions, API keys) stays the same during a swap. Only the pointer below it (to the LLMInferenceService) changes.

Model Swap Architecture

MaaSModelRef Phase Transitions

The MaaSModelRef goes through these phases:

PhaseMeaning
PendingBackend is initializing or no governance pairing found yet.
ReadyBackend is healthy AND at least one MaaSSubscription + MaaSAuthPolicy pair is active. Inference is possible.
UnhealthyGovernance is attached but the backend has a runtime or health failure.
FailedNon-recoverable reconciliation error.
InvalidThe resource spec is missing or structurally invalid.

Governance means at least one MaaSSubscription AND one MaaSAuthPolicy both reference the same MaaSModelRef. Both are required for the model to reach Ready phase. These two CRDs are independent - updating one does NOT auto-update the other. For details on keeping them in sync, see Governance Pairing in Phase 5.

What Changes vs What Stays the Same

ComponentChanges?Why
LLMInferenceServiceYesNew backend deployed (qwen-38), old one deleted (qwen-36).
MaaSModelRef spec.modelRef.nameYesPointer swapped from qwen-36 to qwen-38.
MaaSModelRef nameNoqwen-coder is the stable identity that customers see. Keeping it the same is what makes the swap seamless.
MaaSAuthPolicyNoReferences MaaSModelRef qwen-coder by name (unchanged).
MaaSSubscriptionNoReferences MaaSModelRef qwen-coder by name (unchanged).
API keysNoBound to a subscription at creation time. Subscription is unchanged, so keys keep working.
Model ID in requestsNoBoth qwen-36 and qwen-38 serve the same spec.model.name (Qwen/Qwen3-Coder), so the canonical model ID (publishers/llm/models/Qwen/Qwen3-Coder) stays the same.
BBR endpoint (/v1/chat/completions)NoBody-based routing uses the canonical model ID in the request body (publishers/llm/models/Qwen/Qwen3-Coder), derived from the namespace and spec.model.name (both unchanged). Customers using this endpoint need no changes.
Per-model URL path (/llm/<name>/...)YesThe per-model URL path changes from /llm/qwen-36/... to /llm/qwen-38/... because it is derived from the LLMInferenceService name. Customers using per-model URLs must switch to the BBR endpoint.
Warning

The per-model URL path changes after a swap: /llm/qwen-36/v1/chat/completions becomes /llm/qwen-38/v1/chat/completions because it is derived from the LLMInferenceService name, not the MaaSModelRef name. Always use the BBR endpoint (/v1/chat/completions) with the full publisher model ID in the request body (e.g. publishers/llm/models/Qwen/Qwen3-Coder) for swap-safe client integration.

Prerequisites

  • Phases 1-5 completed (Red Hat OpenShift AI installed, Models as a Service platform running, llm namespace created)
  • Admin access to the model namespace and models-as-a-service namespace

Swap Procedure

This procedure walks through the full swap lifecycle using the provided Qwen 3.6 -> 3.8 simulator templates. Both templates use the CPU simulator image (llm-d-inference-sim), so no GPU is required.

The scenario: you have a model called qwen-36 registered with MaaS through a MaaSModelRef called qwen-coder. You want to replace it with qwen-38 without affecting customers.

Tip

If you already have a model deployed from Phase 5, you can skip the original model deployment and adapt the steps to your existing model names.

Step 1: Deploy the Original Model

Deploy the original model (qwen-36) with its full MaaS stack (MaaSModelRef, AuthPolicy, Subscriptions):

oc apply -k manifests/99-model-swap/qwen-36/

Wait for the model to become Ready:

oc wait llminferenceservice qwen-36 -n llm --for=condition=Ready --timeout=300s
oc get maasmodelref -n llm -o wide

Expected output:

NAME          PHASE   ENDPOINT                                                  HTTPROUTE                GATEWAY              AGE
qwen-coder    Ready   https://maas.<cluster-domain>/                            qwen-36-kserve-route     maas-default-gateway  ...

Step 2: Deploy the Replacement Model

Deploy the replacement (qwen-38) alongside the existing one:

oc apply -k manifests/99-model-swap/qwen-38/
Important

The new LLMInferenceService must use the same spec.model.name as the existing one. Both qwen-36 and qwen-38 use Qwen/Qwen3-Coder. This is the model ID that customers send in their API requests (/v1/chat/completions). If the names differ, customers would need to update their client code.

Step 3: Verify the Replacement is Ready

Wait for both LLMInferenceServices to be running:

oc get llminferenceservice -n llm

Expected output - both old and new show a Ready condition:

NAME       READY   ...
qwen-36    True    ...
qwen-38    True    ...

For GPU models, this can take 5-15 minutes while the image is pulled and model weights are loaded.

Step 4: Swap the MaaSModelRef Pointer

This is the swap itself. Patch the MaaSModelRef to point to the new LLMInferenceService:

oc patch maasmodelref qwen-coder -n llm --type=merge \
  -p '{"spec":{"modelRef":{"name":"qwen-38"}}}'

This one-field change is what makes the swap seamless. The MaaSModelRef name (qwen-coder) stays the same, so all auth policies, subscriptions, and API keys continue to work.

Verify the MaaSModelRef now points to qwen-38:

oc get maasmodelref qwen-coder -n llm -o jsonpath='{.spec.modelRef.name}'
# Expected: qwen-38

Step 5: Delete the Old LLMInferenceService

While both LLMInferenceServices exist, the gateway routes 100% of BBR traffic to qwen-36 (the first-created backend) and 0% to qwen-38. You must delete qwen-36 so the gateway starts routing to qwen-38.

Note

This means the swap is not zero-downtime. There is a brief window (typically a few seconds) between deleting the old model and the gateway routing to the new one where requests may fail.

oc delete llminferenceservice qwen-36 -n llm

This deletes the old inference pods, its HTTPRoute, and frees any GPU resources it was using.

Step 6: Clean Up Stale TokenRateLimitPolicy

After swapping the MaaSModelRef and deleting the old LLMInferenceService, the TokenRateLimitPolicy (TRLP) may retain an owner reference to the old HTTPRoute. This causes the MaaSSubscription to go Failed because the TRLP references a non-existent route.

Delete the stale TRLP so the controller can recreate it with the correct owner reference:

oc delete tokenratelimitpolicy maas-trlp-qwen-coder -n llm

The maas-controller will automatically recreate the TRLP, now correctly owned by the new HTTPRoute.

Step 7: Verify

Confirm that everything is healthy:

# MaaSModelRef should be Ready
oc get maasmodelref -n llm -o wide

# Only the new LLMInferenceService should exist
oc get llminferenceservice -n llm

# Subscriptions should be active (not Failed)
oc get maassubscription -n models-as-a-service

# TRLP should exist and reference the new HTTPRoute
oc get tokenratelimitpolicy -n llm

Test inference to confirm the swap worked. If you already have an API key from before the swap, use it - the whole point is that existing keys keep working. If you need a new one:

CLUSTER_DOMAIN=$(oc get ingresses.config/cluster -o jsonpath='{.spec.domain}')
MAAS_URL="maas.${CLUSTER_DOMAIN}"

# Get admin token
TOKEN=$(oc create token admin-user -n models-as-a-service --duration=1h)

# Create API key (bound to the qwen-coder-free subscription)
API_KEY=$(curl -sk -X POST "https://${MAAS_URL}/v1/api-keys" \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{"name":"swap-test","description":"Post-swap verification","subscription":"qwen-coder-free"}' | \
  python3 -c "import sys,json; print(json.load(sys.stdin)['key'])")
echo "API_KEY=${API_KEY}"

Send an inference request using the BBR endpoint:

curl -sk "https://${MAAS_URL}/v1/chat/completions" \
  -H "Authorization: Bearer ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "publishers/llm/models/Qwen/Qwen3-Coder",
    "messages": [{"role": "user", "content": "Hello!"}]
  }' | jq .

A successful response confirms the swap is complete - the request was routed to qwen-38 using the same model ID and API key that worked with qwen-36.

Note

The model ID in the request body must be the full publisher path as returned by /v1/models (e.g. publishers/llm/models/Qwen/Qwen3-Coder). Using the short name (Qwen/Qwen3-Coder) returns a 404.

Operational Notes

Warning

BBR Routing Conflict

When two LLMInferenceServices in the same namespace share the same spec.model.name, their HTTPRoutes create identical BBR match rules. The gateway accepts both routes but routes 100% of traffic to the first-created backend - the new model receives zero requests. This was validated on OpenShift 4.21: 10/10 requests hit the old pod, 0/10 hit the new one. Deleting the old LLMInferenceService removes its HTTPRoute and lets the gateway discover the new one. There is no way to “test the new model first” while the old one exists.

Warning

TokenRateLimitPolicy Stale Owner Reference

The TokenRateLimitPolicy is auto-created by maas-controller and owned by the HTTPRoute. When the MaaSModelRef pointer changes, the TRLP still references the old HTTPRoute. Deleting the TRLP (Step 6) lets the controller recreate it with the correct owner. If you skip this, the MaaSSubscription may go Failed with an error like: Object <namespace>/maas-trlp-<name> is already owned by another HTTPRoute.

Note

endpointOverride

If you created the MaaSModelRef manually (not through the Kustomize manifests in Phase 5), the controller may not be able to auto-discover the endpoint URL. In that case, set spec.endpointOverride on the MaaSModelRef:

oc patch maasmodelref <name> -n llm --type=merge \
  -p '{"spec":{"endpointOverride":"https://maas.<cluster-domain>/"}}'

You can check if this is needed by looking at the MaaSModelRef status. If it is stuck in Unhealthy with an empty endpoint, endpointOverride is the fix.

Note

Model ID Format

The model ID used in inference requests (/v1/chat/completions) is the full publisher path, not the short model name. For example:

  • Short name: Qwen/Qwen3-Coder
  • Full publisher path: publishers/llm/models/Qwen/Qwen3-Coder

Always use the model ID as returned by the /v1/models endpoint to avoid 404 errors.

Template Manifests

The manifests/99-model-swap/ directory contains two concrete simulator-based templates that walk through the full swap lifecycle (Qwen 3.6 -> 3.8):

99-model-swap/
  qwen-36/                             # Original model (deploy first)
    kustomization.yaml                 # Aggregates llm/ and maas/
    llm/
      kustomization.yaml               # Sets namespace: llm
      model.yaml                       # LLMInferenceService: qwen-36
    maas/
      kustomization.yaml               # MaaS governance resources
      maas-model.yaml                  # MaaSModelRef: qwen-coder -> qwen-36
      maas-auth-policy.yaml            # MaaSAuthPolicy: qwen-coder-access
      maas-subscription-free.yaml      # Free tier (100 tokens/min)
      maas-subscription-premium.yaml   # Premium tier (100000 tokens/min)
  qwen-38/                             # Replacement model (deploy second)
    kustomization.yaml                 # Aggregates llm/ only
    llm/
      kustomization.yaml               # Sets namespace: llm
      model.yaml                       # LLMInferenceService: qwen-38

Both templates use the CPU simulator image (llm-d-inference-sim), so no GPU is required. Both share spec.model.name: Qwen/Qwen3-Coder - this is the invariant that makes the swap seamless.

The qwen-36/ directory includes the full MaaS stack (MaaSModelRef + AuthPolicy + Subscriptions) because it is the original deployment. The qwen-38/ directory only includes the LLMInferenceService because the MaaS governance resources persist unchanged across the swap - only the MaaSModelRef pointer changes.

For a real swap with GPU models, replace the container image, model URI, and resource requests in both model.yaml files to match your actual models.

References

12 - Demos

Demo walkthroughs — rate limiting, OIDC, subscription priority — plus the corporate scenario.

12.1 - Demos

Hands-on walkthroughs that go deeper on the subscription, access control, and authentication topics covered in Phase 5 and Phase 9.

Hands-on walkthroughs that go deeper on the subscription, access control, and authentication topics covered in Phase 5 and Phase 9. Each scenario has setup/run/cleanup scripts and a presenter talk track.

Prerequisites

  • Complete the guide through Phase 5 with at least the simulator model deployed
  • For the OIDC, JWKS Cache, and Subscription Priority demos, also complete Phase 9 (they use Keycloak identities)

Deploy the simulator if not already done:

./scripts/setup-maas.sh --model simulator

Preflight Check

Before presenting, run the preflight script to verify all demos are ready (it creates nothing and applies no YAML):

./demo/preflight.sh

Expected result: 16 passed, 0 failed. The script also warms up maas-api to absorb its cold-start 500.

Subscriptions & Access (Phase 5)

DemoWhat it showsLink
User-Level Rate LimitingAssign MaaSSubscription tiers to groups and individual users. Shows how priority resolves overlaps when a user belongs to multiple groups.README
Subscription PriorityProves entitlement is selected, not accumulated. A user in two groups gets the higher-priority tier, not the sum. Per-user subscriptions can cap below group tiers. Requires Phase 9 (Keycloak).README
Service Account AccessIn-cluster workload calls a model with its ServiceAccount token via TokenReview. No API key or secret needed. Access per namespace, rate limits per workload.README
Corporate ScenarioDivision-level model governance: three divisions (Sales, Engineering, Products), on-prem + cloud models, differentiated access and rate limits. Demonstrates the full CIO-to-deployment policy lifecycle. Recommended starting point for enterprise demos.Full Guide / Scripts

OIDC & Token Validation (Phase 9)

DemoWhat it showsLink
OIDC AuthenticationAuthenticate users from an external OIDC provider (Keycloak) who have no OpenShift account. The groups claim in the token selects the subscription. Includes a click-through UI and CLI sample client.README
JWKS CacheProves JWT signatures are verified locally from a cached JWKS, not per-request to the IdP. Blocks Authorino from reaching Keycloak and shows validation still succeeds.README

Demo Structure

Every demo follows the same pattern:

demo/<name>/
  setup-demo.sh      # Create users, subscriptions, auth policies
  run-demo.sh        # Repeatable runbook (read-only, safe to re-run)
  cleanup-demo.sh    # Tear down demo-specific resources
  README.md          # Full walkthrough with talk track and expected output
Tip

The READMEs document three edge-case behaviors found during demo development: an identity matching two subscriptions gets 403 on the direct-token path, a token with no groups claim fails with an opaque AUTH_FAILURE, and split-horizon DNS can produce a false pass in the JWKS caching proof if you block the wrong address.

12.2 - Corporate Scenario: Division-Level Model Governance

A realistic enterprise demo showing how a CIO rolls out Models as a Service across an organization with three divisions getting differentiated access.

A realistic enterprise demo showing how a CIO rolls out Models as a Service across an organization. Three divisions get differentiated access to on-prem and cloud models, each with appropriate token budgets - all enforced by the platform through policy, not code.

This is the recommended starting point when you want to show Models as a Service to stakeholders who care about governance, cost control, and multi-team model access.

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

The scenario

A CIO at a mid-size company assigns three divisions access to AI models. Each division has different needs and different budgets:

DivisionGeneral Purpose (on-prem)Code Model - DeepSeek R2 (on-prem)Multimodal - Gemini Flash (cloud)
SalesYes (500 tok/min)NoNo
EngineeringYes (500 tok/min)Yes (1000 tok/min)Yes (20 tok/min)
ProductsYes (500 tok/min)Yes (500 tok/min)No

The cloud model is expensive, so only Engineering gets access - and with a tight cap. Engineering gets higher limits on the code model because they use it more heavily. Sales only needs the general purpose chatbot.

Each division gets ONE subscription covering all their allowed models. One API key per user, full access to everything their division is entitled to.

Prerequisites

  • Complete the guide through Phase 5 with at least the simulator model deployed
  • oc logged into the cluster as cluster-admin
  • htpasswd, curl, jq available on PATH

Deploy the simulator if not already done:

./scripts/setup-maas.sh --model simulator

Architecture

Models

All three models are backed by the CPU-only simulator (llm-d-inference-sim) - no GPU required. The namespace appears in the URL path, which is how you visually distinguish on-prem from cloud.

ModelNamespaceTypeServed name
facebook-opt-125m-simulatedllmOn-prem (existing)facebook/opt-125m
deepseek-r2-llmdllmOn-prem (new)deepseek/deepseek-r2
gemini-flash-cloudcloud-modelsCloud (new)google/gemini-flash

URL examples:

  • On-prem: https://maas.<domain>/llm/deepseek-r2-llmd/v1/chat/completions
  • Cloud: https://maas.<domain>/cloud-models/gemini-flash-cloud/v1/chat/completions

Users and groups

Six users across three groups, created via htpasswd identity provider (corp-demo):

GroupUsersDivision
corp-salessales-1, sales-2Sales
corp-engineeringeng-1, eng-2Engineering
corp-productsprod-1, prod-2Products

MaaS CRDs

The governance is expressed through three CRD types:

MaaSAuthPolicy controls who can see which models:

  • corp-deepseek-access - grants corp-engineering + corp-products access to deepseek-r2-llmd
  • corp-cloud-access - grants corp-engineering ONLY access to gemini-flash-cloud
  • The existing simulator-access already grants system:authenticated access to the general model

MaaSSubscription controls how much each division can consume:

SubscriptionDivisionModels and limits
corp-salesSalesgeneral: 500 tok/min
corp-engineeringEngineeringgeneral: 500 tok/min, deepseek: 1000 tok/min, gemini: 20 tok/min
corp-productsProductsgeneral: 500 tok/min, deepseek: 500 tok/min

All subscriptions use priority 30 to outrank the shipped simulator-premium (priority 20) which targets system:authenticated.

MaaSModelRef registers each model with the MaaS control plane. Must be in the same namespace as its LLMInferenceService.

Step 1: Setup

The setup script creates everything: users, groups, models, and governance CRDs.

cd demo/corporate-scenario
./setup-demo.sh

Set DEMO_PASSWORD to skip the interactive prompt:

DEMO_PASSWORD='redhat123' ./setup-demo.sh

The script:

  1. Checks that the general-purpose model (facebook-opt-125m-simulated) is deployed and Ready
  2. Creates 6 htpasswd users and adds the corp-demo identity provider (additive, does not touch existing providers)
  3. Creates 3 OpenShift groups (corp-sales, corp-engineering, corp-products)
  4. Deploys the cloud-models namespace with gateway labels
  5. Deploys 2 new LLMInferenceService resources (simulator-backed, CPU-only)
  6. Waits for simulator pods to start Running
  7. Applies MaaSModelRef, MaaSAuthPolicy, and MaaSSubscription resources
  8. Waits for both MaaSModelRefs to reach Ready
  9. Prints a summary of all resources
Note

The oauth pods restart after adding the identity provider. Wait about a minute before trying to log in as the demo users.

What gets created

After setup completes, verify the state:

# Models registered with MaaS
oc get maasmodelref -A

# Subscriptions
oc get maassubscription -n models-as-a-service

# Auth policies
oc get maasauthpolicy -n models-as-a-service

# Simulator pods
oc get pods -n llm -l app.kubernetes.io/part-of=llminferenceservice
oc get pods -n cloud-models -l app.kubernetes.io/part-of=llminferenceservice

Step 2: Run the demo

DEMO_PASSWORD='redhat123' ./run-demo.sh

The script logs in as one user per division (sales-1, eng-1, prod-1), mints an API key, and tests:

  • Model visibility - which models each user can see in the catalog
  • Inference on allowed models - sends 8 requests per model, shows tokens consumed
  • Denied model access - proves 403 for unauthorized models
  • Rate limiting - eng-1’s 20 tok/min cloud limit triggers within the burst

Expected output

=== sales-1 (corp-sales) ===
  Visible models:
    publishers/llm/models/facebook/opt-125m
  Resolved subscription: corp-sales
  General purpose (on-prem):
    8 requests -> 8 ok / 0 rate-limited / 0 other  (22 tokens)
  DeepSeek R2 (on-prem):
    deepseek-r2-llmd: 403 Forbidden (expected)
  Gemini Flash (cloud):
    gemini-flash-cloud: 403 Forbidden (expected)

=== eng-1 (corp-engineering) ===
  Visible models:
    publishers/cloud-models/models/google/gemini-flash
    publishers/llm/models/deepseek/deepseek-r2
    publishers/llm/models/facebook/opt-125m
  Resolved subscription: corp-engineering
  General purpose (on-prem):
    8 requests -> 8 ok / 0 rate-limited / 0 other  (21 tokens)
  DeepSeek R2 (on-prem):
    8 requests -> 8 ok / 0 rate-limited / 0 other  (27 tokens)
  Gemini Flash (cloud) - expect rate limiting at ~20 tokens/min:
    8 requests -> 6 ok / 2 rate-limited / 0 other  (20 tokens)

=== prod-1 (corp-products) ===
  Visible models:
    publishers/llm/models/deepseek/deepseek-r2
    publishers/llm/models/facebook/opt-125m
  Resolved subscription: corp-products
  General purpose (on-prem):
    8 requests -> 8 ok / 0 rate-limited / 0 other  (29 tokens)
  DeepSeek R2 (on-prem):
    8 requests -> 8 ok / 0 rate-limited / 0 other  (32 tokens)
  Gemini Flash (cloud):
    gemini-flash-cloud: 403 Forbidden (expected)

Key observations:

  • sales-1 sees only one model, gets 403 on the other two - Sales has no code model or cloud access
  • eng-1 sees all three models, on-prem requests sail through, cloud model hits rate limiting at ~20 tokens - the CIO’s cost control in action
  • prod-1 sees two models (no cloud), both on-prem models work fine

Step 3: Verify

The automated verification script runs 15 tests covering access control, rate limiting, key multiplication, and config drift.

DEMO_PASSWORD='redhat123' ./verify-scenario.sh

What it tests

Test suiteWhat it proves
Access control (9 tests)Full 3x3 matrix of users x models: 6 should allow (200), 3 should deny (403)
Rate limiting (1 test)eng-1 hits 429 on the cloud model within 15 requests
Key multiplication (1 test)eng-2 mints two keys, exhausts quota with key-1, verifies key-2 is also rate-limited immediately. Proves rate limits are per subscription, not per credential.
Config drift (4 tests)Subscription token limits match expected values (catches manual edits or drift)

Expected result:

Results: 15 passed / 0 failed / 0 skipped (of 15)

Step 4: Cleanup

./cleanup-demo.sh

Removes all demo resources (subscriptions, auth policies, MaaSModelRefs, LLMInferenceServices, namespace, groups, users, IDP). The existing general-purpose model is not touched.

Talk track

Use this flow when presenting the scenario to stakeholders.

1. Start with the CIO’s problem

Three divisions, each with different needs. Sales wants a chatbot. Engineering wants code assistance plus cloud model access. Products needs the code model for sprint reviews. How do you give each team exactly what they need - no more, no less?

2. Show the manifests

Open auth-policies.yaml and subscriptions.yaml. Point out how MaaSAuthPolicy controls visibility (who can see which models) and MaaSSubscription controls consumption (how much each group can use). The combination is the full governance picture.

One subscription per division, covering all their models with per-model limits. One key, full access.

3. Show the model catalog per user

Log in to the Red Hat OpenShift AI Dashboard as each division user:

  • sales-1 sees one model
  • prod-1 sees two models
  • eng-1 sees all three models

The platform hides what you cannot access. There is no “request access” button for models outside your policy.

4. Run the burst

Point out that Engineering hits rate limiting on the cloud model (20 tokens/min) but not on the on-prem models. That is the CIO’s intent: cloud is expensive, keep it tight. On-prem is cheaper, give them room.

5. Try denied access

Sales calling the DeepSeek model gets a clean 403. Not a 500, not a timeout - the platform knows the policy and enforces it before the request reaches the model.

6. Key multiplication does not help

Run verify-scenario.sh and point at the key multiplication test. Minting a second API key does not reset the quota. The rate limit is per subscription, not per credential.

7. Change a limit live

Patch a subscription to show that governance is policy, not deployment:

oc patch maassubscription corp-engineering -n models-as-a-service --type=json \
  -p '[{"op":"replace","path":"/spec/modelRefs/2/tokenRateLimits/0/limit","value":5000}]'

Re-run ./run-demo.sh - Engineering no longer hits rate limiting on the cloud model. No redeployment, no restart, instant policy change.

Restore the original limit:

oc patch maassubscription corp-engineering -n models-as-a-service --type=json \
  -p '[{"op":"replace","path":"/spec/modelRefs/2/tokenRateLimits/0/limit","value":20}]'

How the governance works

MaaSAuthPolicy - who can see what

Each MaaSAuthPolicy grants access to one or more models for specific groups or users. If a user is not covered by any auth policy for a model, the model does not appear in their catalog and API calls return 403.

The existing simulator-access policy grants system:authenticated access to the general purpose model. The corporate policies add group-specific access to the two new models without touching the existing setup.

MaaSSubscription - how much they can use

Each division gets ONE subscription covering all their allowed models, with per-model token rate limits. When a user mints an API key, the platform resolves the highest-priority subscription they match and attaches it.

All corporate subscriptions use priority 30 to outrank the shipped simulator-premium (priority 20, targeting system:authenticated). Without this, the shipped tier would win and the corporate limits would not apply.

Priority resolution

  • Subscriptions are selected, not accumulated. A user gets ONE subscription - the highest priority match.
  • A single subscription can cover multiple models with different limits per model.
  • Minting multiple API keys does not multiply the quota. Rate limits are per subscription, not per credential.
  • Priority 30 for all corporate-scenario subscriptions means they win over shipped defaults (priority 10 and 20).

MaaSModelRef governance pairing

A MaaSModelRef reaches Ready only when BOTH a MaaSSubscription AND a MaaSAuthPolicy reference it. This is the governance pairing - without both, the model is not accessible through the MaaS control plane.

Files

demo/corporate-scenario/
  README.md              # quick reference
  setup-demo.sh          # create users, groups, models, MaaS CRDs
  run-demo.sh            # interactive demo - access + rate limits per division
  verify-scenario.sh     # automated verification (15 tests)
  cleanup-demo.sh        # tear down all demo resources
  manifests/
    namespace-cloud-models.yaml
    model-deepseek-r2.yaml
    model-gemini-flash.yaml
    maas-model-deepseek-r2.yaml
    maas-model-gemini-flash.yaml
    auth-policies.yaml
    subscriptions.yaml
  screenshots/           # captured after setup on a live cluster

13 - Cleanup & Teardown

Remove Red Hat OpenShift AI Models as a Service and its dependencies from your OpenShift cluster with the cleanup script or manual oc commands.

Remove Models as a Service and its dependencies from your OpenShift cluster.

Automated Cleanup

The cleanup script undoes setup-maas.sh in reverse order, checking whether each resource exists before deleting.

./scripts/cleanup-maas.sh

The script prompts for confirmation before deleting anything. Pass --yes to skip the prompt.

Options

FlagDescription
--dry-runPreview what would be deleted without actually deleting
--keep-operatorsSkip operator removal (Phase 7) - useful when you only want to tear down models and config
--from-phase <N>Start from a specific cleanup phase (1-7)
--yesSkip the confirmation prompt

Cleanup Phases

The script runs these phases in order:

PhaseNameWhat it removes
1External ModelsExternalModel CRs, provider API key secrets, external-models namespace
2ObservabilityTelemetry policies, COO / OpenTelemetry / Tempo operators and namespaces
3ModelsMaaSSubscription, MaaSAuthPolicy, MaaSModelRef, LLMInferenceService, llm namespace
4Red Hat OpenShift AI ConfigurationOdhDashboardConfig, DataScienceCluster, DSCInitialization
5MaaS PlatformPostgreSQL deployment / PVC / service, postgres-creds and maas-db-config secrets
6Platform ConfigurationGateway, GatewayClass, Route, Kuadrant CR, user workload monitoring config, MetalLB (if installed)
7OperatorsRHCL, cert-manager, LWS, Red Hat OpenShift AI subscriptions / CSVs, operator namespaces, Red Hat OpenShift AI-managed namespaces

Examples

Preview what would be deleted:

./scripts/cleanup-maas.sh --dry-run

Remove models and config but keep operators installed:

./scripts/cleanup-maas.sh --keep-operators

Remove only the operators (everything else already cleaned up):

./scripts/cleanup-maas.sh --from-phase 7

Manual Cleanup

If you prefer to remove resources selectively, follow these steps in order.

Remove Models

# Delete MaaS governance CRs
oc delete maassubscription --all -n models-as-a-service --ignore-not-found
oc delete maasauthpolicy --all -n models-as-a-service --ignore-not-found
oc delete maasmodelref --all -n llm --ignore-not-found

# Delete model serving
oc delete llminferenceservice --all -n llm --ignore-not-found

# Delete model namespace
oc delete namespace llm --ignore-not-found

Remove RHOAI Configuration

oc delete odhdashboardconfig odh-dashboard-config -n redhat-ods-applications --ignore-not-found
oc delete datasciencecluster default-dsc --ignore-not-found
oc delete dscinitialization default-dsci --ignore-not-found

Remove MaaS Platform (PostgreSQL)

oc delete deployment postgres -n redhat-ods-applications --ignore-not-found
oc delete service postgres -n redhat-ods-applications --ignore-not-found
oc delete pvc postgres-data -n redhat-ods-applications --ignore-not-found
oc delete secret postgres-creds maas-db-config -n redhat-ods-applications --ignore-not-found

# RHOAI 3.5+ mirrored the secret to redhat-ai-gateway-infra
oc delete secret maas-db-config -n redhat-ai-gateway-infra --ignore-not-found

Remove Gateway and Kuadrant

# Gateway resources
oc delete route maas-default-gateway-https -n openshift-ingress --ignore-not-found
oc delete gateway maas-default-gateway -n openshift-ingress --ignore-not-found
oc delete configmap maas-gateway-options -n openshift-ingress --ignore-not-found
oc delete gatewayclass openshift-default --ignore-not-found

# Kuadrant
oc delete kuadrant kuadrant -n kuadrant-system --ignore-not-found
oc delete namespace kuadrant-system --ignore-not-found

Remove Operators

Delete subscriptions first, then CSVs, then namespaces:

# RHCL (shared openshift-operators namespace - only delete the subscription and CSVs)
oc delete subscription rhcl-operator -n openshift-operators --ignore-not-found
oc delete csv -n openshift-operators -l operators.coreos.com/rhcl-operator.openshift-operators= --ignore-not-found

# cert-manager
oc delete subscription openshift-cert-manager-operator -n cert-manager-operator --ignore-not-found
oc delete csv --all -n cert-manager-operator --ignore-not-found
oc delete namespace cert-manager-operator --ignore-not-found

# Leader Worker Set
oc delete subscription leader-worker-set -n openshift-lws-operator --ignore-not-found
oc delete csv --all -n openshift-lws-operator --ignore-not-found
oc delete namespace openshift-lws-operator --ignore-not-found

# RHOAI (last - manages many resources)
oc delete subscription rhods-operator -n redhat-ods-operator --ignore-not-found
oc delete csv --all -n redhat-ods-operator --ignore-not-found
oc delete namespace redhat-ods-operator --ignore-not-found

Wait 60 seconds for the RHOAI operator to clean up managed resources, then remove its namespaces:

oc delete namespace redhat-ods-applications --ignore-not-found
oc delete namespace redhat-ods-monitoring --ignore-not-found
oc delete namespace redhat-ai-gateway-infra --ignore-not-found  # RHOAI 3.5+
oc delete namespace rhods-notebooks --ignore-not-found
oc delete namespace rhoai-model-registries --ignore-not-found
oc delete namespace models-as-a-service --ignore-not-found

What Is Not Removed

The cleanup script does not remove:

  • Pre-existing namespaces (openshift-operators, openshift-monitoring, openshift-ingress)
  • GPU operators (NFD, NVIDIA GPU Operator) - these are installed separately
  • CRDs left behind by operators (OLM does not remove CRDs on operator deletion)
  • Persistent data in external storage (e.g., if you used an external PostgreSQL)

Next step

To reinstall, run ./scripts/setup-maas.sh - see Automated Setup.

14 - Guide Changelog

Changes to the Red Hat OpenShift AI Models as a Service companion guide since the project started in June 2026.

Changes to the Red Hat OpenShift AI Models as a Service companion guide since the project started in June 2026. Covers new guide phases, automation improvements, bug fixes, and community contributions.

Each entry links to its pull request for full details.

November 2026

New Pages

  • Running MaaS with RHCL 1.5 - Validation of Red Hat OpenShift AI 3.5.2 MaaS on RHCL 1.5.0, side by side with the GA MCP Gateway that ships inside RHCL 1.5. Verified 15/15 end to end, plus an MCP tools/call and an AuthPolicy on the MCP gateway enforced by the shared Authorino. Covers the consolidated RHCL 1.5 operator (one CSV, components deployed through KuadrantControlPlane), the Authorino Service losing its serving-cert annotation (Kuadrant stuck on AuthorinoNotReady, API keys return 500), the Kuadrant operator near its 500Mi limit and how to raise it through the Subscription, Kuadrant being a silent singleton, pointing the MCP auth EnvoyFilter at kuadrant-system, and the single MetalLB address the MCP gateway can take first. (#205) Each issue now links its Jira: RHOAIENG-103136, CONNLINK-1976, RHOAIENG-103137, plus the existing CONNLINK-1878, CONNLINK-1713 and CONNLINK-1973.

  • Running MaaS on OpenShift 5 - First walkthrough of MaaS on OpenShift 5.0, covering what carries over unchanged (OLM v0, Gateway API v1, the Istio-backed openshift-default GatewayClass, Kuadrant policy attachment) and seven issues with workarounds: RHOAI missing from the OpenShift 5 operator index, the RHCL stable channel renamed to stable-1.5, the installer assuming 3.5 while the catalog serves 3.4.2, a second Kuadrant instance on a cluster that already runs RHCL, the MetalLB pool landing on a node address, verify.sh using a 3.5-only inference URL, and the gateway HPA pinned at maximum replicas. Verified 15/15 end to end on RHOAI 3.4.2. (#203)

Fixes

  • Authorino Serving-Cert Annotation on RHCL 1.5 - setup-maas.sh Phase 3 now checks that the authorino-authorino-authorization Service still has its serving-cert annotation, re-applies it if the RHCL 1.5 Authorino operator dropped it, waits for the authorino-server-cert Secret and restarts Authorino. Phase 1 also no longer re-applies the checked-in Subscription over an operator that is already installed, so an RHCL on stable-1.5 is not moved back to stable. (#205)

  • Operator Catalog and Channel Resolution - setup-maas.sh now looks up which CatalogSource actually publishes each operator and which channels it offers, instead of assuming redhat-operators and a fixed channel. It prefers a catalog that carries the channel the manifest asks for, so a snapshot catalog cannot silently move you to an untested release, and redhat-operators wins ties. Adds --catalog-source to prefer a specific catalog, warning and falling back when that catalog does not carry the package, and --to-phase to stop after a given phase. Also skips creating a duplicate Subscription when an operator is already installed from another namespace, leaves an already-resolved Subscription untouched, and waits for the CSV where the operator really lives. (#203)

  • RHOAI Version Re-detection - The installer read the RHOAI version once during preflight, before the operator existed, so a run that asked for 3.5 against a catalog serving 3.4.2 applied the 3.5 DSC layout. The API server prunes the unknown aigateway field without an error, leaving MaaS silently disabled. The version is now re-read from the CSV after the operator installs and again at Phase 4. (#203)

  • Gateway CPU Request Raised to 500m - The Sail Operator gives the MaaS gateway Deployment an HPA that targets 80% CPU of the container request, and a gateway running the RHCL Wasm filters idles at 145-271m. With the old 100m request the HPA sat permanently at maxReplicas: 10, each pod holding a 2Gi limit. gateway-resources.yaml now requests 500m, which brought a live cluster back to minReplicas: 2 in ten seconds with no loss of health. The 2Gi memory limit is unchanged, since that is still the RHOAIENG-68589 workaround. (#203)

  • MetalLB Pool Collision - The pool address was derived as “first node IP plus one”, which lands on a second node whenever node addresses are consecutive. The resulting collision on port 443 takes down the console and OAuth. Node addresses are now excluded when choosing the pool. (#203)

  • verify.sh Inference URL on RHOAI 3.4 - The inference, auth-enforcement and rate-limit checks posted to /v1/chat/completions at the gateway root, which only exists on 3.5 with body-based routing. On 3.4 every request returned 404 and looked like an auth failure. The checks now use the per-model URL from the models listing. (#203)

October 2026

New Pages

  • MaaS:PAL Automated Verification - A new section to explain the MaaS:PAL community plugin to help with MaaS configuration verification (#192)

Features

  • HTTP Proxy for External Models - New section in the external models page for clusters that can only reach provider APIs through a corporate HTTP proxy, with Azure OpenAI as the worked example. Explains why there is no proxy setting to turn on (Envoy ignores HTTP_PROXY, Istio tunnel does not apply to HTTP routes, http_11_proxy EnvoyFilters cannot attach to the reconciler-generated cluster on Envoy 1.35, and the tls/port annotations are 3.4 only), then documents the egress tunnel pattern that keeps TLS end-to-end to the provider. Includes Kustomize manifests with a lab proxy for testing. (#194)

Fixes

  • Version Notes in Phase 1 - Added an orientation-only table of the OCP / RHOAI / RHCL versions the guide is exercised against, pointing at the supported configurations matrix as the authoritative source, plus a note on how the Red Hat AI subscription guide describes RHCL entitlement for MaaS. Dropped the stale “pin to 1.3.4” suggestion from the troubleshooting checklist. (#189)

  • WASM Auth Timeout in External Models Guide - Added Known Issue entry for the WASM auth timeout (RHOAIENG-71638) to the external models page so users hitting HTTP 500 under load can find the fix directly. Also bumped the recommended AUTH_SERVICE_TIMEOUT from 2s to 10s based on field feedback. (#186)

  • CORS Undo Status Code - Fixed expected status code in the CORS guide undo section: stock gateway returns 404 on OPTIONS (no HTTPRoute match), not 401 as originally documented. (#185)

September 2026

New Pages

  • Multi-Tenancy Reference - What RHOAI 3.5 MaaS multi-tenancy covers: tenants vs instances, dedicated vs shared resources, isolation boundaries, AITenant provisioning walkthrough, and quick answers for the common questions. (#170)

  • API Key Security Reference - Deep dive into MaaS API key internals: key anatomy, hash derivation, ValidateAPIKey flow, IDOR protection, lifecycle management, and 8-threat model. (#129)

  • Model Swap Reference - How to swap a model backend without customer-facing changes. Covers MaaSModelRef hierarchy, 6-step migration procedure, BBR endpoint routing, and concrete Qwen 3.6→3.8 swap templates. (#113, #134)

  • Platform Upgrade Guide (3.4 → 3.5) - End-to-end 10-step MaaS migration guide covering DSC fields, namespace migration, ExternalModel API changes, and dashboard config. (#119)

  • Demos Page - 5 presenter-ready demos for subscription tiering, priority resolution, OIDC authentication, service account access, and JWKS cache validation. Contributed by deewhyweb. Grouped by parent phase with inline TIP pointers from Phase 5 and Phase 9. (#152, #153)

Features

  • Admin Key Management FAQ - New section in the API Key Security page: why keys cannot be created on behalf of another user (and what works instead: self-service, IdP tokens with external OIDC, ServiceAccount tokens), and why there is no per-user key cap (quota is per subscription, not per key). (#172)

  • Site Search - Search box in the top navbar, powered by the official Antora Lunr extension. Client-side index built at build time, results grouped by page with section deep links and snippets. (#171)

  • Verify Guide Skill Documentation - Added /verify-guide skill to the Claude Code guide page with usage, arguments, phases table, and description of all 6 verification phases. (#166)

  • Azure OpenAI External Model Provider - Added Azure OpenAI as fifth external model provider with Kustomize manifests, setup/cleanup script support, and gpt-4.1-mini as default model. Uses the azure-openai BBR provider type. (#168)

  • Anthropic External Model Provider - Added Anthropic (Claude Haiku 4.5) as fourth external model provider with Kustomize manifests, setup/cleanup script support, and RHOAIENG-93984 known issue documentation for /v1/messages token counting gap. (#164)

  • Phase 9: External OIDC Authentication - Full Keycloak integration with PostgreSQL backend, realm import, automation script, and 6-check test suite. Supports corporate SSO with JWT claim-based authorization. (#98)

  • Loki-based Usage Dashboards - Added Loki Operator, MinIO, and LokiStack manifests to Phase 7. When usage logging is enabled, operator auto-creates EnvoyFilter, OTEL Collector, Tenancy Proxy, and Perses dashboards. RHOAI 3.5+ only. (#96)

  • Qwen3-0.6B CPU-only Model - First model in the guide that does not need a GPU. Runs on vLLM CPU runtime with 4-8 CPU and 16Gi memory. (#133)

  • Limitador Persistence with Redis - Added dev Redis deployment and Limitador CR patch so rate-limit counters survive pod restarts. New --with-redis flag for setup-maas.sh. (#142)

  • External Models Dual 3.4/3.5 Support - Added ExternalProvider + ExternalModel manifests for RHOAI 3.5 new inference.opendatahub.io/v1alpha1 API. Tabs blocks in docs and version branching in setup script. (#88)

  • Gateway Proxy Workaround - On OCP < 4.22 behind corporate proxy, gateway pod does not get cluster-wide proxy settings. Added Step 5f with ConfigMap template for HTTP_PROXY/HTTPS_PROXY/NO_PROXY env vars. (#137)

  • Gateway Telemetry Auto-Creation - Replaced manual oc apply -k telemetry step with MaasTenantConfig/Tenant CR patch. The RHOAI operator (maas-controller) auto-creates TelemetryPolicy and Istio Telemetry when spec.telemetry.enabled: true is set. Added 3.4/3.5 tabs and optional per-user metrics toggle. (#146)

  • Governance Pairing Documentation - Both MaaSAuthPolicy AND MaaSSubscription must reference the same model for Ready state. Day 2 patch commands included. (#117)

  • ServiceAccount-Scoped Subscriptions - New section in Phase 5 showing how to scope a MaaSSubscription to a specific ServiceAccount via spec.owner.users. Useful for CI/CD pipelines and batch jobs that need their own rate limits. (#150)

  • External Models Dashboard Documentation - Added Technology Preview callout for the External models tab in the RHOAI Dashboard (AI hub > Models > Deployments). New section in Phase 8 with screenshot showing the model listing and provider details. (#156)

Fixes

  • Broken Official Docs Links - The RHOAI 3.5 docs renamed the MaaS chapter chunk and retired two anchors, breaking five deep links in Phases 2, 7, and 8. All links now point at the correct per-version chunk and anchors, verified against the live docs. (#170)

  • Live Install Review Fixes - Docs, script, and demo fixes from a full manual install review: Phase 3 namespace pre-create for 3.5+, Phase 9 Keycloak hostname patch, verify.sh now keeps pre-existing models at cleanup, demo subscription priorities raised above the generic model tiers, and gpt-oss-20b VRAM corrected to ~16 GiB (runs quantized on a 24 GB L4). (#169)

  • UWM No Longer Required in RHOAI 3.5 - Marked User Workload Monitoring as optional in Phase 2. RHOAI 3.5 uses COO’s MonitoringStack for metrics collection. UWM is still useful for forwarding metrics to external tools. (#167)

  • Phase 4 CRD Race Condition - DSC triggers async CRD registration. Script was applying HardwareProfile before CRD existed. Added wait_for_crd() helper. (#108)

  • OGX Rename for RHOAI 3.5 - RHOAI 3.5 renamed llamastackoperator to ogx. Old key was silently ignored, blocking Playground from appearing. (#110)

  • IPP-managed Label for External Models - RHOAI 3.5 changed secret label from bbr-managed to ipp-managed. Without correct label, apikey-injection watcher never picks up the secret and inference returns 500. (#90)

  • Stale DNSRecord After Gateway Service Type Change - When gateway switches from LoadBalancer to ClusterIP, stale dnsrecord pointing to defunct AWS ELB is not cleaned up. Added troubleshooting entry with diagnosis and workaround. Filed RHOAIENG-93962. (#140)

  • HTTPRoute Rule Name Collision - RHOAI 3.5 hardcoded HTTPRoute rule names. Multiple models on the same gateway cause Istio to merge duplicate rules, sending all traffic to one EPP. Documented as known issue. (#139)

  • Body-Based Routing Curl Examples - All inference curl examples across 5 guide pages, verify.sh, and setup-maas.sh now use body-based routing at /v1/chat/completions with the correct model ID from /v1/models. Local models require the canonical publishers/{namespace}/models/{model-name} format - short names return 404. Also added qwen3-06b to VALID_MODELS. (#147)

  • 13 Documentation Fixes from Full Guide Review - Broken xref anchor, wrong Roo Code URL, missing namespace in oc patch, stale llamastackoperator ref, missing externalModels flag, wrong OCP version, and more across 10 files. (#124)

  • Gateway-access Namespace Labeling for RHOAI 3.5 - Phase 2 tried to label redhat-ai-gateway-infra before it exists. Moved labeling to Phase 4 with safety-net re-label. (#101)

  • OperatorGroup Skip for Pre-installed Operators - OLM only allows one OperatorGroup per namespace. Script now checks for existing groups and skips if present. (#104)

  • Authorino Patch Race on Fresh Install - Script tried to patch Authorino CR before it exists. Added existence check with Phase 3 retry logic. (#114)

  • 3.4 to 3.5 Upgrade Path Bugs - Channel not restored on cluster after --rhoai-version 3.4, and DSC not updated during upgrade with --from-phase 4. (#84)

  • OTEL Collector Proxy Interception - On proxied clusters, OTEL collector routes TargetAllocator request through corporate proxy. Root cause: short hostname without .svc suffix. Workaround patches OTel CR spec.env. Filed RHOAIENG-91640. (#105)

August 2026

New Pages

  • Post-Upgrade Troubleshooting - 10 most common 3.4→3.5 upgrade issues with symptoms, diagnosis commands, and workarounds. Covers MCP OOM, ExternalModel migration, gateway label mismatch, hostname discovery, and more. All issues linked to Jira. (#79)

  • Cleanup and Teardown Guide - New Phase 9 cleanup page with cleanup-maas.sh script. Reverses setup in 7 phases, supports --dry-run, --keep-operators, --from-phase, --yes. (#56)

Features

  • RHOAI 3.4/3.5 Dual-Version Support - Auto-detects RHOAI version from CSV. AI Gateway modularization (kserve.modelsAsService -> aigateway.modelsAsAService), dual DSC manifests, version tabs in docs. Validated across 10 walkthroughs. (#76)

  • Disconnected/Air-gapped Full Support - Phase 0 docs, ImageSetConfiguration, ITMS manifests, GPU MachineSet template. Added Gemma 2 9B IT FP8 model for single A10G GPU. Fixed internal LB annotation for AWS disconnected. (#57, #58, #59)

  • WASM Shim for Disconnected Clusters - Kuadrant WASM shim is fetched via OCI at runtime, bypassing CRI-O/IDMS. Added RELATED_IMAGE_WASMSHIM patch and WASM shim to ImageSetConfiguration/ITMS. (#59)

  • GPU HardwareProfile and Model Cleanup - Added HardwareProfile CR to Phase 4 for proper GPU scheduling. Removed T4 (compute capability 75 too low for FP8) and A10G (tensor tile size error with current vLLM) from supported GPUs. (#72)

Fixes

  • Custom Hostname Support - Added --maas-hostname flag and MAAS_HOSTNAME env var. Fixed CSV wait on fresh clusters. Commented out TelemetryPolicy fields that crash Wasm shim before RHOAI 3.4.4. (#71)

  • Istiod/Proxyv2 Images for Disconnected OCP >= 4.20.32 - Ingress operator embeds Istio (sail library) instead of standalone OSSM. Images are not in any catalog, causing ImagePullBackOff. Added discovery commands. (#75)

  • RHCL Pin Removed - Removed v1.3.4 pin since RHCL v1.4.2 fixes the WASM bugs. (#56)

  • Skip ModelControllerReady on RHOAI 3.5+ - DSC condition was removed in 3.5, causing setup script to wait 300s for nothing on every fresh install. (#78)

  • GPU Driver DTK Kernel Check - Made the kernel check the gate for GPU driver builds on disconnected clusters. Driver builds only needed when DTK image kernel does not match the node. Contributed by deewhyweb. (#69)

July 2026

Changes

  • OSSM3 Removal - On OCP 4.20+, openshift-ingress manages OSSM internally. Pre-installing servicemeshoperator3 blocked the gateway controller. Removed OSSM subscription and all manual OSSM references. (#45, #46)

  • Verify-guide Claude Code Skill - New automation skill that runs a full naive-user walkthrough on a live cluster. Covers 6 phases: cluster login, setup-maas.sh, verify.sh E2E (15 checks), 8 blind-spot regression checks, guide content verification, and report. (#49)

  • Pipefail and RHCL Install Plan Fixes - Fixed Phase 5 crash when all model pods are healthy (grep exit 1 under pipefail). Fixed RHCL install plan approval to use subscription status lookup. (#50)

June 2026

Initial Release

  • Guide Launch - Antora documentation site deployed on GitHub Pages. Phases 1-7 covering prerequisites, platform config, MaaS platform, RHOAI config, model deployment, verification, and observability. Includes setup-maas.sh automation script and Kustomize manifests for each phase.

  • Alpha Testing - Initial alpha-test feedback from bryonbaker and nueda-rh covering content accuracy, missing steps, typo fixes, and redundant verification removal. (#2, #3, #4, #8)

Features

  • Architecture and Request Flow Reference - New reference page with 4-layer component overview, 8-step request flow walkthrough, Mermaid diagrams, and FlowStory interactive visualizer link. (#12)

  • Phase 8: External Models - Added ExternalModel support for OpenAI (gpt-4o-mini), Google Gemini (gemini-2.5-flash), and AWS Bedrock. Kustomize manifests, --external-model-provider flag, and full documentation. (#20, #21)

  • Gateway OOMKill Persistent Fix - Replaced temporary oc patch deployment workaround with persistent ConfigMap + spec.infrastructure.parametersRef approach. Survives Istio reconciliation. (#26)

  • Gateway Namespace Binding Restriction - Switched gateway from allowedRoutes.namespaces.from: All to from: Selector with maas.opendatahub.io/gateway-access=true label. Only labeled namespaces can attach HTTPRoutes. (#36)

  • DSCI Monitoring Configuration - Phase 7 installed observability operators but never configured the DSCI to use them. Added DSCI patch with metrics and traces configuration. (#37)

Fixes

  • End-to-End Testing Fixes - Fixed 5 script bugs (CSV timeout, Kuadrant pod restart label, ODH namespace label, RHOAI version parsing, OdhDashboardConfig race) and 2 doc inaccuracies from first live cluster testing. (#14)

  • Expected Outputs Update for RHOAI 3.4.0 - Updated CSV versions, route/TLS output, CSV column names, API key creation command, verification pass count, and replaced static placeholders with shell variables. (#16)

  • RHCL Pinned to v1.3.4 - RHCL 1.4.0 had WASM plugin loading issues causing gateway errors and breaking the RHOAI model UI. Added startingCSV + Manual install plan approval. (#32)

  • GPU Operand Instances - Added ClusterPolicy and NodeFeatureDiscovery CRs to Phase 1 manifests. Without these, GPU operator does not install drivers. (#33)

  • MetalLB IP Collision on SNO - Using node’s own InternalIP for MetalLB caused kube-proxy iptables to hijack port 443 traffic, breaking OAuth callbacks, console access, and in-cluster *.apps routes. Now derives MetalLB IP as node IP + 1. (#40)

Contributors

ContributorContributions
rcarrataPrimary author - guide content, automation scripts, Kustomize manifests
bryonbakerAlpha testing review and documentation feedback
deewhywebMaaS entitlement and authentication demos, GPU driver DTK kernel check
nueda-rhPlatform configuration fixes
rafpcloudDashboard namespace labeling
skoussouREADME link fixes
SuroteCustom hostname support and dashboard feature flags
stefan-bergsteinOperatorGroup pre-install bug report

Issue reporters: hupiper, guimou, svalluru, erwangranger.

15 - AI-Assisted Installation and Verification

Skill definitions that provide AI-assisted MaaS installation and end-to-end verification with any AI coding tool.

This repository includes skill definitions that provide AI-assisted MaaS installation and end-to-end verification. The /install-maas skill wraps the same setup-maas.sh script used in the Automated Setup, while the /verify-guide skill runs a full verification pass against a live cluster - covering installation, the 15-point E2E test suite, blind-spot regression checks, and guide content validation.

The skills work with any AI coding tool that supports skill definitions:

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

  • An AI coding tool installed (see list above)
  • oc CLI authenticated as cluster-admin
  • This repository cloned locally

/install-maas

The /install-maas skill wraps ./scripts/setup-maas.sh, letting your AI coding agent handle cluster detection, error diagnosis, and interactive troubleshooting.

Usage

Open the repository in your AI coding tool and invoke the skill:

/install-maas

Arguments

All arguments from setup-maas.sh are supported:

/install-maas --model simulator
/install-maas --from-phase 4
/install-maas --with-observability
/install-maas --skip-models --skip-verify
OptionDescription
--model <name>Model to deploy: simulator (CPU), granite-tiny-gpu, gemma, gpt-oss-20b, qwen3-06b, auto
--from-phase <N>Start from phase N (0-7)
--skip-modelsSkip Phase 5 (model deployment)
--skip-verifySkip Phase 6 (verification)
--with-observabilityAlso run Phase 7 (COO + telemetry)

What the Skill Does

The skill runs ./scripts/setup-maas.sh from the repository root with the provided arguments. Your AI coding agent monitors the output, detects failures, and can help diagnose issues interactively.

The skill has access to oc, envsubst, curl, jq, and other CLI tools needed for MaaS deployment.

Skill Definition

The skill is defined in .claude/skills/install-maas/SKILL.md within this repository. It is automatically discovered when you open the repo in a compatible AI coding tool.

/verify-guide

The /verify-guide skill runs end-to-end verification of the guide content against a live OpenShift cluster. It installs MaaS, executes the 15-point E2E test suite, runs 8 blind-spot regression checks learned from previous walkthroughs, and validates that commands documented in the AsciiDoc pages produce the expected output. At the end it generates a structured report with all results.

Usage

/verify-guide <API_URL> <USERNAME> <PASSWORD>

Example:

/verify-guide https://api.cluster-abc.dyn.redhatworkshops.io:6443 admin my-password

Arguments

OptionDescription
<API_URL>(Required) OpenShift API server URL, including port
<USERNAME>(Required) Cluster admin username (e.g. admin or kubeadmin)
<PASSWORD>(Required) Cluster admin password
--skip-installSkip Phase 1 (setup-maas.sh). Use when MaaS is already installed
--skip-verify-shSkip Phase 2 (verify.sh E2E)
--skip-blindspotSkip Phase 3 (8 blind-spot regression checks)
--skip-guide-contentSkip Phase 4 (AsciiDoc content verification)
--with-observabilityPass --with-observability to setup-maas.sh in Phase 1
--walkthrough-number NLabel this run as walkthrough N (default: auto-increment)

Phases

The skill runs 6 phases in sequence. Individual phases can be skipped with the flags above.

PhaseWhat it checksTime
0Cluster login, preflight detection (platform, OCP version, GPU, nodes)instant
1Full MaaS installation via ./scripts/setup-maas.sh15-30 min
215-point E2E via ./manifests/06-verification/verify.sh3-5 min
38 blind-spot regression checks (gateway OOM, MetalLB IP, RHCL version, etc.)1-2 min
4AsciiDoc guide commands produce documented output1-2 min
5Report generation and findings summaryinstant

What the Skill Does

The skill logs into the cluster, detects its characteristics (platform, GPU, node count), and then runs through each phase collecting PASS/FAIL/WARN results. It never stops on a single failure - all checks run regardless, so you get the full picture in one pass.

Phase 3 blind-spot checks cover regressions that the standard verify.sh does not test: gateway memory limits, MetalLB IP collisions, OAuth/console accessibility, RHOAI dashboard reachability, namespace labels, RHCL operator version, HuggingFace Xet storage behavior, and an independent inference request.

Phase 4 validates that specific commands from the guide pages (model-deployment/maas-models, installation-guide/rhoai-config, model-deployment/verification, installation-guide/prerequisites) return the documented output.

At the end, the skill prints a structured report with all results, operator versions, and any issues found.

Skill Definition

The skill is defined in .claude/skills/verify-guide/SKILL.md within this repository. It is automatically discovered when you open the repo in a compatible AI coding tool.

16 - MaaS:PAL — Verification for your MaaS

MaaS:PAL is a Red Hat AI Community Plugin that tests a Models as a Service setup on a live cluster through its user-facing APIs.

MaaS:PAL (MaaS: Policies, Access, Limits) is a Red Hat AI Community Plugin for the OpenShift AI dashboard that tests a Models as a Service setup on a live cluster. It answers questions like “is my subscription’s rate limit actually enforced?” or “does my subscription reach every model it covers?”. It acts through MaaS’s own user-facing APIs, the way a real user would.

Getting started

Follow the MaaS:PAL README for installation, dashboard registration, and access configuration.

Using MaaS:PAL

In the dashboard, open Community plugins → MaaS:PAL. Pick a scenario from the Scenarios catalog — search, or filter by category — adjust its settings and launch it.

MaaS:PAL Scenarios catalog showing Quick check, Rate limits and other categories

Runs lists every scenario run, with its status and duration. Open a run to see what happened.

MaaS:PAL Runs list showing runs with RUNNING, FAIL, CANCELLED and PASS statuses

The run page shows what happened step by step: live progress, the checks, a plain-language verdict, and what the run created and cleaned up.

A passing run for the smoke test showing all steps green and a “Behaving as expected” verdict

When a run fails, the verdict names the finding directly — for example, a CORS block when sending requests from the browser.

A failing run showing a “Blocked by the browser” CORS finding with step-by-step detail

MaaS overview shows the cluster’s MaaS configuration — subscriptions, models, auth policies, rate limiting, and networking — as a read-only view. Nothing here changes the cluster.

MaaS overview tab showing two subscriptions with their rate limits and auth policy status

Scenarios

CategoryScenarioQuestion it answers
Quick checksmoke_testIs MaaS working end to end?
Quick checkverify_subscriptionDoes my subscription work for every model it covers?
Quick checkrequest_typesWhich request types does my model support?
Rate limitsverify_subscription_rate_limitIs my subscription’s rate limit enforced?
Rate limitskeys_share_user_budgetDo all my keys share one budget?
Rate limitsrate_limit_window_recoveryDoes access come back after the rate-limit window?
Rate limitssubscription_auto_selectionWhich subscription do my keys get?
Rate limitsrate_limit_per_user_or_sharedAre limits per user or shared?
Access controldenied_without_auth_policyIs access denied without an auth policy?
API keysapi_key_lifecycleDo API keys behave correctly?
Usage metricsusage_metrics_accuracyDo MaaS usage metrics match real traffic?
Performanceload_testHow does MaaS hold up under load?
Performancegateway_overheadHow much latency does the MaaS gateway add?
Performancemulti_model_loadDoes MaaS hold up with many models and subscriptions?
Diagnosticsmodel_config_healthAre my models wired up correctly?

You can also import your own scenarios from the Scenarios page. See the MaaS:PAL README for the scenario YAML format.

References