Quickstart: Local k3d Installation
Install a self-hosted NVCF stack on one local k3d cluster, register that cluster with the control plane, and confirm that the local deployment is healthy.
This quickstart uses a single k3d cluster named ncp-local, fake GPUs, and
local route hostnames. It is for local development and validation only. For a
remote deployment, or for separate control-plane and GPU clusters, use
Helmfile Installation and
Self-Managed Clusters.
This source-development quickstart does not select an umbrella release. For an umbrella release, use Consume an NVCF release and its packaged stack paths.
Run the commands from the NVCF repository root unless a step says otherwise.
The nvcf-cli self-hosted up command runs on your workstation. It does not run
inside Kubernetes.
Clone the public repository before you start:
Prerequisites
Before you start, install and prepare:
- Docker running on your workstation
k3dv5.x or laterkubectlhelm>= 3.14helmfile>= 1.0. Usehelmfile>= 1.5.0 with Helm 4.helm-diffpluginnvcf-clion yourPATH. See Installation to build it from the repository or download it from NGC.- An NGC API key with access to the NVCF chart and image registry
- The NGC organization and team slugs for that registry access
Use these install helpers if you do not already have the local tools.
Install Docker
Install Docker from the Docker installation guide. After Docker starts, verify that the CLI can reach it:
Install helm-diff
Install the Helm plugin used by Helmfile:
See the helm-diff installation instructions for offline or Helm 4 installation options.
Build nvcf-cli from this repository
self-hosted up defaults to --env local and supports only the single local
k3d layout. It requires a current k3d-* kube context.
Step 1: Create the local k3d cluster
Export the registry credentials used by the local cluster bootstrap:
Create the single-cluster local topology:
Expected output:
This creates a k3d cluster named ncp-local, installs the fake GPU operator,
the CSI SMB driver, and Envoy Gateway, and makes the local kube context
available to kubectl and nvcf-cli.
Step 2: Prepare local routing
Add these entries to /etc/hosts on the workstation running the CLI if they do
not already resolve:
Use the local CLI configuration that points commands at the local routes:
Log in to the NGC container registry:
The local hostnames route CLI traffic through the local Envoy Gateway. The local CLI configuration keeps later function commands on those local routes instead of the hosted NVCF endpoints.
Step 3: Create the local stack secrets file
Create the local secrets files used by the control-plane and compute-plane stacks:
local-secrets.yaml is gitignored. Keep your NGC key out of committed files.
Step 4: Run the install
The sample function does not require Event Ledger. Disable this optional addon
so the local install does not require its chart. Create
deploy/stacks/self-managed/environments/local.yaml with the following values.
If the file already exists, merge this override into its existing values:
Helmfile loads environments/base.yaml first, then applies the overrides in
environments/local.yaml. You do not need to copy base.yaml.
Check local tools and Kubernetes access:
Run the local install:
Expected result: the final screen reports a successful install, a registered cluster, and a healthy backend.
The command installs the control plane, mints CLI authentication, registers
ncp-local, installs the compute-plane components, and waits for the
NVCFBackend health check to report healthy.
Step 5: Verify the install
Run the full self-hosted health checks:
Inspect the local Kubernetes resources:
Expected result: the CLI checks do not report failed checks, and the
ncp-local NVCFBackend reports healthy.
Step 6: Deploy and invoke a sample function
Create a function from the load_tester_supreme sample image in the registry
organization and team you exported earlier:
Deploy the function to the local fake GPU backend. The default topology
provides two fake H100 GPUs per GPU node, so use NCP.GPU.H100_2x:
Generate an API key for invocation:
Invoke the sample function:
Expected result: the invocation response contains quickstart-echo.
For other local fake GPU configurations, inspect the GPU and instance types advertised by the backend:
This query requires a token with the list_cluster_groups scope. If it returns
403 Forbidden, check the token’s permissions before retrying. Choose a
--gpu and --instance-type from the backend’s advertised configuration.
Clean up
Remove the sample function deployment and function:
Remove the compute-plane components:
Remove the control plane:
Destroy the local k3d cluster:
Troubleshooting
If the quickstart fails, start with Troubleshooting.
Common local k3d issues:
-
sis.localhostmust resolve from the workstation runningnvcf-cli. -
kubectl config current-contextmust printk3d-ncp-local. -
lookup api-keys.nvcf.nvidia.com: no such hostmeans the CLI is using the hosted default endpoint. Run commands with--config "${NVCF_CLI_CONFIG}"from this quickstart. -
node inotify limits below NVCA minimumsmeans the local k3d nodes need higher Linuxfs.inotifylimits. This does not change your macOS shell limits. From the repository root, applytools/ncp-local-cluster/apps/node-tuning/node-tuning.yaml, wait for thenode-tuningDaemonSet in thekube-systemnamespace, then rerunnvcf-cli --config "${NVCF_CLI_CONFIG}" self-hosted check --pre:For non-local clusters, see Node inotify limits.
See Also
- Local Development for local k3d variants and cleanup commands.
- Helmfile Installation for remote or manual control-plane installs.
- Self-Managed Clusters for registering GPU clusters outside the local quickstart.
src/clis/nvcf-cli/examples/in this repository for sample CLI input files.