Local Development with KIND

This guide walks through creating a local Kubernetes cluster with KIND, deploying the operator, and running the hello-world sample. The entire setup takes three make commands.

Prerequisites

Install the following tools before starting:

Step 1: Create the Cluster

make kind-create

This creates a KIND cluster named logic-operator-dev using hack/kind-config.yaml, then installs:

  • ingress-nginx v1.12.2 (with ports 80 and 443 mapped to localhost)

  • cert-manager v1.16.3 (required for webhook TLS)

The command is idempotent — if the cluster already exists it prints a message and exits cleanly.

lvh.me is a wildcard DNS name that resolves to 127.0.0.1. All sample ingress hosts (e.g. hello.lvh.me, grafana.lvh.me) work automatically without editing /etc/hosts.

Step 2: Deploy the Operator

make kind-deploy

This target:

  1. Builds the operator image tagged controller:dev

  2. Loads the image into the KIND cluster

  3. Applies config/default via kustomize with server-side apply

  4. Waits for all deployments in logic-operator-system to become available

The operator runs in the logic-operator-system namespace. Verify it is ready:

kubectl get pods -n logic-operator-system

Step 3: Apply Sample Resources

make kind-demo

This applies config/samples/ which creates:

  • LogicFlowRuntime/hello-runtime — a stateless runner (defaults to 1.0.0-minimal image)

  • LogicFlowDefinition/hello-world-v1-0-0 — the hello-world workflow

  • LogicFlowService/hello-world — exposes the workflow at hello.lvh.me

Wait for the runtime pod to be ready, then invoke the workflow:

kubectl wait --for=condition=available deployment/hello-runtime --timeout=120s

curl -X POST http://hello.lvh.me/ \
  -H "Content-Type: application/json" \
  -d '{"name": "World"}'

Expected response:

{"message": "Hi, World!"}

Troubleshooting: Webhook Not Ready

If make kind-deploy fails with a webhook connection error, cert-manager may not have issued the certificate yet.

Error from server (InternalError): ... connection refused

Wait a few seconds and retry:

kubectl wait --namespace cert-manager \
  --for=condition=available deployment --all --timeout=120s

kubectl rollout restart deployment -n logic-operator-system
kubectl rollout status deployment -n logic-operator-system --timeout=120s

See Troubleshooting for more common issues.

Inspecting Resources

# Check all Logic Operator CRs
kubectl get logicflowruntimes,logicflowdefinitions,logicflowservices

# Check runtime pod logs
kubectl logs -l app.kubernetes.io/name=hello-runtime -f

# Check operator logs
kubectl logs -n logic-operator-system -l control-plane=controller-manager -f

The runtime also exposes health and OpenAPI endpoints:

curl http://runtime.lvh.me/q/health    # liveness + readiness
curl http://runtime.lvh.me/q/openapi   # OpenAPI spec

Or via port-forward if ingress is not available:

kubectl port-forward svc/hello-runtime 8080:80
curl http://localhost:8080/q/health

Tear Down

Remove sample CRs without deleting the cluster:

make kind-undemo

Delete the entire cluster:

make kind-delete