--- categories: - jetstream2 - jupyterhub layout: post date: '2023-01-23' title: Deploy Kubernetes on Jetstream 2 with GPU support --- This tutorial is obsolete, see [the new version of the tutorial](./2024-02-09-kubernetes-gpu-jetstream2.md). The Jetstream 2 cloud includes [90 GPU nodes with 4 NVIDIA A100 each](https://docs.jetstream-cloud.org/overview/config/){target=\_blank}. If we want to leverage the GPUs inside Kubernetes pods, for example JupyterHub users, we both need to have a GPU-enabled ContainerD runtime and a compatible Docker image based off NVIDIA images. ## Deploy Kubernetes with NVIDIA runtime Kubespray has built-in support for NVIDIA runtime, therefore it is just a matter of following the [standard Kubespray deployment tutorial](https://www.zonca.dev/posts/2022-03-31-jetstream2_jupyterhub){target=\_blank}, but using the `branch_v2.18.0_gpu` branch of the `zonca/jetstream_kubespray` Github repository instead of the `branch_v2.18.0` branch. You can also check in detail what are the changes required by looking at [this Pull Request](https://github.com/zonca/jetstream_kubespray/pull/20){target=\_blank} Next we need to install the `k8s-device-plugin`, at the moment it is just necessary to execute: kubectl create -f https://raw.githubusercontent.com/NVIDIA/k8s-device-plugin/v0.13.0/nvidia-device-plugin.yml However, make sure you check the latest [`k8s-device-plugin` documentation](https://github.com/NVIDIA/k8s-device-plugin){target=\_blank}. For testing, you can run a simple GPU job: ``` cat <