5 steps to bring DevX automation to your company
Get the guide

The Power of okteto up

Okteto was created for a better developer experience. We took a good look at the typical process a developer works through to write, test, and deploy their code to production and realized we could change that process to create a faster inner loop, avoid bugs that are costly in both time and money, and help developers build with confidence, knowing that their code will work (and not just on their machines).

One of the ways we’ve done this is through our okteto up command. When a developer runs okteto up in their terminal, there are several things that take place under the hood to make the developer experience more seamless. While we love that it feels a bit magical, we wanted to explain exactly what’s happening so developers can have confidence in Okteto as they use it in their work.

The development cycle without Okteto

Development cycle

If you’re a developer, the following cycle will probably sound fairly routine.

You write code in your local IDE, run unit tests, and validate your code. If that goes well, you’ll build a container and then push code to the container. Finally, you’ll deploy to a cluster (which could be local or remote). This is what developers call the inner loop. The problem with this method is that developers will sometimes need to do this hundreds of times per day. This can drastically slow down the release of features and updates because if every dev is following this loop, there will be a lot of wasted time.

Many developers don’t have time for all these steps, so instead, they write code locally, push it to GitHub, and wait for CI/CD, which could take anywhere from 5 minutes to an hour. Sure, they can work on something else while they wait, but that doesn’t mean time isn’t wasted, since they’re often waiting on necessary feedback before moving to the next item on their list. Also, when working within this structure, developers have to wait until they push their code to see if it fails, which can be stressful, especially if they’re working on a tight deadline.

Okteto gives developers a faster inner loop

okteto up

okteto up is a command that is simple to run in your terminal, but has a big impact on the way a developer codes.

When you run okteto up, you’re telling okteto to take one particular piece of your application out of production mode and into development mode.

First, a developer would deploy their app to Okteto Cloud or Okteto Enterprise to get a a copy with the same configuration they use in production up and running. Next, the developer would open the code for whatever part of the app they’re working on in their local IDE. Let’s say you’re running an app with many microservices and you need to make changes to the API... You would open the code for the API and type okteto up into the terminal. What happens next feels like magic, but is actually a really cool way to deploy, develop, test, and preview your code.

Running okteto up creates a remote development environment in your Kubernetes cluster with the same configuration as your production app. Your dev environment is moved to the cloud, which frees up resources on your machine. This means a less sluggish computer because the heavy lifting is being done in the cluster, not your individual laptop.

One misconception we hear a lot is the thought that okteto up will deploy your app. This isn’t actually what happens, but we understand why it might feel that way. When working with Docker, if you run docker compose up for example, your code is deployed. With okteto up you’re telling okteto to transform production into development. While a tool like docker-compose is all or nothing, meaning all production or all development, Okteto lets you choose which components are production and which are development.

Okteto takes the full application and then surgically removes and inserts just that piece of the app you’re currently working on. Just one piece and one component at a time. We think that’s pretty cool 😎.

Instant code synchronization using your IDE

As a developer, you already have tools, like an IDE, that you prefer to use. While many dev tools provide their own version of an IDE in order to use their tool, Okteto works with what you already use. Keep your local IDE and okteto up will synchronize your code both ways. Your code runs with your container and all your tools. There’s no need to adopt anything new. You can also define development-time overrides to the original configuration such as environment variables, or a different container image, than what you have in production.

At the end of okteto up you’ll get a remote terminal that you can use to run commands on the particular piece of the app you’re working on. For instance, with our API example, if you run yarn start, your API will be fully integrated with the other production pieces of the app in your development environment, while automatically hot reloading all your local changes. Change code and it reloads instantly, which allows you to go faster and do more.

Okteto synchronizes the code and the process runs in the container, where it inherits the configuration you use in production. This means you can test code in real time, and you’ll know instantly whether what you’ve done will work in production. If it works in Okteto, it works in production. Okteto functions just like your production environment.

Boost your computing power

Computing power is a big deal when you’re working with large apps with tons of microservices. There are many use cases where a lot of computing power is necessary, but one that stands out is machine learning. If you’re working on a machine learning project, you need a computer with a lot of memory and a really good graphics card. These machines are expensive, and if you have several developers working on a project, you’ll need to purchase several expensive computers.

However, another option is to provision a Kubernetes cluster on Google Cloud with the amount of memory you need and a high end graphics card, then run your code on this high end cluster. This allows the company to purchase normal laptops for the team and then scale up or down as needed. Perhaps your team needs more power for a month, so you scale up. If no one is working on code in the evenings, you can scale down at night when you aren’t using the cluster and save money. An individual computer is limited. The cloud is not. That’s why we think it’s really cool to get code in the cloud and off local machines.

Another benefit of cloud computing is the fact that since individual laptops aren’t using so many resources, they don’t have to work as hard, meaning that noisy fan can stop running and the laptop won’t get as hot. Any developer can tell you that while this might sound like a minor benefit, it’s actually a pretty big deal.

Business benefits of Okteto up

Okteto is beneficial for not only the development cycle, but also for your business goals as well. When your developers are able to code quickly without all the headaches that come from waiting to test code, or finding a bug after pushing code to GitHub, you have happier and more confident developers, which means more job satisfaction.

Saving time is also saving money. One of our customers, a large e-commerce company, recently let us know that finding a bug in production took on average a week of developer time to fix. Since the average developer typically makes $12K per month or more, that means each bug in production could be costing you $3-4K minimum. Multiply that by the number of bugs that show up in production on average, and you’ve got quite an expense (and one that could have been completely avoidable).

Instead, if developers are using Okteto in their development cycle, they can find the bug before it hits production, which means way less time troubleshooting and fixing it, plus no down time or lost functionality for your app.

okteto up for everyone

Whether you’re working in the cloud or self-hosted infrastructure, the okteto up command will integrate with your tools. You also don’t need to be on an Okteto account (free or paid) in order to use it. Our okteto up command is open source and available for everyone, whether you use Okteto Cloud, Okteto Enterprise, or any kubernetes cluster.

Another benefit of Okteto is that developers will use their own IDEs on their own local machines. Okteto also works with any cluster and any tool kit. Run it with any language–it pairs with all of them.

Ready to give it a try?

Okteto is a tool for developers and businesses who want a faster and more efficient way to deploy, test, and preview code without waiting to find out if it works in production. Our okteto up command helps developers work with code in development just as if it were in production, saving time and money for the company, and creating happier, more confident developers. If you’re ready to give it a try, check out our open source GitHub repo here. We recommend trying it with our demo Movies App to see the power of Okteto, or you can quickly deploy your own app from a public or private repository.

Happy Coding!

Melissa WilliamsView all posts

Automate Provisioning Any Dev Resource on Any Cloud Provider With Pulumi and Okteto

The Value It is common in today's landscape to build microservices-based applications that leverage resources like RDS databases, storage buckets, etc...

October 19, 2023
Avatar of Arsh SharmaAvatar of Arsh SharmaArsh Sharma

How Developers Can Seamlessly Collaborate When Building Microservice Apps

Building microservices based applications is inherently challenging. Given the multitude of components involved, it is unrealistic to expect any individual...

October 10, 2023
Avatar of Arsh SharmaAvatar of Arsh SharmaArsh Sharma