Skip to main content

K3D cluster

Feldera Enterprise can also be installed on a local k3d cluster for testing and development purposes. A k3d cluster is a lightweight minimal Kubernetes cluster which makes use of Docker.

Prerequisites

  • k3d: k3d version

    To set up a local Kubernetes cluster for testing.

  • kubectl: kubectl version

    Used to interact with the deployed EKS cluster.

K3D cluster creation

Creation

k3d cluster create local-test1 \
--k3s-arg "--disable=traefik@server:*"

Note: it disables the traefik ingress controller such that you can install your own.

If you wish to expose a specific port of the load balancer (e.g., for your own ingress controller), you can use the following:

k3d cluster create local-test1 \
--k3s-arg "--disable=traefik@server:*" \
--port "80:80@loadbalancer" \
--port "443:443@loadbalancer"

Note: this will locally bind port 80 and 443.

Check

The cluster creation will automatically configure kubectl. Check the cluster status:

kubectl cluster-info
kubectl config current-context
kubectl get nodes
kubectl get namespace

Deletion

k3d cluster delete local-test1
kubectl config unset current-context # Optional

Note: the kubectl current-context is unset because after the k3d-local-test context is no longer available, it automatically switches to one of the others available, which is likely undesirable during testing.