Zero Labs
Industry News / AI

GitOps-Driven Model Serving on Red Hat OpenShift AI with OpenShift GitOps (Argo CD) on IBM Fusion…

Source · Towards AI By Harichandana Kotha

From the publisher’s feed, collected in the ZeroLabs newsroom.

GitOps-Driven Model Serving on Red Hat OpenShift AI with OpenShift GitOps (Argo CD) on IBM Fusion HCIModel serving is where machine learning delivers real value, enabling applications to consume trained models through scalable, production-ready inference endpoints.In this blog, we walk through a structured, GitOps-native approach to serving open-source LLMs on Red Hat OpenShift AI (RHOAI) using KServe and vLLM. Deployments are fully declarative and managed through Red Hat OpenShift GitOps (which provides Argo CD), making model rollouts as simple as committing a YAML change. Running the stack on IBM Fusion HCI further simplifies GPU, storage, and operator readiness for enterprise AI workloads.By the end of this guide, you will have:A GitOps-managed InferenceService deployment using Red Hat OpenShift GitOpsA vLLM runtime serving an open-source LLMExternal access enabled through OpenShift RoutesContinuous reconciliation of model-serving resources through GitOps workflowsInstead of manually creating InferenceServices and configuring serving runtimes, this approach uses Git as the single source of truth. Every model deployment becomes version-controlled, reviewable, and automatically reconciled by Argo CD.Model Serving with Red Hat OpenShift AIRed Hat OpenShift AI (RHOAI) extends the capabilities of Red Hat OpenShift to deliver a consistent, enterprise-ready hybrid AI and MLOps platform. It provides tooling across the full lifecycle of AI/ML workloads, including training, serving, monitoring, and managing models and AI-enabled applications.For details, refer to the official documentation: Red Hat OpenShift AI DocumentationWhy GitOps for Model Serving?Model serving environments often require frequent iteration: model versions change, resource requirements evolve, and new inference endpoints are introduced. Managing these deployments manually quickly becomes error-prone.GitOps solves this by treating model serving configuration as source-controlled infrastructure. With Argo CD continuously reconciling the cluster against Git, deployments become:Versioned and auditableFully automatedSelf-healingConsistent across environmentsThis repository provides a reusable GitOps pattern capable of deploying any supported model through KServe.GitOps Directory StructureThe fusion-model-serving GitOps application follows a clean layered architecture managed through Red Hat OpenShift GitOps (Argo CD).Directory Layoutfusion-model-serving/├── README.md ├── gitops/│ ├── models/│ │ ├── kustomization.yaml # Kustomize base│ │ ├── kserve-model-serving.yaml # InferenceService template│ │ ├── inferenceservice-config.yaml # ODH webhook ConfigMap│ │ ├── rbac.yaml # Argo CD permissions for KServe│ └── model-serving-application.yaml # Model-serving Argo CD Application CR└── scripts/ └── expose-model.sh # OpenShift Route creation helperHow It All Fits TogetherThe application uses a two-layer GitOps pattern:Argo CD Application CR (model-serving-application.yaml) — defines what to deploy, where to deploy it, and how to customize it via Kustomize patches.Kustomize Base (gitops/models/) — contains the actual Kubernetes manifests (InferenceService, RBAC, ConfigMaps) as reusable templates. The Application CR patches the base at sync time, injecting the right model name, resource limits, labels, and namespace without ever touching the base manifests. This means the base is truly reusable across different model deployments.PrerequisitesBefore deploying the GitOps-based model serving stack on IBM Fusion HCI, ensure the following infrastructure and platform components are ready.Cluster and Platform RequirementsIBM Fusion HCI cluster installed, running, and healthyRed Hat OpenShift Container Platform 4.18 or laterAt least one worker node capable of running AI workloadsGPU-enabled if serving large language models (LLMs)GPU Enablement (Required for LLM Serving)If serving GPU-backed models such as vLLM-based LLMs, the following components must be installed:Node Feature Discovery (NFD) for hardware detectionNVIDIA GPU OperatorWorker nodes automatically labeled by the NVIDIA GPU Operator (for example: nvidia.com/gpu.present=true)Verify GPU availability:oc describe node | grep -i gpuIf GPUs are not detected, ensure the NVIDIA drivers and operator are correctly installed.Storage ConfigurationModel serving workloads require persistent storage for:Model cachingRuntime artifactsServing configuration Ensure:A default StorageClass is configuredSufficient persistent storage capacity is available Verify: oc get scIf no default StorageClass is set, configure one using IBM Fusion Data Foundation or another supported storage provider.Required Platform OperatorsThe following operators must be installed and in a Ready state:Red Hat OpenShift GitOps (Argo CD)Enables declarative, Git-driven deployment and reconciliation.Red Hat OpenShift AI (RHOAI)Provides KServe, ODH Model Controller, and AI platform components.Red Hat OpenShift Service Mesh 3Required if using Service Mesh-based KServe networking configuration.Access and Permissionsoc CLI configured and authenticated to your OpenShift clusterCluster-admin or sufficient RBAC to create namespaces, roles, and Argo CD ApplicationsAccess to the Argo CD UI and oc apply permissions in the openshift-gitops namespaceArgo CD Access and PermissionsAfter verifying that all prerequisites are satisfied, ensure you can access the Argo CD instance deployed by the OpenShift GitOps operator.Authenticate to the cluster:oc login --token= --server=To allow the GitOps application to create required resources (namespaces, roles, rolebindings, and KServe custom resources), temporarily grant cluster-admin permissions (lab environments only) to the Argo CD application controller:oc adm policy add-cluster-role-to-user cluster-admin \ -z openshift-gitops-argocd-application-controller \ -n openshift-gitopsThis ensures the Argo CD controller can successfully reconcile all manifests defined in this guide.NOTE: This approach is suitable for lab or proof-of-concept environments. In production, use a dedicated ServiceAccount with scoped RBAC permissions aligned with organizational security policies.With cluster access and Argo CD permissions configured, you can now prepare your GitOps repository for deployment.Repository SetupFork the storage-fusion repository on GitHub. Forking is required because your fork becomes the Git source monitored by Argo CD.Note: The fusion-model-serving directory is located under the AI/ parent directory within the storage-fusion repository (path: storage-fusion/AI/fusion-model-serving).2. Clone the forked copy of this repository:git clone git@github.com:/storage-fusion.git3. Login to your cluster using oc login or by exporting the KUBECONFIG:oc login --token= --server=Deploying the Model Serving ApplicationModel serving is deployed using an Argo CD Application that continuously syncs Kubernetes manifests from Git.Apply the Argo CD ApplicationBefore applying the Application, update the source.repoURL field in model-serving-application.yaml to point to your forked repository:spec: source: repoURL: https://github.com//storage-fusion.gitEnsure the repository URL matches the fork you cloned and are using as your GitOps source of truth.Apply the application YAML:oc apply -f fusion-model-serving/gitops/model-serving-application.yamlThis creates an Argo CD Application that points to:fusion-model-serving/gitops/modelsThe Application name defaults to llmops-models but can be customized in the Application manifest metadata.This creates an Argo CD Application (llmops-models) in the openshift-gitops namespace, which points to:Git repository path: fusion-model-serving/gitops/modelsTarget namespace: model-serving (default). The target namespace can be customized directly in the Application manifest by modifying spec.destination.namespace.Once applied, Argo CD will automatically:Create the target namespace (model-serving) if namespace auto-creation is enabled in the sync policy.Provision RBAC permissions (Roles, RoleBindings) required for KServe and model pods to run securely.Deploy the InferenceService CR, triggering OpenShift AI + KServe to launch the predictor workload on IBM Fusion HCI.- by default ibm-granite/granite-3.2–8b-instruct.Create internal Kubernetes Services (via KServe), and external access is optional and must be configured separately using OpenShift Routes.Any drift from the declared Git state is automatically corrected by Argo CD.Monitor DeploymentAfter applying the Application, monitor the rollout to ensure all resources are created successfully.Watch the deployment progress:# Check Argo CD application statusoc get application llmops-models -n openshift-gitops# Monitor InferenceServiceoc get inferenceservice -n test-model-serving# Watch pod creationoc get pods -n test-model-serving -wModel Deployment PhasesDuring startup, the model-serving workload typically moves through these states:Pending: Waiting for scheduling onto a GPU-enabled Fusion HCI worker nodeContainerCreating: Container image pulling and initializationRunning: vLLM container started, and model download beginsReady: Model fully loaded and serving inference trafficThese states primarily reflect the lifecycle of the predictor pod created by the KServe InferenceService, with final readiness determined by the InferenceService status.Argo CD Application ViewAfter applying the Argo CD Application, the deployment can be verified from the OpenShift console.Navigate to: Red Hat Applications → OpenShift GitOps → Cluster Argo CDNavigate to Argo CD UIWhen prompted, log in using your OpenShift (OCP) credentials via the integrated OAuth authentication.This opens the Argo CD dashboard, where the llmops-models application will appear once synchronization completes.Expected Application StatusOnce the Argo CD application is successfully synced, it will appear in the Argo CD UI as shown below.The application should display:Application Name: llmops-modelsSync Status: SyncedHealth Status: HealthyAll Kubernetes resources managed under GitOpsExposing the Model for External AccessBy default, KServe creates internal ClusterIP services for InferenceServices. These services are not externally accessible in OpenShift unless explicitly exposed using a Route or Ingress.By default, KServe InferenceServices are only accessible within the cluster. To make them available to external applications (dashboards, APIs, or client tools), use the included expose-model.sh script to create an OpenShift Edge-terminated Route.The expose-model.sh utility automatically generates OpenShift Routes with TLS encryption, making your models available outside the cluster.It supports two usage modes:1. Expose All Models in a NamespaceTo expose every deployed InferenceService in a given namespace:# Expose all models in a namespace./scripts/expose-model.sh # Example./scripts/expose-model.sh test-model-servingThis will:Discover all InferenceServices in the namespaceCreate TLS-secured OpenShift Routes for each modelDisplay the external access URLs and test commands2. Expose a Specific ModelTo expose only a single model (example: Granite):# Expose a specific model (InferenceService) in a namespace./scripts/expose-model.sh # Example./scripts/expose-model.sh granite-3-2-8b-instruct test-model-servingThis is useful when multiple models are deployed, but only one should be made externally accessible.What the Script DoesWhen executed, the expose-model.sh script automates the entire external exposure process by:Validating resources — Confirms that the InferenceService and its backing Kubernetes Service are presentCreating an OpenShift Route — Sets up an edge-terminated TLS Route for secure accessEnabling HTTPS connectivity — Ensures TLS termination at the OpenShift ingress routerPrinting the model endpoint URL — Outputs the external HTTPS URL for immediate useGenerating test commands — Provides ready-to-run curl examples to verify the deploymentExample Output╔════════════════════════════════════════════════════════════╗║ Expose Models - External Access ║╚════════════════════════════════════════════════════════════╝Configuration━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Namespace: test-model-serving Mode: Expose ALL InferenceServices━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━Found InferenceServices: - granite-3-2-8b-instructProcessing: granite-3-2-8b-instructroute/granite-3-2-8b-instruct-external created✓ Exposed at: https://granite-3-2-8b-instruct-external-test-model-serving.apps.f07d005.fusion.tadn.ibm.com━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━Successfully exposed 1 InferenceService(s)!━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━Test your models: granite-3-2-8b-instruct: curl -k https://granite-3-2-8b-instruct-external-test-model-serving.apps.f07d005.fusion.tadn.ibm.com/v1/models -H 'Authorization: Bearer EMPTY'Testing External AccessOnce exposed, test your model with OpenAI-compatible API calls:# List available modelscurl -k https://granite-3-2-8b-instruct-external-test-model-serving.apps.f07d005.fusion.tadn.ibm.com/v1/models \ -H "Authorization: Bearer EMPTY"# Test chat completionscurl -k -X POST https://granite-3-2-8b-instruct-external-test-model-serving.apps.f07d005.fusion.tadn.ibm.com/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer EMPTY" \ -d '{ "model": "ibm-granite/granite-3.2-8b-instruct", "messages": [ {"role": "user", "content": "Explain about Red Hat OpenShift AI operator"} ], "max_tokens": 200 }'Customizing the Model Serving ApplicationThe deployment is designed with stable base manifests, while customization is handled through the OpenShift GitOps Application resource.Instead of editing multiple YAML files, model name, resources, and metadata are adjusted using spec.source.kustomize.patches. This keeps the setup reusable and allows you to serve different models by changing only a few values.All customization happens in the Argo CD Application manifest, while the base templates remain reusable and unchanged.Customization is grouped into two key areas.1. Application Identity and LabelsThe first customization controls the labels applied across all resources deployed by this application.Within the Application YAML, the following patch overrides the commonLabels defined in the base Kustomization:- target: kind: Kustomization patch: |- - op: replace path: /commonLabels/app.kubernetes.io~1name value: llmops-models - op: replace path: /commonLabels/validated-patterns.io~1pattern value: llmops-platformTo customize this for a different application, users only need to change the values:Change llmops-models to the desired application nameChange llmops-platform to match the target platform or environment labelFor example:value: text-generation-servingThis ensures that all resources deployed by Argo CD automatically carry the correct application identity.2. Configuring the Model and InferenceService DeploymentThe model name and all InferenceService settings are configured together in a single patch. The model is set directly as an environment variable on the container — no ConfigMap is involved. This avoids naming conflicts when multiple models are deployed to the same namespace.In the Application YAML, the following patch defines the model identity, resource requirements, and serving configuration:- target: kind: InferenceService patch: |- - op: replace path: /metadata/name value: granite-3-2-8b-instruct - op: replace path: /metadata/labels/model value: granite - op: replace path: /spec/predictor/containers/0/env/0/value value: ibm-granite/granite-3.2-8b-instruct - op: replace path: /spec/predictor/containers/0/resources/limits/nvidia.com~1gpu value: "1" - op: replace path: /spec/predictor/containers/0/resources/limits/memory value: "16Gi" - op: replace path: /spec/predictor/containers/0/resources/requests/nvidia.com~1gpu value: "1" - op: replace path: /spec/predictor/containers/0/resources/requests/memory value: "16Gi"metadata.name defines the Kubernetes InferenceService name, which becomes the serving endpoint identifier.labels.model adds a model-family label (granite) for tracking, filtering, and observability.env[0].value sets the Hugging Face model ID (MODEL) passed directly to the vLLM container — no ConfigMap required. To serve a different model, update this value only. For example, to serve Mistral: value: mistralai/Mistral-7B-Instruct-v0.2limits.nvidia.com/gpu sets the maximum GPU count the serving container can consume during inference.limits.memory caps the memory usage to prevent resource exhaustion or OOM termination.requests.nvidia.com/gpu ensures the pod is scheduled only on nodes with an available GPU by reserving one.requests.memory reserves the required RAM upfront to guarantee stable scheduling and startup.By configuring both requests and limits, this patch ensures predictable GPU-backed model serving and makes the application flexible enough to support anything from lightweight models to GPU-heavy LLM workloads.Ensure that the requested GPU and memory values align with the actual node capacity. If insufficient resources are available, the InferenceService will remain Pending.Key TakeawaysIn this guide, we deployed an open-source LLM on Red Hat OpenShift AI using KServe and vLLM through a structured, GitOps-driven workflow.By leveraging OpenShift GitOps (Argo CD), model serving becomes declarative, version-controlled, and continuously reconciled — allowing updates and scaling through simple Git changes.Running the stack on IBM Fusion HCI simplifies GPU enablement, storage integration, and operator readiness, providing a consistent path from experimentation to scalable AI deployments.Platform operators manage infrastructure, while GitOps governs model lifecycle, creating a clean separation of responsibilities for reliable AI operations.GitOps-Driven Model Serving on Red Hat OpenShift AI with OpenShift GitOps (Argo CD) on IBM Fusion… was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.