mvk/src/content/docs/guides/1. k3d/003-local-k3d.md
jon brookes 2804824444 Add comprehensive guides for gcloud setups;
include instructions for cluster creation, smoke testing, and infrastructure management.
2025-10-03 18:09:26 +01:00

1.7 KiB

title description
K3d single instance A guide to creating an initial local k3d instance.
Use case :badge[development]

clone the infctl-cli repo in order to have local access to its scripts, files and manifests to use later on.

Where you put this is up to you but we will work on the assumption that this will be in $HOME/projects :

mkdir -p $HOME/projects/
cd $HOME/projects
git clone https://codeberg.org/headshed/infctl-cli.git
cd infctl-cli

take a look at the script scripts/create_k3d_cluster.sh to familiarise yourself with what it does and when ready to run it

./scripts/create_k3d_cluster.sh

k3d can also list this and any other clusters you have running locally with

k3d cluster list
NAME        SERVERS   AGENTS   LOADBALANCER
mycluster   1/1       0/0      true

if all goes well, you should have a k3d ( k3s ) cluster running locally that you can see its single node running with

kubectl get nodes
NAME                     STATUS   ROLES                  AGE   VERSION
k3d-mycluster-server-0   Ready    control-plane,master   93m   v1.31.5+k3s1

A healthy state and most of the resources may be viewed in several ways but 2 for starters can be:

kubectl get events -A
kubectl get all -A

The first will list any events logged by the cluster.

The second will list 'all' resources which can be a bit misleading as not all the things are actually listed, just the main ones we are interested in.

When your done with this secion and are ready to, delete the cluster ( you can create a new one any time with the above command )

k3d cluster delete mycluster