Kubernetes on two DGX Sparks, part 1: decide and configure
Before you install Kubernetes on two DGX Sparks, here's what to decide.
Chapters
- 0:00Introduction
- 0:06Where this fits: The AI stack
- 0:14The big idea: Whole pods only
- 0:24Install choices: One server, one agent
- 0:38Open ports: Check the extras
- 0:49CPU and memory: Requests and limits
- 1:03Placement: Spreading rules
- 1:18Wrap up
Read the transcript
Introduction
Before you install Kubernetes on two DGX Sparks, here's what to decide.
Where this fits: The AI stack
We start with the two machines at the bottom of the stack. Kubernetes manages containers across them.
The big idea: Whole pods only
The scheduler picks one Spark for each whole pod. It doesn't split one process across both. It can't lend one pod processors from each.
Install choices: One server, one agent
We use K3s. The first Spark is the server, which can run work too. The second is an agent. With one server, losing it means losing control of the cluster. Our advice: put the same K3s version on both.
Open ports: Check the extras
K3s also installs a web router and a load balancer, which can open ports on your Sparks. If you don't need them, turn them off when you start the server.
CPU and memory: Requests and limits
A request is what the scheduler counts, and what's kept for the container. A processor limit is a ceiling. Reaching it slows the container down. A memory limit can get a process killed when memory runs short.
Placement: Spreading rules
Each model pod asks for one GPU, so two can't share one Spark here. Other pods may land together. Add a spread rule if they mustn't. For model updates, we stop the old pods first, because there's no spare GPU.
Wrap up
The page lists the settings and defaults. We haven't run this on hardware.
Sources
- kubernetes.io/docs/concepts/scheduling-eviction/kube-scheduler
- kubernetes.io/docs/concepts/configuration/manage-resources-containers
- kubernetes.io/docs/concepts/workloads/pods
- kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints
- docs.k3s.io/quick-start
- docs.k3s.io/networking/networking-services
- docs.k3s.io/reference/env-variables