- How-to guides
- Providers
- Local (kind)
Local (kind)
This guide walks through deploying NKP on your laptop with nic (the Nebari Infrastructure Core CLI). Use it to build and test a software pack, or to try NKP without a cloud account.
The local provider uses kind ("Kubernetes in Docker"), which runs a Kubernetes cluster inside Docker containers. nic ships with kind as a dependency so you don't need to install it separately.
What you get
Section titled “What you get”When nic deploy finishes, you have all standard NKP services on a single-node kind cluster, with a self-signed certificate, local-only storage (no backups), and a GitOps repository on your disk.
Prerequisites
Section titled “Prerequisites”Docker
Section titled “Docker”Install Docker Desktop (macOS, Windows) or Docker Engine (Linux), and make sure it is running.
Set the CPU and memory Docker can use under Settings → Resources in Docker Desktop:
| Use | CPUs | Memory |
|---|---|---|
| Platform only | 8 | 8 GB |
| Platform with software packs | 8 | 16 GB or more |
Install nic and kubectl
Section titled “Install nic and kubectl”- Follow Install NIC to install
nicv0.14.0. - Install
kubectl, the Kubernetes command-line tool. You'll use it to verify the deploy and to open the platform in your browser.
Configuration
Section titled “Configuration”Download the starter config into the directory you'll deploy from:
curl -O https://raw.githubusercontent.com/nebari-dev/nebari-infrastructure-core/v0.14.0/examples/local-config.yamlThe defaults work as is. To use hostnames other than *.nebari.local, change domain:
domain: packs.local # gives packs.local, keycloak.packs.local, ...Set it before your first deploy. To change it later, run nic deploy -f local-config.yaml --regen-apps.
For extra mounts and other kind options, see the comments in the config file and the local provider reference.
Deploy and verify
Section titled “Deploy and verify”To create the cluster and install the platform, run:
nic deploy -f local-config.yamlnic creates the kind cluster, bootstraps ArgoCD, and installs the foundational services. It takes a few minutes.
At the end, nic prints DNS records like these:
No DNS provider is configured. To access your services, you must manually configure the following DNS records with your DNS provider:
Type : A Name : nebari.local Value : 192.168.1.100
Type : A Name : *.nebari.local Value : 192.168.1.100Skip this step. You'll map the hostnames in the next section.
To point kubectl at the cluster you just created, write its kubeconfig (the file that tells kubectl how to connect) and use it:
nic kubeconfig -f local-config.yaml -o kubeconfig.yamlexport KUBECONFIG=$(pwd)/kubeconfig.yamlThen check that the platform's apps are running:
kubectl get applications -n argocdEvery app should show Healthy within a few minutes. Some may stay OutOfSync, which is normal.
Open the platform
Section titled “Open the platform”On nic v0.14.0 the gateway's address isn't reachable from your machine, so your browser can't open the platform directly. To open it, forward the gateway to your machine and map the hostnames to it.
-
Find the gateway service:
Terminal window kubectl get svc -n envoy-gateway-system \-l gateway.envoyproxy.io/owning-gateway-name=nebari-gatewayYou should see one service, named like this:
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGEenvoy-envoy-gateway-system-nebari-gateway-be66687c LoadBalancer 10.96.249.26 192.168.1.100 80:31541/TCP,443:30152/TCP 10m -
Copy the value in the
NAMEcolumn from step 1, then forward port 443 to it. Leave this running in its own terminal:Terminal window sudo kubectl --kubeconfig kubeconfig.yaml port-forward -n envoy-gateway-system svc/<NAME> 443:443 -
To open the platform's hostnames on your machine, add them to
/etc/hosts:Terminal window echo "127.0.0.1 nebari.local keycloak.nebari.local argocd.nebari.local" | sudo tee -a /etc/hosts -
Open
https://nebari.local. Skip past the browser's privacy warning (the cluster uses a self-signed certificate) by choosing Advanced, then continuing.
First sign-in
Section titled “First sign-in”See Keycloak authentication to get the admin credentials and create your first user.
To open Argo CD at https://argocd.nebari.local, sign in as admin, not through Keycloak (which doesn't work locally yet). Get the password with:
nic outputs -f local-config.yaml --show-secretsAdd your software pack
Section titled “Add your software pack”With the platform running, install the pack you're building. See Deploy a pack.
If your pack has its own hostname (for example hub.nebari.local), add it to /etc/hosts the same way:
echo "127.0.0.1 hub.nebari.local" | sudo tee -a /etc/hostsDestroy
Section titled “Destroy”To delete the cluster, follow Destroy a cluster. On a local cluster, two things stay behind:
- The GitOps repository at
~/.nic/gitops/<project_name>. The nextnic deployreuses it, so delete it for a clean start. - The
/etc/hostsline. Remove it if you no longer need it.