1.7. Creating a ServingRuntime CR for use in MicroShift


Create a ServingRuntime custom resource (CR) based on installed manifests and release information. The included steps are an example of reusing the included microshift-ai-model-serving manifest files to re-create the OpenVINO Model Server (OVMS) model-serving runtime in the workload namespace.

注記

This approach does not require a live node, so it can be part of CI/CD automation.

Prerequisites

  • Both the microshift-ai-model-serving and microshift-ai-model-serving-release-info RPMs are installed.
  • You have root user access to your machine.
  • The OpenShift CLI (oc) is installed.

Procedure

  1. Extract the image reference of the ServingRuntime CR you want to use from the MicroShift release information file by running the following command:

    $ OVMS_IMAGE="$(jq -r '.images | with_entries(select(.key == "ovms-image")) | .[]' /usr/share/microshift/release/release-ai-model-serving-"$(uname -i)".json)" 
    1
    1
    In this example, the image reference for the OVMS model-serving runtime is extracted.
  2. Copy the original ServingRuntime YAML file by running the following command:

    $ cp /usr/lib/microshift/manifests.d/050-microshift-ai-model-serving-runtimes/ovms-kserve.yaml ./ovms-kserve.yaml
  3. Add the actual image reference to the image: parameter field value of the ServingRuntime YAML by running the following command:

    $ sed -i "s,image: ovms-image,image: ${OVMS_IMAGE}," ./ovms-kserve.yaml
  4. Create the ServingRuntime object in a custom namespace using the YAML file by running the following command:

    $ oc create -n <ai_demo> -f ./ovms-kserve.yaml 
    1
    1
    Replace <ai_demo> with the name of your namespace.
重要

If the ServingRuntime CR is part of a new manifest, set the namespace in the kustomization.yaml file, for example:

Example Kustomize manifest namespace value

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: ai-demo
resources:
  - ovms-kserve.yaml
#...

Next steps

  • Create the InferenceService object.
  • Verify that your model is ready for inferencing.
  • Query the model.
  • Optional: examine the model metrics.
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

Red Hat ドキュメントについて

Legal Notice

Theme

© 2026 Red Hat
トップに戻る