Quick Start
Time to working
~5 minutes. Automated scripts handle cluster, cert-manager, MySQL, and operator setup.
Prerequisites
| Tool | Version | Install |
|---|---|---|
| Minikube | v1.28.0+ | brew install minikube (macOS) or minikube.sigs.k8s.io |
| kubectl | v1.28.0+ | brew install kubectl or kubernetes.io |
| Docker | Latest | Docker Desktop (macOS) or Docker Engine (Linux) |
System requirements: 1+ core, 1+ GB RAM, 5+ GB disk.
Setup (5 Steps)
Step 1: Prepare Minikube Cluster
Prepare Minikube Cluster
Bootstraps the base cluster with cert-manager and Lynq CRDs.
./scripts/setup-minikube.shThis step creates
- Minikube control plane + kubeconfig
- cert-manager v1.13.2
- Namespaces: lynq-system, lynq-test
- Lynq CRDs
Post-run checks (click to toggle)
Step 2: Deploy Lynq
Deploy Lynq Operator
Builds the controller image and deploys it into lynq-system.
./scripts/deploy-to-minikube.shPrerequisites
- Step 1 complete: Minikube + cert-manager running
- kubectl context points to Minikube
This step creates
- Lynq controller-manager Deployment/Service
- Webhook configuration and TLS Secret (via cert-manager)
- Metrics and leader-election resources
Post-run checks (click to toggle)
Step 3: Deploy MySQL Test Database
Seed MySQL Test Database
Installs a MySQL 8.0 instance with sample node rows inside lynq-test.
./scripts/deploy-mysql.shPrerequisites
- Step 2 complete: Lynq operator is running
- Namespace lynq-test exists (created during Step 1)
This step creates
- mysql Deployment/Service
- nodes database and node_configs table
- Three sample node rows
- Read-only user node_reader and Secret
Post-run checks (click to toggle)
Step 4: Create LynqHub
Create LynqHub
Creates the LynqHub CR that syncs MySQL rows every 30 seconds.
./scripts/deploy-lynqhub.shPrerequisites
- Step 3 complete: MySQL endpoint is Ready
- mysql-credentials Secret exists
This step creates
- LynqHub CR (test-hub)
- Column and extraValue mappings
- Recurring sync loop
Post-run checks (click to toggle)
Step 5: Apply LynqForm
Apply LynqForm
Defines the blueprint (Deployment, Service, etc.) for each active node.
./scripts/deploy-lynqform.shPrerequisites
- Step 4 complete: test-hub reports Ready
- Permissions to create templates in the same namespace as the hub
This step creates
- LynqForm CR (test-template)
- Deployment/Service definitions
- Hub ↔ Template linkage
Post-run checks (click to toggle)
Verify It Works
# 1. LynqNode CRs — one per active row
kubectl get lynqnodes -n lynq-system
# NAME READY DESIRED FAILED AGE
# acme-corp-test-template 2/2 2 0 2m
# beta-inc-test-template 2/2 2 0 2m
# 2. Resources created for each active node
kubectl get deployments,services -n lynq-test -l lynq.sh/node
# 3. Live lifecycle: insert a row → resource appears within 30s
kubectl exec -it deployment/mysql -n lynq-test -- \
mysql -u root -p"$(kubectl get secret mysql-root-password -n lynq-test -o jsonpath='{.data.password}' | base64 -d)" \
-e "INSERT INTO nodes.node_configs (node_id, node_url, is_active, subscription_plan) VALUES ('delta-co', 'https://delta.example.com', 1, 'starter');"
sleep 35
kubectl get lynqnode delta-co-test-template -n lynq-system
# 4. Deactivate → resources clean up within 30s
kubectl exec -it deployment/mysql -n lynq-test -- \
mysql -u root -p"$(kubectl get secret mysql-root-password -n lynq-test -o jsonpath='{.data.password}' | base64 -d)" \
-e "UPDATE nodes.node_configs SET is_active = 0 WHERE node_id = 'delta-co';"
sleep 35
kubectl get lynqnode delta-co-test-template -n lynq-system # Not foundTroubleshooting
Operator not starting — cert-manager must be Ready before Lynq starts:
kubectl get pods -n cert-manager
kubectl logs -n lynq-system -l control-plane=controller-managerNodes not created — check the hub sync and confirm is_active = 1 in the database:
kubectl get lynqhub test-hub -n lynq-system -o yaml
kubectl exec -it deployment/mysql -n lynq-test -- \
mysql -u node_reader -p"$(kubectl get secret mysql-credentials -n lynq-test -o jsonpath='{.data.password}' | base64 -d)" \
-e "SELECT node_id, is_active FROM nodes.node_configs;"Resources missing — inspect the LynqNode status for failures:
kubectl describe lynqnode <name> -n lynq-systemFor detailed diagnostics, see Troubleshooting.
Cleanup
# Remove everything except the cluster
kubectl delete lynqnodes --all -n lynq-system
kubectl delete lynqform test-template -n lynq-system
kubectl delete lynqhub test-hub -n lynq-system
# Full teardown
./scripts/cleanup-minikube.shScripts support env var overrides — run ./scripts/<name>.sh --help for options.
See Also
- Installation — deploy to a production cluster
- Datasources — connect to your own MySQL database
- Templates — template syntax and 200+ functions
- Policies — control resource creation, deletion, and conflict behavior
- Use Cases — common patterns and worked examples
