okteto.yml is a manifest format for describing cloud native development environments. It declares the deployment target, the dev container, the working directory and other information required to deploy your cloud native development environment with okteto.
Specifies the kubernetes deployment to swap and the characteristics of your development environment.
tail -f /dev/null).
tail -f /dev/null).
Specifies the destination path for the file synchronization service.
We recommend that this value matches the source code location of your development environment’s Docker image. By doing this, the content of the folder will be copied from your development environment into a volume shared with the file synchronization service, speeding up the initial synchronization process.
true, the changes on your development environment won’t be synchronized back to your local machine. This is disabled by default.
A list of environment variables that will be injected into your development environment. If a variable already exists on your deployment, it will be overridden with the value specified on the manifest.
Environment variables with only a key, or with a value that starts with a
$ sign are resolved to their values on the machine okteto is running on, which can be helpful for secret or machine-specific values.
In addition to the declared variables, okteto will also add an environment variable called
CND_KUBERNETES_NAMESPACE, with the value of your deployment’s namespace.
A list of ports to forward to your cloud native environment. The list should follow the
localPort:remotePort notation and each element should be unique.
Once your environment is up and running, you will be able to access the port directly by using
Common uses of port forwarding are:
- Access a service via
localhostinstead of via an ingress
- Get direct access to a service that’s not exposed via a service (e.g. a queue consumer)
- Connect to a hot reloader via a websocket
- Remote debugging
If Okteto can’t forward a port (typically because they are already taken), an error will be logged in the console.
A key-value object of the scripts that can be executed in your cloud native environment.
Each key in the
scripts object is the name of the script, and it must be unique. The value is the script to be executed.