Skip to main content
Kubernetes coreLesson 13 of 13

The Inner Dev Loop on Kubernetes

The inner loop is what you repeat dozens of times a day: change code, see it run. On Kubernetes, doing it by hand means build, push, deploy and wait. Follow one file save and see how tools shorten that loop.

Changeone line
Pathbuild → push → pull
Commands by hand5 or more
kind cluster (laptop)Your editorsave a fileDevcontainersame tools for allDev toolskaffold dev · tilt upImage buildlocal BuildKitManifestsHelm or KustomizeApp Podcontainer runningkind nodecontainerd imagesRegistryremote clusters onlyShared clusterstaging, own nsdocker builddocker pushpull
RequestResponse / reportWatchAppears in a later step

What you will learn

  • What Skaffold and Tilt automate: watch, build, deploy, logs
  • Load images into kind without pushing to a registry
  • File sync into a running container, and when it falls back to a rebuild
  • Use the same Helm or Kustomize manifests as production
  • Remote dev against a shared cluster, and devcontainers

Which tool for which part of the loop​

NeedExample toolsWhat it doesWatch out
Watch, build, deploy on saveSkaffold (skaffold dev), Tilt (tilt up)Chains build, tag, render, deploy and logsCheck the kubectl context first
Skip rebuilds for small editsSkaffold sync, Tilt live_updateCopies files into the running containerNeeds tar in the container for Skaffold; drift from the image
No registry locallykind load, a local registry wired to kindPuts the image straight into the nodesOnly for local clusters
See the appkubectl port-forward, kubectl logs -f, tool UIsBrings ports and logs to your terminalForward stops when the Pod restarts with plain kubectl
Production-like configHelm values file, Kustomize overlaySame templates as prod, dev settingsKeep dev differences small
Real dependenciesTelepresence, mirrordLocal process joins a shared clusterCan take traffic from others
Same tools for everyoneDev Containers (devcontainer.json)Pins the toolchain in a containerDocker-in-container setup for kind

Try it yourself​

kubectl config current-context # kind-lab means Skaffold treats it as local (no push)
skaffold init # generate skaffold.yaml from Dockerfile and manifests
skaffold dev --port-forward # watch, build, deploy, stream logs; Ctrl+C cleans up
skaffold render -p dev # print the manifests the dev profile would apply
tilt up # read the Tiltfile; UI on http://localhost:10350
tilt down # remove what tilt up deployed
kubectl port-forward svc/my-app 8080:80 # what the tools do under the hood
kubectl logs -f deploy/my-app # stream logs from one Pod of the Deployment

Check yourself

  1. skaffold dev builds an image while the context is kind-lab. Why is no registry needed?
  2. File sync is set up, but after editing go.mod the change does not appear by syncing. What should happen?
  3. Why point the dev loop at the production Helm chart or Kustomize base with a dev overlay?

Further reading: Skaffold docs · Tilt docs · kind: loading an image · Dev Containers · Build a Lab Cluster on Your Laptop · Per-environment deploys with Kustomize (CKA·CKAD) · How a Helm Release Is Installed, Upgraded and Rolled Back