Okteto Push — Your Code to Kubernetes in Seconds
We’ve been talking to a lot of developers since we started building Okteto. Every team has very unique challenges, but one that came up pretty regularly was how long it takes to ship a line of code from the developer’s IDE to Kubernetes. Teams either have to do everything manually (build, tag, push, redeploy) or push their changes to CI/CD service and wait for ages until their changes are processed.
Either way, your flow is broken by the time your changes are deployed and your productivity takes a nosedive. This got us thinking. Why do developers need to understand the entire build-deploy infrastructure to validate application-specific changes? 🤔
We are thrilled to announce Okteto Push, the fastest way to push your code changes to Kubernetes. A single command to automatically build, push and update your applications directly in Kubernetes.
Push your Code
Our objective with okteto push
is to eliminate every action a developer needs to when developing an application. Code, push and see your changes live. That way, we can all focus on our applications, instead of having to worry about the underlying pipelines.
In order to use okteto push
all you need is a local folder with your code, a Dockerfile and the latest version of the Okteto CLI.
To start, run okteto login
to create a free account in Okteto Cloud. This will allow you to use the Okteto Build Service to build your images directly in the Cloud.
$ okteto login
Run the okteto push
command to push your code to Kubernetes, replacing $IMAGE
with your image repository (e.g. pchico83/hello-world
):
$ okteto push — name hello-world -t $IMAGE - Running your build in Okteto Cloud…
[+] Building 2.8s (16/16) FINISHED
=> importing cache manifest from pchico83/hello-world:okteto 1.1s
…
…
…
✓ Source code pushed to the development environment ‘hello-world’
okteto push
will automatically build a development image using the Okteto Build Service, generate a developer tag, push it to your container registry and deploy it to Kubernetes. If you already have an application running, it will automatically find the deployment and replace the image with the new one. If you don’t, it can even create a deployment and a service for you.
A single command to get your code into any Kubernetes environment in a few seconds. No need to run docker locally, pick a container tag, or tinker with yaml files to update your app. How cool is that 🚀?
Learn More
Okteto Push works with any programming language, framework or platform. Learn more in our getting started guides for ASP.NET, Go, Java, Node.js, Python, PHP or Ruby.
Okteto Push is integrated by default with the rest of the Okteto Cloud tools, but it follows the
batteries included but swappable
philosophy. You can configure it to use your own BuildKit instance and Docker registry. More in this is available here.
What’s Next?
At Okteto we are committed to make Kubernetes accessible to every developer and to reduce the inner loop development cycle to the minimum. Okteto Push still requires developers to have a Dockerfile, but we are experimenting with Cloud Buildpacks and similar technologies to completely eliminate this requirement. Reach out to us if this is your kind of thing 😎.
Conclusions
A few of us in the Okteto community have been using okteto push
internally for the last couple of weeks, and the feedback so far has been great. We’ve seen people use it as part of their inner flow, as a pre-commit validation mechanism, to create preview environments, and even for staging and prod deployments. It’s all really exciting!
We would ❤️ to hear what you think about Okteto Push. You can reach us on Twitter, or in our #okteto channel in the Kubernetes community Slack.