Skip to main content
Version: 1.24

Using Okteto as a Developer

Introduction

Welcome to the Okteto Quick Start Guide! This guide will help you, as a developer, get started with Okteto in a few steps. Once your platform team has set up Okteto and configured your account, you can follow this guide to deploy your Development Environments and start coding in no time.

Step 1: Sign In to Okteto

  1. Open your web browser and navigate to your Okteto instance URL. It should look something like https://okteto.example.com
  2. Sign in using the authentication method configured by your organization (e.g., GitHub, SSO).

Step 2: Explore Your Namespace

  • After logging in, you will see your personal Namespace. This Namespace is automatically created by Okteto and is named after your account name or email.
  • Namespaces in Okteto are used to deploy your Development Environments. You can create as many Namespaces as you need by clicking on the “New Namespace” button that appears when you click on the Namespace dropdown in the top left corner.

Step 3: Deploy a Development Environment

  1. Click the Deploy Dev Environment button in the Okteto UI.
  2. The Okteto Catalog will appear. This catalog contains a list of preconfigured applications provided by your organization’s platform team. A dev environment in Okteto is a version of your application deployed to a Namespace which syncs your local code with the code running on the cloud.
  3. From the Okteto Catalog, select the application you want to develop. Okteto will begin deploying the chosen application.
  4. Once the application is deployed, your dev environment is ready. Okteto will create endpoints for all the microservices and external resources (if configured by the platform team) as part of your application and give you the links view them.

Step 4: Install the Okteto CLI

The Okteto CLI is our open-source tool that let's you develop your applications on Okteto.

Installing the Okteto CLI

MacOS / Linux

curl https://get.okteto.com -sSfL | sh

If you need a specific version you can set the OKTETO_VERSION environment variable:

curl https://get.okteto.com -sSfL | OKTETO_VERSION=2.30.0 sh

You can also install it via brew by running:

brew install okteto

Windows

Download https://downloads.okteto.com/cli/stable/okteto.exe and add it to your $PATH.

You can also install it via scoop by running:

scoop install okteto
tip

For updating okteto with scoop, you might need to scoop unhold okteto & scoop update okteto or scoop uninstall okteto & scoop install okteto

Step 5: Configure the Okteto CLI

The first thing you need to do before using the Okteto CLI is to set the Okteto CLI context with your Okteto instance. Open a terminal and point the Okteto CLI to your Okteto instance by running:

okteto context

And then typing in the URL for your Okteto instance when prompted.

You’ll be taken to the browser and asked to authenticate. Once that is done, Okteto CLI is configured and ready to be used with your development environments.

Step 6: Start Your Development Container

  1. Clone the repository of the application you deployed in step 3 to your local machine.

  2. Open the cloned repository in your favorite code editor (Okteto supports any code editor and other tools you prefer).

  3. In the terminal, navigate to the application’s directory.

  4. Start the development container by running:

    okteto up
  5. You will be prompted to select the microservice you want to work on. Choose the appropriate service to proceed.

  6. If you need to work on multiple services simultaneously, you can launch another okteto up session in a different terminal window.

Step 7: Begin Development

  1. Once the development container is up, you will have terminal access inside of the dev container.

  2. Start the development process by executing the appropriate command for your application. For instance, if you're working on the frontend service of a React-based application:

    yarn start

Step 8: Sync Code and View Changes

  • The dev container syncs all your local code changes with the code running on the cloud cluster.
  • Any changes you make locally will be reflected in the endpoints shown in the Okteto UI, allowing you to see your changes in a production-like environment instantly.

Benefits of Using Okteto

  • No Configuration Required: You can start writing code immediately using the pre-configured applications in the Okteto catalog.
  • Resource Efficiency: You are not limited by your local machine’s resources when running resource-intensive services and applications.
  • Immediate Feedback: You can see your changes running in a production-like environment as soon as you write code, without waiting for CI, staging, or test environments.

Next Steps

Dive into learning about Okteto by following our CLI and Dashboard guide here.

Happy coding!