Apologies if this is old-hat for you, but, I was awfully tired of ‘git commit; git push; … wait for CI; … helm…’
Lets say you are developing a simple Python flask app. You are going to edit/push many times to get this going perfectly in Kubernetes. So many docker builds and pushes and redeploys and port forwards. There has to be a better way?
Lets try! For this we’re going to use ‘Skaffold‘. I’ve created a sample ‘repo‘ you can try from. So lets try. You’ll need to change the ‘skaffold.yml’ and ‘k8s.yml’ to be your own registry space (I used Dockerhub, but they have native support for GCR).
Then you just run ‘skaffold dev’. Boom. That’s it. It builds your image, creates a pod, starts it with port-forwards all working. Every time you change a python or template file, it patches it and you are running. Seamless.
Leave a Reply