Big News!  Tilt is joining Docker

Tilt Commit of the Month: August 2019

Protect Your Production Clusters

It’s our third post of the Commit of the Month series—where we highlight the work we’ve been doing on Tilt lately—and we’re continuing our proud tradition of posting a couple of days late. Never fear, though: this commit was made early in August, and merged without much fanfare, but it addressed an issue that multiple users have complained about, and has saved my personal bacon multiple times already.

August’s commit of the month is: Disallow deploys to remote kube by default. If you use Tilt and you have a remote Kubernetes cluster anywhere in your life, you may have seen it in action:

"Watch out, this might be production!" warning in the WebUI

What’s the point?

The point, simply, is to keep you from tilt up-ing your local code into your production cluster Multiple users reported doing this accidentally, and borking their production cluster because of it—overwriting production secrets, serving untested code to users, etc. Whoops! So we put in some protections.

This feature uses heuristics to guess whether you’re running in a local cluster (like Minikube or Docker Desktop). Local cluster are obviously not production, so they’re always safe. If your KubeContext is not pointing to something that we can identify as a local cluster, then we block your deploy and throw up this warning instead.

If you were in fact pointing at your production cluster, then yay, crisis averted! If you actually meant to deploy to this cluster (say, it’s your staging cluster, or maybe you’re excited about all the benefits you get from developing against a remote k8s cluster), you can easily allow the cluster in your Tiltfile, and Tilt won’t bother you about it anymore. (You don’t even to have to restart Tilt, because it’s responsive to changes in your Tiltfile!)

allow_k8s_contexts('my-staging-cluster')

We love it when users tell us they like a feature, but the most direct feedback available to us is is when the Tilt team likes a feature; it’s proved pretty helpful for us so far, and we hope it’s useful for you too!

Slack messages from the Tilt team about this feature

Slack messages from the Tilt team about this feature Actual footage of this feature saving Team Tilt’s production cluster

Is there some way we can make Tilt safer for you? Let us know! If you have a feature request or bug report, file an issue, and maybe the fix will be the next Commit of the Month.

So, until the end of September (or, let’s be honest, the beginning of October): happy Tilting!

Related

Already have a Dockerfile and a Kubernetes config?

You’ll be able to setup Tilt in no time and start getting things done. Check out the docs! 

Having trouble developing your servers in Kubernetes?