Skip to main content
vLLM is an open-source inference and serving engine for large language models that provides an OpenAI-compatible API. SkyPilot simplifies running vLLM inference on Kubernetes: you specify the container image, GPU requirements and commands in a configuration file, and SkyPilot launches the task on the selected cluster. In this tutorial, you will use Managed Service for SkyPilot to launch a vLLM server on a Managed Service for Kubernetes cluster, serve the Qwen2.5-7B-Instruct model on a single GPU and send an inference request to the server.

Costs

Nebius AI Cloud only charges you for running Managed Kubernetes nodes. For more details, see Pricing in Managed Service for Kubernetes. Managed Service for SkyPilot is free of charge.

Prerequisites

  1. Make sure you are in a group that has at least the editor role within your tenant; for example, the default editors group. You can check this in the Administration → IAM section of the web console.
  2. Install the SkyPilot CLI.

Steps

Prepare the infrastructure

Create the Managed SkyPilot server and the Managed Kubernetes cluster in the same Nebius AI Cloud project.
  1. In the web console, go to  AI orchestration → SkyPilot. If you don’t have a Managed SkyPilot server in your project, a landing page opens.
  2. Click Create server. The creation page opens.
  3. Enter a name for the server or keep the default one.
  4. Click Create server.
  5. Connect the SkyPilot CLI to your Managed SkyPilot server:
    1. In your terminal, run:
      The browser opens automatically.
    2. Select your Managed SkyPilot server, and click Connect.
    3. Follow the instructions to authenticate to Nebius AI Cloud and sign in to SkyPilot CLI.
    4. In your terminal, verify that the CLI displays the following:
  6. Create a Managed Kubernetes cluster named vllm-k8s-cluster, and add a GPU node group. The Managed Kubernetes cluster will provide the GPU for running the vLLM server.

Verify that SkyPilot can access your Managed Kubernetes cluster

  1. In the web console, go to  AI orchestration → SkyPilot.
  2. On the Managed SkyPilot server page, click How to connect.
  3. In the window that opens, click the public endpoint URL. The SkyPilot dashboard opens in the browser.
  4. In the SkyPilot dashboard, go to the Infra tab, and click Refresh. The dashboard lists the Managed Kubernetes clusters available to SkyPilot, including vllm-k8s-cluster.
  5. In your terminal, verify that SkyPilot can access your Managed Kubernetes cluster:
    The context for vllm-k8s-cluster is listed as enabled. For example:

Prepare the vLLM task configuration and launch the vLLM server

  1. Create and enter a directory for the task configuration file:
  2. In this directory, create a vllm.yaml task configuration file. Replace <gpu_platform> with the GPU platform of your node group, such as H200:
    This file defines a Kubernetes workload that requests one GPU of the specified platform and starts vLLM. The container image provides vLLM version v0.11.0 and its runtime dependencies. When the task starts, vLLM downloads the Qwen/Qwen2.5-7B-Instruct model from Hugging Face Hub and serves it through an OpenAI-compatible API.
    To customize the model server, you can add parameters to the vllm serve command in the task configuration file. For example, you can configure request logging or supply a custom chat template. For available options, see the vllm serve reference documentation.
  3. Launch the task that starts the vLLM server:
    When prompted, confirm the launch. This command creates a vllm-inference SkyPilot environment in the Managed Kubernetes cluster named vllm-k8s-cluster and runs the task defined in vllm.yaml.
  4. Wait until the logs confirm that the SkyPilot environment was launched and the vLLM server started successfully:
    You may now exit log streaming. The vLLM server continues to run.

Send an inference request

  • To ask a question, send the following request to the vLLM server:
    The generated answer is in choices[0].message.content:
  • To constrain the response to a predefined set of values, ask the model to select from the provided possible answers:
    The generated answer is in choices[0].message.content:
In these examples, max_tokens defines the maximum number of tokens generated in the answer. temperature controls randomness; lower values such as 0.2 reduce variation between responses. For more information on the parameters, see vLLM documentation.

How to delete the created resources

Some of the created resources are chargeable. If you don’t need the resources created for this tutorial, delete them:
  • Delete the SkyPilot environment:
  • Delete the Managed SkyPilot server:
    1. In the web console, go to  AI orchestration → SkyPilot.
    2. On the Managed SkyPilot server page, go to the Settings tab.
    3. In the Danger zone section, click Delete server.
    4. In the window that opens, confirm the deletion.
  • Delete the Managed Kubernetes cluster.

See also