Okteto Development Concepts
Advanced CLI Commands
Command | Description |
---|---|
okteto namespace | Allows to you deal with namespaces (create, delete, use). |
okteto exec | |
okteto destroy | Destroys a currently deployed Development Environment |
okteto logs | Used to view the logs of a Development Environment |
okteto endpoints | Used to view your application’s HTTPS URLs automatically generated by Okteto |
okteto doctor | Generates a https://www.okteto.com/docs/reference/okteto-cli/#doctor with the okteto logs for a given development container |
Commonly Used Flags
okteto deploy --dependencies
: Installs dependencies defined in your okteto manifestokteto deploy --build
: Forces a rebuild of the images, incorporating any local changesokteto build --no-cache
: Do not use a cache when building an imageokteto destroy --volumes
: Destroy the persistent volumes created by the development environmentokteto destroy --all
: Destroy all Development Environments, including resources annotated withdev.okteto.com/policy: keep
Important Concepts
Namespaces
Namespaces in Okteto are where Development Environments get deployed. Each developer starts with a personal Namespace which has the same name as their account but can create as many different Namespaces as they need. A Namespace can last for a few weeks for developing a feature, or a couple days for a bug fix. Not only do Namespaces give you an individual separation of context while you are working, but you can also use shared Namespaces to collaborate with you team before anyone pushes to git.
Development Environments
Development Environments enable developers to create applications in the cloud without having to worry about Kubernetes. Developers write code locally on their machine with the tools they love, and Okteto transparently updates their application on a cloud dev environment in real-time as you code!
[Add states of dev environments and how to see their logs. The same applies to each service: how to see the logs, the meaning of the states, how to get the endpoints, …]
Development Containers
Development containers are essential for creating isolated and reproducible development environments. Definitions for the Containers look like docker-compose, but run in Kubernetes. Okteto supports two modes for development containers:
- File Sync Development Mode: Syncs your local changes to your remote development container (default mode).
- Hybrid Development Mode: Runs your service locally and simulates your laptop belonging to the cluster network by using SSH tunnels. This may be helpful if you work with large file sizes in part of your application. Okteto Code Sync does not run while using hybrid mode since the changes are built locally.
Development Images
Development images define the runtime your application runs in during development, ensuring consistency and reproducibility across different stages of your workflow, developers, and different local machines.
Variables
Environment variables are useful for storing user-specific configuration values that are not shared with the rest of the team. They can also be useful when you need to specify ad-hoc variables at the time of deployment.
Okteto Preview Environments
Okteto's Preview Environments automatically generate a unique, shareable version of your application for each pull request, making code reviews, automated end-to-end testing, and stakeholder feedback a breeze. [add language clarifying that platform team needs to set this up]
FAQ
When does okteto deploy
look at the Git repo vs my own code?
okteto deploy
uses the code from your Git repository to deploy the application. After runningokteto up
, Okteto’s file sync will update your changes remotely
What’s the difference between okteto up
and okteto up --deploy
?
okteto up
creates the Development Environment of a service based on its previously deployed version.okteto up --deploy
runs theokteto deploy
section first, picking up any new changes from the repository, and then connects to the Development Environment.
What does okteto deploy --build
do?
- This command forces a rebuild of the images, incorporating any local changes. It rebuilds all images, not just the ones with changes.
What does the --remote
flag do?
- Specifies that certain commands should be executed in the remote Development Environment instead of locally.
Additional Support and Help Getting Started
- Read our Documentation for a more in-depth guide
- Join the Okteto Community for additional help and updates
- Check out our Release Notes for monthly updates to Okteto