Skip to main content

Why use GPU on Kubernetes?

Kubernetes now supports GPU, making it easy to configure and use GPU resources to accelerate workloads such as data science, machine learning, and especially deep learning. Kubernetes exposes GPU as a resource type — device plugins let Pods access specialized hardware like GPUs and present them as schedulable resources. GPU workloads inherit all of Kubernetes' advantages:

  • Containerization: containers are lightweight — they don't need a full OS and instead share the host OS kernel, making them smaller, faster, and more portable than traditional VMs.
  • Microservices: Kubernetes orchestrates and automates workload operations, which suits microservices architectures well. Most ML projects are written in Python or R, though applications may use other languages — the container-based model lets developers run experiments independently across languages.
  • Autoscaling: Kubernetes applications get three autoscaling mechanisms — Horizontal Pod Autoscaler (HPA) adjusts the number of Pods based on resource usage, Vertical Pod Autoscaler (VPA) adjusts CPU and memory for existing Pods, and Cluster Autoscaler adds Worker Nodes when Pods lack the resources to start.
  • Automated deployment: combined with CI/CD, Kubernetes makes deploying application models to different environments straightforward.

As AI applications and services grow, so does demand for GPU on Kubernetes. NVIDIA builds libraries and software to optimize GPU usage in containerized environments — Kubernetes with NVIDIA GPUs lets clusters scale seamlessly, with automated deployment, maintenance, scheduling, and operation of GPU containers across Worker Nodes.