Troubleshooting
Use this page when DataKit is installed but something in the control plane is no
longer converging: local prerequisites are missing, ArgoCD is not creating the
right objects, the controller is stuck in Failed, or ClickHouse migrations are
retrying forever.
Diagnostic flow
flowchart TD
A[Problem observed] --> B{Local CLI or cluster-side?}
B -->|CLI| C[Run dk doctor]
C --> D{Any failed checks?}
D -->|Yes| E[Fix prerequisites and rerun]
D -->|No| F[Inspect command-specific logs or flags]
B -->|Cluster| G[kubectl get packagedeployments, stores, cells, clickhousemigrations]
G --> H{Status condition points to root cause?}
H -->|Yes| I[Follow targeted fix below]
H -->|No| J[Describe resource, inspect events, restart controller if needed]
Start with dk doctor
dk doctor validates the local operator workstation before you chase cluster
problems. The current source checks:
- Go version at least
1.25 - Docker or Rancher Desktop availability
k3d,kubectl, andhelm- OCI registry connectivity
- local dev stack health
Run it first:
dk doctor
dk doctor --verboseIf it fails, fix the local toolchain before investigating higher-level symptoms.
Common symptoms and fixes
| Symptom | Likely cause | What to check | Fix |
|---|---|---|---|
dk not found | CLI not installed or not on PATH | which dk | make install or add install dir to PATH |
dk doctor fails Go version | Host Go is older than 1.25 | go version | Upgrade Go and rerun |
dk publish cannot authenticate | Registry credentials missing | echo $DK_REGISTRY, Docker config, GITHUB_TOKEN for GHCR | Set DK_REGISTRY_* vars or login via Docker/GitHub auth |
dk promote fails before PR creation | GitHub auth or target repo overrides missing | echo $GITHUB_TOKEN, echo $GITHUB_OWNER, echo $GITHUB_REPO | Export the env vars or use the default Infoblox-CTO/dk-dataeng target |
dk logs --environment prod fails | kubeconfig unavailable | echo $KUBECONFIG, kubectl config current-context | Export KUBECONFIG or fix cluster auth |
PackageDeployment stuck in Failed | Invalid package ref, registry pull error, digest mismatch, or store resolution issue | kubectl describe packagedeployment <name> -n <ns> | Fix the spec or backing resource, then let the controller requeue |
Store not ready in a cell | Bad connection or missing secret mapping | kubectl describe store <name> -n <cell-ns> | Correct spec.connection or secretRef |
ClickHouseMigration keeps retrying | Dependency, store, secret interpolation, or DDL failure | kubectl describe clickhousemigration <name> -n <ns> | Fix the reason listed in status.conditions |
Controller troubleshooting
The controller deployment name is always dk-controller (charts/dk-controller/templates/_helpers.tpl).
Inspect controller health
kubectl -n dk-system get deployment dk-controller
kubectl -n dk-system get pods -l app.kubernetes.io/component=controller
kubectl -n dk-system logs deployment/dk-controller --tail=200The deployment template exposes:
- controller health on port
8081 - controller metrics on port
8080 - sidecar health on
8083and metrics on8082when enabled
Inspect CRD status and events
kubectl get packagedeployments -A
kubectl describe packagedeployment <name> -n <namespace>
kubectl get events -n <namespace> --sort-by=.lastTimestamp | tail -50Important PackageDeployment.status.phase values from the CRD:
PendingPullingReadyRunningCompletedFailed
High-signal failure reasons from the reconciler:
| Reason | Meaning | Typical fix |
|---|---|---|
ValidationFailed | spec.package.name or version missing | Fix the CR or upstream values file |
PullFailed | Registry lookup failed | Check registry URL, credentials, and image/tag existence |
DigestMismatch | Pulled artifact digest differs from spec | Re-promote with the correct digest or remove the stale digest pin |
StoreResolutionFailed | Store env var injection could not resolve referenced stores | Fix missing Store objects, namespaces, or secrets |
GenerationFailed | Controller could not generate the target workload | Inspect the manifest and controller logs |
Cell and store troubleshooting
Cells are cluster-scoped; stores are namespaced inside the cell namespace. Verify both sides when package resolution fails.
kubectl get cells
kubectl get stores -A
kubectl get stores -n dk-canary
kubectl describe cell canary
kubectl describe store warehouse -n dk-canaryQuick interpretation:
Cell.status.ready=falseusually means the namespace or expected stores are not initialisedStore.status.ready=falsemeans the connection has not been verified- a package targeting
spec.cell=canarywill resolve stores fromdk-canary
ClickHouse migration troubleshooting
ClickHouseMigration is reconciled by the optional sidecar. The controller is
order-aware within a store + database pair and updates status conditions for
each failure mode.
Inspect migration state
kubectl get clickhousemigrations -A
kubectl describe clickhousemigration <name> -n <namespace>
kubectl -n dk-system logs deployment/dk-controller -c ch-migration --tail=200Common migration reasons
| Reason | What it means | Fix |
|---|---|---|
DependencyPending | A lower-order migration in the same store/database is not applied yet | Fix or apply the earlier migration first |
StoreResolutionFailed | The sidecar could not build a DSN from the referenced store | Add host, fix port, or correct secretRef |
EnvResolutionFailed | ${VAR} interpolation from spec.envFrom failed | Fix the referenced Secret/key |
ExecutionFailed | ClickHouse rejected the SQL or was unreachable | Validate connectivity and rerun after correcting the DDL |
Applied=True with matching sqlHash | No-op; migration already applied | No action required |
The reconciler defaults missing ClickHouse connection fields to port=9000,
user=default, and database=default, but it requires spec.connection.host.
Promotion and rollback troubleshooting
When GitOps changes do not reach the cluster:
- confirm the PR was created or updated (
dk promote,dk promote status, or GitHub UI) - inspect the changed
gitops/envs/<env>/cells/<cell>/apps/<package>/values.yaml - inspect the ArgoCD
Applicationindk-system - confirm the resulting
PackageDeploymentexists in the destination namespace
Useful checks:
dk promote status <pr-number>
kubectl get applications -n dk-system
kubectl describe application <env>-<cell>-<package> -n dk-system
kubectl get packagedeployments -n dk-<env>-<cell>When to restart the controller
Restart the controller only after you have fixed the underlying object or secret. A restart helps when:
- the deployment is crash-looping after an image or chart upgrade
- the controller cache is stale after API-server or CRD churn
- the ClickHouse sidecar is stuck after a dependency outage
Use the runbook procedure in the next page rather than deleting pods ad hoc.
Next Steps
Common Issues
This page covers common issues you may encounter and how to resolve them.
Installation Issues
Command Not Found: dk
Symptom: Running dk returns “command not found”
Cause: The dk binary is not in your PATH
Solution:
# Reinstall to ~/go/bin (default)
make install
# Verify it's on your PATH
which dk
# If ~/go/bin is not on your PATH, add it
echo 'export PATH=$PATH:$HOME/go/bin' >> ~/.zshrc
source ~/.zshrc
# Or install to a directory already on your PATH
make install DESTDIR=/usr/local/binBuild Fails with Go Errors
Symptom: make build fails with Go compilation errors
Cause: Wrong Go version or missing dependencies
Solution:
# Verify Go version (needs 1.22+)
go version
# Download dependencies
go mod download
# Clear module cache if needed
go clean -modcache
go mod downloadPermission Denied on Binary
Symptom: Running dk gives “permission denied”
Solution:
chmod +x "$(which dk)"
dk versionDevelopment Stack Issues
dk dev up Fails
Symptom: dk dev up fails to start services
Common Causes:
Docker not running
# Check Docker docker info # Start Docker Desktop (macOS) open -a DockerPort conflicts
# Check ports in use lsof -i :9092 # Kafka lsof -i :9000 # MinIO lsof -i :5000 # Marquez # Kill conflicting process kill -9 <PID>Previous containers not cleaned up
# Force cleanup dk dev down --volumes dk dev up
Kafka Connection Refused
Symptom: Pipeline can’t connect to Kafka at localhost:9092
Solutions:
Wait for Kafka to be ready
# Check health dk dev status # Wait and retry sleep 30 dk run ./my-pipelineCheck Kafka logs
kubectl --context k3d-dk-local logs -l app=redpandaVerify Kafka is accepting connections
docker exec dk-kafka kafka-broker-api-versions \ --bootstrap-server localhost:9092
MinIO Access Denied
Symptom: S3 operations fail with access denied
Solution:
# Verify MinIO is running
dk dev status
# Check credentials (default: minioadmin/minioadmin)
mc alias set local http://localhost:9000 minioadmin minioadmin
# Create bucket if it doesn't exist
mc mb local/my-bucketMarquez Not Showing Lineage
Symptom: Lineage events don’t appear in Marquez UI
Solutions:
Verify Marquez is healthy
curl http://localhost:5000/api/v1/namespacesCheck environment variables
# Ensure this is set export OPENLINEAGE_URL=http://localhost:5000/api/v1/lineageRun pipeline and check events
# Run with debug DK_LOG_LEVEL=debug dk run ./my-pipeline
Pipeline Issues
dk lint Fails
Symptom: dk lint returns validation errors
Common Errors:
| Error | Cause | Fix |
|---|---|---|
E001: metadata.name is required | Missing name | Add metadata.name to dk.yaml |
E004: invalid name format | Uppercase/special chars | Use lowercase and hyphens only |
E010: store not found | Missing store reference | Add a Store manifest with the referenced name |
E025: pii=true requires sensitivity | Missing classification | Add sensitivity level |
Example fixes:
# Fix E001/E004 - invalid name
metadata:
name: my-pipeline # lowercase, hyphens only
# Fix E010 - add missing store
# store.yaml
apiVersion: datakit.infoblox.dev/v1alpha1
kind: Store
metadata:
name: local-events
spec:
type: kafka-topic
connection:
brokers: localhost:9092
topic: events
# Fix E025 - add sensitivity
outputs:
- name: data
classification:
pii: true
sensitivity: confidential # Add thisdk run Fails Immediately
Symptom: Pipeline starts but exits immediately
Solutions:
Check logs
dk logs <run-id>Run with debug
DK_LOG_LEVEL=debug dk run ./my-pipelineCommon causes:
- Missing environment variables
- Can’t connect to input sources
- Syntax errors in pipeline code
dk run Timeout
Symptom: Pipeline times out before completing
Solution:
# Increase timeout
dk run ./my-pipeline --timeout 60m
# Or set default in config
# ~/.dk/config.yaml
defaults:
timeout: 60mNo Data Flowing
Symptom: Pipeline runs but processes no records
Debugging steps:
Check input has data
# For Kafka docker exec dk-kafka kafka-console-consumer \ --bootstrap-server localhost:9092 \ --topic user-events \ --from-beginning \ --max-messages 5Check consumer group offset
docker exec dk-kafka kafka-consumer-groups \ --bootstrap-server localhost:9092 \ --group my-consumer-group \ --describeCheck bindings
- Verify topic name matches
- Check consumer group setting
- Verify offset reset policy
Publishing Issues
Authentication Failed
Symptom: dk publish fails with authentication error
Solution:
# For GitHub Container Registry
echo $GITHUB_TOKEN | docker login ghcr.io -u $GITHUB_USER --password-stdin
# For Docker Hub
docker login
# Set in config
export DK_REGISTRY_USERNAME=myuser
export DK_REGISTRY_TOKEN=mytokenPush Denied
Symptom: dk publish says push denied
Common Causes:
No write access to registry
- Verify you have push permissions
- Check repository/package visibility settings
Wrong registry URL
dk publish --registry ghcr.io/correct-orgToken expired
docker logout ghcr.io docker login ghcr.io
Package Already Exists
Symptom: Can’t push because version exists
Cause: OCI artifacts are immutable
Solution:
# Use a new version
dk build --tag v1.0.1
dk publishPromotion Issues
PR Not Created
Symptom: dk promote doesn’t create a PR
Solutions:
Check GitHub token
# Ensure token has repo access export GITHUB_TOKEN=ghp_xxxCheck GitOps repository
# ~/.dk/config.yaml environments: dev: gitops: https://github.com/org/gitops.git # Verify URLCheck network connectivity
curl -I https://github.com
PR Failed CI
Symptom: Promotion PR fails CI checks
Solutions:
Check the PR for failure details
Run lint locally first:
dk lint --strictVerify package exists in registry:
dk versions my-pipeline
Sync Failed in ArgoCD
Symptom: PR merged but deployment not synced
Check:
- ArgoCD application status
- Kubernetes cluster connectivity
- Resource quotas/limits
dk status my-pipeline --env dev
dk logs my-pipeline --env dev --syncPerformance Issues
Pipeline Running Slowly
Optimization strategies:
Increase resources
# dk.yaml spec: runtime: resources: memory: "4Gi" cpu: "4"Increase batch size
dk run --env BATCH_SIZE=5000Check I/O bottlenecks
- Use local SSDs
- Increase network throughput
- Use compression
High Memory Usage
Solution:
Process in smaller batches
Use streaming instead of loading all data
Increase memory limits:
resources: limits: memory: "8Gi"
Registry Cache Issues (k3d Runtime)
Cache Container Not Starting
Symptom: dev-registry-cache container fails to start
Solutions:
Check Docker resources
docker system df docker system prune -f # Clean up if low on spaceCheck for port conflicts
lsof -i :5000 # Kill conflicting process if foundInspect container logs
docker logs dev-registry-cacheForce cache rebuild
docker rm -f dev-registry-cache docker volume rm dev_registry_cache dk dev up --runtime=k3d
Image Pulls Still Slow
Symptom: Cache is running but images aren’t being cached
Solutions:
Verify cache is being used
# Check the registries.yaml was created cat .cache/registries.yamlCheck cache hit rate
docker logs dev-registry-cache 2>&1 | grep -E "manifest|blob"Ensure cluster uses the registry config
# Delete cluster and recreate dk dev down --runtime=k3d dk dev up --runtime=k3d
Cache Not Created in CI
Symptom: Cache doesn’t start in CI environment
Cause: This is expected behavior. The registry cache is automatically skipped in CI to avoid complications.
Detection: The following environment variables trigger CI mode:
CI=trueGITHUB_ACTIONS=trueJENKINS_URL(any value)
Solution: If you need the cache in CI, unset these variables (not recommended).
“Network not found” Error
Symptom: Container fails to start with network error
Solution:
# Create the network manually
docker network create devcache
# Or remove and let it recreate
docker network rm devcache
dk dev up --runtime=k3dLineage Issues
Missing Upstream/Downstream
Symptom: Lineage graph shows orphan nodes
Causes:
Different namespaces
- Packages should use the same namespace for linked lineage
Binding name mismatch
# Both packages should reference same binding binding: shared/user-events # Use consistent namingNever ran successfully
- Only successful runs emit complete lineage
Stale Lineage
Symptom: Lineage shows old data
Solution:
# Planned: dk lineage my-pipeline --refresh
# For now, query Marquez directly:
curl http://localhost:5000/api/v1/namespaces/default/jobs/my-pipeline/runsGetting More Help
If you can’t resolve your issue:
Check debug logs
DK_LOG_LEVEL=debug dk <command>Search existing issues
Open a new issue
- Include: command, error message, environment details
Contact the team
- Slack: #datakit-support
- Email: datakit@example.com
See Also
- FAQ - Frequently asked questions
- CLI Reference - Command documentation
- Configuration - Config options
Frequently Asked Questions
Answers to common questions about DataKit.
General Questions
What is DataKit?
DataKit is a system for building, publishing, and operating data pipelines with built-in governance, lineage tracking, and GitOps-based deployment. It provides:
- Data Packages: Self-contained, versioned bundles for data pipelines
- Local Development: Docker-based development stack
- Lineage Tracking: Automatic OpenLineage integration
- GitOps Deployment: Environment promotion through pull requests
What problem does DataKit solve?
DataKit addresses common challenges in data engineering:
| Challenge | DataKit Solution |
|---|---|
| Pipeline deployment complexity | GitOps-based promotion workflow |
| Lack of data lineage | Automatic OpenLineage events |
| Configuration drift | Immutable OCI artifacts |
| Governance gaps | Built-in classification and policies |
| Development friction | Local Docker stack |
How is DataKit different from Airflow/Dagster/Prefect?
DataKit is complementary to orchestrators, not a replacement:
| Aspect | DataKit | Orchestrators |
|---|---|---|
| Focus | Packaging & deployment | Workflow scheduling |
| Unit of work | Data package | Task/DAG |
| Runtime | OCI containers | Python/containers |
| Lineage | Native OpenLineage | Plugin-based |
DataKit packages can be scheduled by any orchestrator.
What languages/runtimes are supported?
DataKit supports any containerized runtime:
- Python (most common)
- Java/Scala (Spark, Flink)
- Go
- Node.js
- Any language that runs in a container
Development Questions
How do I start developing locally?
# 1. Install dk CLI
make build
export PATH=$PATH:$(pwd)/bin
# 2. Start local stack
dk dev up
# 3. Create a Transform package
dk init my-pipeline --runtime generic-python
# 4. Run locally
dk run ./my-pipelineSee the Quickstart for details.
What’s included in the local development stack?
| Service | Purpose | Port |
|---|---|---|
| Kafka | Message streaming | 9092 |
| MinIO | S3-compatible storage | 9000, 9001 |
| Marquez | Lineage tracking | 5000 |
| PostgreSQL | Marquez database | 5432 |
Can I use my own Kafka/S3 locally?
Yes! Override connection details in your Store manifests:
apiVersion: datakit.infoblox.dev/v1alpha1
kind: Store
metadata:
name: my-kafka
spec:
connector: kafka
connection:
bootstrap-servers: my-kafka:9092DataSets reference the Store by name — no additional configuration is needed.
How do I add custom services to the dev stack?
Use dk config to customize chart versions and Helm values:
dk config set dev.charts.redpanda.version 25.2.0
dk config set dev.charts.postgres.values.primary.resources.limits.memory 1GiHow do I persist data between runs?
Data is stored in Docker volumes. To reset:
# Keep data
dk dev down
# Remove data
dk dev down --volumesPackage Questions
What files are in a data package?
| File/Directory | Purpose | Required |
|---|---|---|
dk.yaml | Transform manifest (runtime, inputs, outputs, schedule) | Yes |
connector/ | Connector definitions (technology types) | No |
store/ | Store definitions (instances with connection details) | No |
dataset/ | DataSet definitions (data contracts with schema) | No |
dataset-group/ | DataSetGroup definitions (bundled DataSets) | No |
The dk.yaml file is a Transform manifest that references DataSets by name. DataSets reference Stores, and Stores reference Connectors.
What runtimes are available?
| Runtime | Description |
|---|---|
cloudquery | CloudQuery SDK sync |
generic-go | Go container |
generic-python | Python container |
dbt | dbt transformations |
dk init my-pkg --runtime generic-python
dk init my-pkg --runtime cloudqueryHow do I version packages?
Packages use semantic versioning:
# Build with version
dk build --tag v1.0.0
# Increment for changes
v1.0.0 → v1.0.1 # Bug fix
v1.0.0 → v1.1.0 # New feature
v1.0.0 → v2.0.0 # Breaking changeCan I publish private packages?
Yes! Push to a private registry:
# Use private registry
dk publish --registry ghcr.io/my-private-org
# Ensure authentication
docker login ghcr.ioDeployment Questions
How does promotion work?
DataKit uses GitOps for deployment:
dk promotecreates a PR in the GitOps repository- PR is reviewed and approved
- After merge, ArgoCD syncs to Kubernetes
- Package runs in the target environment
What are the standard environments?
| Environment | Approval | Purpose |
|---|---|---|
| dev | Auto-merge | Development |
| int | 1 approval | Integration testing |
| prod | 2 approvals | Production |
Can I skip environments?
Not recommended, but possible:
# This will work but triggers a warning
dk promote my-pkg v1.0.0 --to prod
# Warning: Skipping dev and int environmentsHow do I rollback a deployment?
# Rollback to previous version
dk rollback my-pkg --env prod
# Rollback to specific version
dk rollback my-pkg --to v1.0.0 --env prodHow do I know what version is deployed?
dk status my-pkgEnvironment Version Status
dev v1.2.0 Synced
int v1.1.0 Synced
prod v1.1.0 SyncedLineage Questions
What is data lineage?
Lineage tracks:
- Where data comes from (upstream)
- Where data goes to (downstream)
- What transformations were applied
- When the pipeline ran
How does DataKit track lineage?
DataKit automatically emits OpenLineage events:
- Reads inputs/outputs from
dk.yaml - Emits START event when pipeline begins
- Emits COMPLETE/FAIL event when pipeline ends
- Events sent to Marquez (or configured backend)
Where can I view lineage?
- Local: http://localhost:3000 (Marquez Web UI)
- CLI:
dk lineage my-pipeline(not yet implemented) - Production: Your organization’s lineage backend
Can I use a different lineage backend?
Yes! Configure in ~/.dk/config.yaml:
lineage:
backend: datahub # or: marquez, custom
endpoint: http://datahub:8080/api/lineageWhy isn’t my lineage showing up?
Common causes:
- Marquez not running:
dk dev status - Wrong endpoint: Check
OPENLINEAGE_URL - Pipeline never completed successfully
Governance Questions
What data classification levels are available?
| Level | Description |
|---|---|
internal | Internal use only |
confidential | Limited access, may contain PII |
restricted | Highly sensitive |
How do I mark data as containing PII?
Use the classification and pii fields on DataSet schemas:
apiVersion: datakit.infoblox.dev/v1alpha1
kind: DataSet
metadata:
name: customer-data
spec:
store: warehouse
table: public.customers
classification: confidential
schema:
- name: email
type: string
pii: true
- name: name
type: string
pii: trueAre classification policies enforced?
Yes! dk lint enforces policies:
dk lint
# Error: output 'customer-data': pii=true requires sensitivity levelHow do I view what packages handle PII?
dk governance report --filter pii=trueTroubleshooting Questions
dk command not found
Add the binary to your PATH:
export PATH=$PATH:/path/to/datakit/bindk dev up fails
- Check Docker is running:
docker info - Check port conflicts:
lsof -i :9092 - Clean up:
dk dev down --volumes
Pipeline can’t connect to Kafka
- Wait for Kafka to be ready:
dk dev status - Check Kafka logs:
kubectl --context k3d-dk-local logs -l app=redpanda - Verify bootstrap server:
localhost:9092
Push to registry fails
- Check authentication:
docker login ghcr.io - Check permissions on the registry
- Check network connectivity
Promotion PR not created
- Check
GITHUB_TOKENis set - Verify GitOps repository URL in config
- Check network connectivity
More Questions?
If your question isn’t answered here:
- Check Common Issues
- Search GitHub Issues
- Ask in #datakit-support on Slack
- Open a new issue on GitHub
See Also
- Common Issues - Detailed troubleshooting
- CLI Reference - Command documentation
- Quickstart - Getting started guide