Phase 2: Platform Configuration
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).
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).
Prerequisites
- OpenShift 4.19+ cluster with
ocCLI 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-systemnamespace - 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: truesetting 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.
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.
Wait for Kuadrant to become ready:
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:
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:
Step 2b: Patch the Authorino CR to enable the TLS listener:
Step 2c: Configure Authorino deployment with TLS certificate env vars:
Wait for the Authorino deployment to become available:
Step 3: User Workload Monitoring (Optional)
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.
Wait for the user-workload monitoring stack to start:
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.
Verify the Prometheus pods are running:
You should see prometheus-user-workload-0 and thanos-ruler-user-workload-0 pods in Running state.
Expected output:
Step 4: GatewayClass
Apply the GatewayClass that initializes OpenShift’s built-in Gateway API controller:
Wait for the GatewayClass to be accepted:
Verify:
Expected output:
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:
| Platform output | What to do |
|---|---|
AWS, Azure, GCP (cloud) | Skip to Step 5b — create the Gateway directly. |
None, BareMetal, OpenStack | Continue 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:
If you see “NotFound” or “Error”:
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):
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.
Step 5c: Annotate the Gateway for Authorino TLS bootstrap:
Wait for the Gateway to be programmed:
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:
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.
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.
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:
Label the namespace where the MaaS API route is created:
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:
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.
If your platform type from Step 5a was AWS, Azure, GCP, or another cloud provider, you can skip this step.
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.
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.
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:
Use that IP as the target for the DNS record.
Verify the Route was created:
Expected output:
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.
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:
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:
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):
The gateway pod will restart automatically. Wait for it to come back:
Step 5f.3: Verify the proxy env vars are set on the gateway pod:
You should see HTTP_PROXY, HTTPS_PROXY, and NO_PROXY with the correct values.
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:
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}.
Expected output:
Appendix
Directory Structure
References
- MaaS Platform Setup (upstream)
- MaaS Gateway Setup (upstream)
- Red Hat Connectivity Link documentation
- OpenShift User Workload Monitoring
- Gateway API on OpenShift
- Gateway Hardening KCS - Verify and secure Gateway for Model Serving
Next step
Proceed to Phase 3: MaaS Platform.