Skip to main content
Version: 1.28

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 pre-configured 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.

Follow the Okteto CLI installation steps before continuing this guide.

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 (replace https://okteto.example.com with your Okteto instance URL):

okteto context use https://okteto.example.com

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 Development Container.

  2. From the terminal, execute the appropriate command to start your application. For instance, if you're working on the frontend service of a React-based application:

    yarn start

Step 8: Sync Code, Debug and View Changes

  • The Development Container syncs all your local code changes with your application running on Okteto.
  • Your code is executing in Okteto, but you can debug it and add breakpoints from your favorite IDE without any extra tools
  • 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.

If your application doesn't have an Okteto Manifest yet, follow this tutorial to deploy your first app to Okteto.

Happy coding!