Skip to content

docs: add guide for deploying to an existing cluster - #31

Open
NopeCharon wants to merge 1 commit into
hyperlight-dev:mainfrom
NopeCharon:docs/existing-cluster-deployment
Open

NopeCharon wants to merge 1 commit into
hyperlight-dev:mainfrom
NopeCharon:docs/existing-cluster-deployment

Conversation

@NopeCharon

Copy link
Copy Markdown

The documentation only covers deploying through the KIND and AKS setup scripts. Those scripts also label the nodes and enable CDI in containerd, and nothing documents that. To deploy deploy/manifests/device-plugin.yaml to any other cluster, you currently have to work out these steps from the scripts. docs/architecture.md also says the device plugin labels nodes automatically, which is wrong. The plugin never touches node labels, and both DaemonSets select hyperlight.dev/enabled=true, so on an unlabeled cluster nothing is scheduled and nothing reports an error.

This PR adds docs/existing-cluster.md, which covers:

  • Prerequisites: amd64 nodes (the published image is linux/amd64 only), Kubernetes 1.29+ (DevicePluginCDIDevices is needed for the CDI references returned from Allocate) and a container runtime with CDI enabled that reads /var/run/cdi.
  • Node labels: labeling nodes, which label to use when both devices are present, and keeping labels on managed or autoscaled pools.
  • Enabling CDI: CDI on containerd 1.7, using the same settings deploy/local/setup.sh applies (containerd 2.0 enables it by default).
  • Deploying: filling in the manifest placeholders with envsubst the same way the just deploy recipes do, pinning a verified image digest and reserving hyperlight.dev/device-access.
  • Checking and removal: verifying the rollout and node allocatable, troubleshooting the common failures (no matching nodes, unhealthy devices, CDI disabled or /var/run/cdi not read) and uninstalling.

It also corrects the Node Labels section of docs/architecture.md and links the new guide from the README documentation table and the architecture "Next Steps".

Validation:

  • Rendered deploy/manifests/device-plugin.yaml with the documented envsubst command. All four placeholders were replaced, no $ was left, and the output parses as Namespace, ServiceAccount and two DaemonSets.
  • Checked the GHCR index for ghcr.io/hyperlight-dev/hyperlight-device-plugin:latest: it contains only a linux/amd64 image (plus its attestation manifest).
  • Confirmed that every relative link and section anchor in the changed files resolves.
  • Checked the label, CDI path and hypervisor-preference statements against main.go, both manifests, deploy/local/setup.sh, deploy/local/kind-config.yaml and deploy/azure/setup.sh.

Not verified: I didn't run the guide end to end on a live cluster. I tried a KIND cluster, but its node could not boot on my build host because of the host's inotify limits, so the containerd 1.7 CDI steps and the troubleshooting messages come from containerd and Kubernetes behavior and the existing KIND setup script, not from a live run.

The only documented deployment paths are the KIND and AKS setup
scripts, which label nodes and enable CDI in containerd as a side
effect. Anyone deploying deploy/manifests/device-plugin.yaml to another
cluster has to reverse-engineer those steps, and docs/architecture.md
made this harder by claiming the device plugin labels nodes itself. It
does not: both DaemonSets select nodes with hyperlight.dev/enabled=true,
so without the label nothing is scheduled.

Add docs/existing-cluster.md covering:

- prerequisites: amd64 nodes (the published image is linux/amd64 only),
  Kubernetes 1.29+ for CDI device references from device plugins, and a
  CDI-enabled container runtime reading /var/run/cdi
- labeling nodes, including persistent labels for managed node pools
- enabling CDI on containerd 1.7 (containerd 2.0 enables it by default)
- rendering the manifest placeholders with envsubst and pinning a
  verified image digest
- verifying the rollout and node allocatable, troubleshooting the
  common failure modes, and uninstalling

Correct the Node Labels section of docs/architecture.md to say the
labels must be applied by the operator, and link the new guide from the
README and the architecture next steps.

Signed-off-by: NopeCharon <115794254+NopeCharon@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant