Skip to content

vLLM Deploy an LLM

This tutorial teaches you how to deploy an instance of vLLM serving Gemma 4 on a single Nvidia H100 GPU. To assist with deploying and serving LLMs we have created a Helm chart, available through the Rancher GUI, which makes serving an LLM quick and easy.

Before starting, you need to have these two things:

  1. An ICE Connect project with atleast one Nvidia H100 GPU in your quota.
  2. A HuggingFace account and an associated HuggingFace API key.

Set up Namespace

Namespaces are a Kubernetes resource-type that works to isolate resources. Names of deployments, pods and most resources need to be unique within a namespace but not inside the entire cluster. You can have several namespaces in your project, and each namespace has a resource quota you set as a user to divide your project quota. To set up a namespace follow these steps:

  1. Log in to ICE Connect, select your project and then go to the Experimental Kubernetes Cluster (EKC) and go to the Rancher GUI.
  2. Select the ice cluster.
  3. From here, you can create a Namespace under the Cluster ➡ Projects/Namespaces tab.
  4. Name your namespace. The namespace's name has to start with your ICE Connect project name as a prefix. E.g. if your project is named "test-llm", your namespace can be named "test-llm-namespace" or "test-llm-gemma" but it can't be named "namespace" or "gemma".
  5. Configure your namespace resource quota. For the purpose of this tutorial, 16 GiB memory (both limit and reservation), 16 CPUs and 60 GiB storage is enough to deploy the model, however you probably want to put a bit more resources into the namespace if you want to deploy anything else in it. The resource quota can be changed after creation so it's possible to increase it if you need more.

Model weights (HuggingFace)

The model we are deploying in this tutorial is Googles Gemma-4-26B-A4B-it. To download it you need to provide a HuggingFace API token, which requires a user account on the website.

Install Rancher app

Apps are installed using a Rancher chart. We host some charts in our gitlab, which are available to install directly through the Rancher GUI.

  1. In the Rancher GUI, go to Apps ➡ Charts to see what apps are available to install. The app we're installing in this tutorial is called "vllm". Click the chart then install. Select your namespace and name the app-installation.
    Screenshot of the app Charts page.
    Screenshot of the app Charts page.
  2. In the options, select the "custom" model preset.
  3. Go to Model Download, select huggingface and paste the Model ID (in our case google/gemma-4-26B-A4B-it), and HuggingFace token into the corresponding textboxes.
  4. In the hardware tab, make sure nvidia-h100 is the selected GPU type, and the Number of GPUs is set to 1. Set the CPU to 8, and storage size to 60Gi as the model is about 52GB.
  5. On the ingress option you can choose to enable an Ingress or not, in our case we will enable it. The hostname is the domain you set to reach the model, and it has to end with .ice.dtse.se.
  6. Finally in the Advanced tab we will need to configure the vLLM launch command. The command we will put into the textbox is:
vllm,serve,/data/model,--served-model-name,gemma-4-26b-a4b,--gpu-memory-utilization,0.90,--host,0.0.0.0,--port,8000

With this you can finally install the app, which will create a pod with two containers. The first container will download the model weights into persistent storage, and the second container will launch vLLM with the serve command to serve the model. Since the model weights are downloaded to persistent-storage the first time it is launched it will take up to 15 minutes until the model is deployed, every redeployment or upgrade of the app will be faster as the download step is skipped.

Testing

To test that the deployment worked, you can navigate onto the domain you picked for the Ingress and append /v1/models at the end. For example like this: http://test-deployment.ice.dtse.se/v1/models and you should see a JSON response like so.

{
  "object": "list",
  "data": [
    {
      "id": "gemma-4-26b-a4b",
      "object": "model",
      "created": 1782221835,
      "owned_by": "vllm",
      "root": "/data/model",
      "parent": null,
      "max_model_len": 262144,
      "permission": [
        {
          "id": "modelperm-a9c62d3c7405832b",
          "object": "model_permission",
          "created": 1782221835,
          "allow_create_engine": false,
          "allow_sampling": true,
          "allow_logprobs": true,
          "allow_search_indices": false,
          "allow_view": true,
          "allow_fine_tuning": false,
          "organization": "*",
          "group": null,
          "is_blocking": false
        }
      ]
    }
  ]
}

You can do the same using curl:

# Replace the URL with the domain you configured for the Ingress
curl http://test-deployment.ice.dtse.se/v1/models

Here is a command to test the text generation:

# Replace the URL with the domain you configured for the Ingress
curl http://test-deployment.ice.dtse.se/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemma-4-26b-a4b",
    "messages": [
      {"role": "user", "content": "Hello, can you hear me?"}
    ],
    "max_tokens": 100
  }'

Access control

The model in this tutorial is deployed with an ingress making it completely open to anyone with the URL to use. You can configure a singular API key in the vLLM serve command, however that isn't very scalable. There are open-source solutions for access control available, either something like LiteLLM or a custom made solution. Another way to handle access is to use a Traefik IP Allowlist to only allow specified IP addresses to reach the ingress.