π€ A Note From the Editor
Sorry this issue is a day late!
We wrote an open source ChatGPT bot for Kubernetes alerts and it blew up overnight.
In the video below, I test it on a KubePodNotReady alert.
Your regular newsletter about Skaffold continues below.
π© The Traditional Kubernetes Dev Loop
In the beginning, developing apps for Kubernetes went like this:
Modify source code
Build container
Push image to registry
Update YAML to use image
Run `kubectl apply`
Fetch logs
Thatβs pretty tedious for every change to your code. Itβs a long development loop, which encourages making large changes to code before testing them on Kubernetes. No one wants to do that for each line of code changed.
Can we make this simpler, faster, and better?
π¦ Speeding Up the Dev Loop with Skaffold
Hereβs the same loop, with Skaffold:
Modify source code
Run `skaffold run`
The last step is a joke, but how does the rest of it work?
π¨ How Skaffold Works?
Skaffold builds your container
It figures out where that container is used in your Kubernetes resources
It updates your YAML with the new container tag
It applies the change to relevant deployments in your cluster
Nifty, right?
π Other Skaffold Benefits
Use Skaffold in CI/CD
Lets say you build and deploy to Kubernetes via CI/CD. You probably have a script like this:
Build container
Push container to registry
Update YAML to use the newly built container
Run `kubectl apply`
Thatβs pretty similar to your local development loop! So Skaffold covers that too.
One tool, used everywhere.
π
Donβt rebuild a container on code change
Even with Skaffold, it takes time to rebuild a container on every code change.
With a little extra configuration, Skaffold can hot-patch your containers and apply new code immediately. Itβs out of scope for this post, but definitely a time saver.
π€ Do you use Skaffold?
Reply to this email and let us know.
What should we cover next?