Kubernetes on two DGX Sparks, part 2: set up, check and stop
Now let's install it, check the GPUs, and learn how to remove it. Warning: this installs a system service that changes network rules. Pick a quiet time.
Chapters
- 0:00Introduction
- 0:06First Spark: Install the server
- 0:20Second Spark: Join the agent
- 0:31GPUs: Add the plugin
- 0:41Check: Prove both work
- 0:51The model: Keep it inside
- 1:03Stop and remove: Uninstalling loses data
- 1:19Wrap up
Read the transcript
Introduction
Now let's install it, check the GPUs, and learn how to remove it.
First Spark: Install the server
Warning: this installs a system service that changes network rules. Pick a quiet time. Download the installer, and read it first. Then install the server, using the cluster link's address and interface.
curl -sfL https://get.k3s.io -o k3s-install.sh
less k3s-install.sh
sudo sh k3s-install.sh server \
--node-ip FIRST-SPARK-LINK-ADDRESS \
--flannel-iface LINK-INTERFACESecond Spark: Join the agent
Download and read the installer there too. Join with the server's address and token. Treat that token as a password. Keep the cluster ports closed to other networks.
GPUs: Add the plugin
Check on both that K3s found the NVIDIA runtime. Then install NVIDIA's device plugin, so Kubernetes can give out each GPU.
Check: Prove both work
Both nodes should be ready, on their cluster addresses. Each should offer one GPU. Run the test pod on each, and read its log.
The model: Keep it inside
Add the model service, one copy on each Spark. Keep the service inside the cluster. Other service types can open ports. Wait until both pods are ready, and check where each one runs.
Stop and remove: Uninstalling loses data
To stop just the model, scale it to zero. Stopping K3s leaves containers running. Its kill all script stops them. Warning: uninstalling deletes cluster data. Copy what you need first, then remove the agent before the server.
Wrap up
The written page has the commands, fixes and sources.
Sources
- docs.k3s.io/quick-start
- docs.k3s.io/installation/requirements
- docs.k3s.io/advanced
- github.com/NVIDIA/k8s-device-plugin
- kubernetes.io/docs/tasks/manage-gpus/scheduling-gpus
- docs.k3s.io/upgrades/killall
- docs.k3s.io/installation/uninstall