Chapter 2. Gateway discovery for Distributed Inference with llm-d


Discover and select existing Kubernetes Gateway resources when deploying LLMInferenceService models. This Technology Preview feature builds on distributed inference capabilities by providing visibility into available Gateways.

Important

Gateway discovery for Distributed Inference with llm-d is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.

For more information about the support scope of Red Hat Technology Preview features, see Technology Preview Features Support Scope.

When deploying LLMInferenceService models, you can discover and select an existing Kubernetes Gateway resource directly from the model serving UI. This eliminates the need to manually configure a Gateway reference and provides visibility into which Gateway you have permission to use.

Gateway discovery is disabled by default and must be enabled by a cluster administrator through the dashboard configuration resource.

Which Gateways appear in the dropdown?

A Gateway is available only when both of the following conditions are met:

  • RBAC permissions: You must have permissions to create LLMInferenceService resources in the target namespace.
  • Listener configuration: The Gateway must include a listener configured to accept routes from the target namespace.

To deploy models with specific Gateway configurations or to reference multiple Gateways, use the YAML-based deployment approach. For more information, see Select Gateway using YAML.

Note

The system does not validate against a specific GatewayClass resource or its controller. The default OpenShift Gateway controller provides all Distributed Inference with llm-d features. Third-party Gateway controllers might be incompatible with Distributed Inference with llm-d.

2.2. Enable Gateway discovery in the dashboard

Enable Gateway discovery in the OpenShift AI dashboard so that you can discover and select Kubernetes Gateway resources during model deployment.

Prerequisites

  • You have cluster administrator access to OpenShift.
  • You have enabled distributed inference with the Gateway API installed. For more information, see Enabling distributed inference.

Procedure

  1. Enable Gateway discovery in the dashboard configuration:

    $ oc patch odhdashboardconfig odh-dashboard-config \
    -n redhat-ods-applications \
    --type merge \
    -p '{"spec":{"dashboardConfig":{"llmGatewayField":true}}}'

Verification

  1. Log in to the OpenShift AI dashboard.
  2. In the navigation menu, click AI Hub.
  3. Click a project name, then click Deploy model.
  4. Verify that the Gateway field is displayed in Advanced Settings.

You can discover and select an existing Kubernetes Gateway resource during an LLMInferenceService deployment through the OpenShift AI model deployment wizard. The Gateway can be the shared openshift-ai-inference Gateway configured during distributed inference setup or a namespace-scoped Gateway.

Note

If you edit a deployment with multiple Gateways through the model deployment wizard UI, the Gateway Selection field displays only the first Gateway. Gateway selection does not support MaaS Gateways.

Prerequisites

  • You have enabled distributed inference as described in Enabling distributed inference.
  • Gateway discovery is enabled in the dashboard. For more information, see Enabling Gateway discovery in the dashboard.
  • You have permission to create LLMInferenceService resources in your namespace.
  • At least one Gateway exists with a listener configured to accept routes from your namespace.
  • You have a model stored in S3-compatible storage, a persistent volume claim (PVC), or an OCI container registry or accessible through a URI.

Procedure

  1. Log in to the OpenShift AI dashboard.
  2. In the navigation menu, click AI Hub.
  3. Click the name of the project that you want to deploy a model in.
  4. Click Deploy model.
  5. Configure the model deployment properties as required for your model. For more information, see Deploying models on the single-model serving platform.
  6. In Advanced Settings, locate the Gateway Selection section.
  7. In the Gateway section, locate the Select a gateway dropdown.
  8. Select the Gateway from the dropdown list.
  9. Click Next.
  10. Click Deploy Model.

Verification

  1. On the Models page, verify that the LLMInferenceService is listed with a checkmark in the Status column.
  2. Click the deployed model name to view details.
  3. Verify that the Gateway reference is configured in the deployed model resource:

    $ oc get llminferenceservices <llmisvc_name> -n <namespace> -o yaml

    where:

    <llmisvc_name>
    Specifies the name of your LLMInferenceService.
    <namespace>

    Specifies the project namespace where you deployed the model.

    The output includes the Gateway reference configuration. The Gateway reference appears under spec.router.gateway.

Troubleshooting

The Gateway dropdown is empty or does not show any available Gateways
  • Check RBAC permissions: You might not have permission to create LLMInferenceService resources in your namespace. Contact your cluster administrator to verify your RBAC permissions.
  • Check listener configuration: You might not have Gateways that are configured to accept routes from your namespace. Verify that at least one Gateway has a listener configured with allowedRoutes.namespaces that includes your namespace.

2.4. Select Gateway using YAML

Select Kubernetes Gateway resources for an LLMInferenceService deployment by creating the resource using YAML. This approach enables you to reference multiple Gateways or specify detailed Gateway configurations that are not available through the model deployment wizard.

Note

If you edit a deployment with multiple Gateways through the model deployment wizard UI, the Gateway Selection field displays only the first Gateway. Gateway selection does not support MaaS Gateways.

Prerequisites

  • You have enabled distributed inference as described in Enabling distributed inference.
  • You have permission to create LLMInferenceService resources in your namespace.
  • At least one Gateway exists with a listener configured to accept routes from your namespace.
  • You have a model stored in S3-compatible storage, a persistent volume claim (PVC), an OCI container registry, or accessible through a URI.

Procedure

  1. Create a YAML file for your LLMInferenceService with Gateway references:

    apiVersion: serving.kserve.io/v1alpha1
    kind: LLMInferenceService
    metadata:
      name: <llmisvc_name>
      namespace: <namespace>
    spec:
      modelSource:
        storageUri: <storage_uri>
      runtime:
        name: <runtime_name>
      router:
        gateway:
          refs:
            - name: <gateway_name>
              namespace: <gateway_namespace>

    where:

    <llmisvc_name>
    Specifies the name for your LLMInferenceService.
    <namespace>
    Specifies your project namespace.
    <storage_uri>
    Specifies the location of your model, such as s3://my-bucket/my-model/ or pvc://my-pvc/my-model/.
    <runtime_name>
    Specifies the serving runtime to use, such as vllm-runtime.
    <gateway_name>
    Specifies the name of the Gateway to use.
    <gateway_namespace>
    Specifies the namespace where the Gateway is located.
  2. To reference multiple Gateways, add additional entries to the refs list:

      router:
        gateway:
          refs:
            - name: <gateway_name_1>
              namespace: <gateway_namespace_1>
            - name: <gateway_name_2>
              namespace: <gateway_namespace_2>
  3. Apply the YAML file:

    $ oc apply -f <filename>.yaml

Verification

  1. Verify that the LLMInferenceService was created:

    $ oc get llminferenceservices <llmisvc_name> -n <namespace>

    where:

    <llmisvc_name>
    Specifies the name of your LLMInferenceService.
    <namespace>
    Specifies your project namespace.
  2. Verify the Gateway references in the deployed resource:

    $ oc get llminferenceservices <llmisvc_name> -n <namespace> -o yaml

    The output includes the Gateway reference configuration under spec.router.gateway.refs.

  3. Verify that the LLMInferenceService is ready:

    $ oc get llminferenceservices <llmisvc_name> -n <namespace> -o jsonpath='{.status.conditions[?(@.type=="Ready")].status}'

    The output should be True when the service is ready.

Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat Documentation

Legal Notice

Theme

© 2026 Red Hat
Back to top