Why Tilt Exists
Developing on Kubernetes is slow — build image, push to registry, update deployment, wait for rollout, check logs. Tilt watches your code and automatically rebuilds and deploys in seconds.
Install
curl -fsSL https://raw.githubusercontent.com/tilt-dev/tilt/master/scripts/install.sh | bash
Create a Tiltfile
# Tiltfile
docker_build("myapp", ".")
k8s_yaml("k8s/deployment.yaml")
k8s_resource("myapp", port_forwards="8080:8080")
tilt up
That is it. Tilt watches your files, rebuilds the image, and updates the pod — all in seconds.
Live Update (No Rebuild)
# Tiltfile — sync files directly into running container
docker_build(
"myapp",
".",
live_update=[
sync("./src", "/app/src"),
run("pip install -r requirements.txt", trigger=["requirements.txt"]),
],
)
k8s_yaml("k8s/deployment.yaml")
k8s_resource("myapp", port_forwards="8080:8080")
File changes sync into the container WITHOUT rebuilding the image — sub-second updates.
Multi-Service Setup
# Tiltfile for microservices
for svc in ["api", "worker", "web"]:
docker_build(
f"myorg/{svc}",
f"./services/{svc}",
live_update=[sync(f"./services/{svc}/src", "/app/src")],
)
k8s_yaml("k8s/")
k8s_resource("api", port_forwards="8080:8080")
k8s_resource("web", port_forwards="3000:3000")
Tilt Extensions
# Use community extensions
load("ext://helm_resource", "helm_resource")
helm_resource("redis", "bitnami/redis")
load("ext://namespace", "namespace_create")
namespace_create("dev")
Key Features
- Smart rebuilds — only rebuild what changed
- Live update — sync files without image rebuild
- Port forwarding — automatic, no kubectl needed
- Web UI — dashboard at localhost:10350
- Multi-service — manage entire stack in one Tiltfile
- Extensions — Helm, namespaces, restart, and more
Tilt vs Alternatives
| Feature | Tilt | Skaffold | DevSpace |
|---|---|---|---|
| Config | Starlark | YAML | YAML |
| Live update | Yes | Yes | Yes |
| Web UI | Yes | No | No |
| Extensions | Yes | Limited | Plugins |
| Learning curve | Low | Medium | Medium |
Resources
Need to extract Kubernetes deployment data, container metrics, or development workflow info? Check out my Apify tools or email spinov001@gmail.com for custom solutions.
Top comments (0)