When you deploy a Git repository, Okteto Cloud will analyze the source code of your Git repository looking for clues on how to deploy your application.
Okteto will look for deployment manifests in the following order:
- Helm Chart: if your repository has a
helm/chartsdirectory with a
Chart.yamlfile in it, Okteto will detect the chart and run
helm upgrade --installon it.
- Kubernetes manifests folder: if your repository has a
k8sfolder, Okteto will detect it and run
kubectl applyon the folder.
- Kubernetes manifests file: if your repository has a
k8s.yamlfile, Okteto will detect it and run
kubectl applyon the manifest file.
- Okteto Stacks files: if your repository has a
docker-compose.yamlfile, Okteto will detect it and run
okteto stack deploy --buildon this file.
- Okteto Manifest file: if your repository has an
okteto.ymlfile, Okteto will detect it and run
okteto pushon the manifest file.
If Okteto is not able to detect how to deploy your application, or you want to have more control over it, you can customize the Okteto Pipeline by adding a
okteto-pipeline.yml file to the root of your repository.
icon: the icon associated to your application in the Okteto Cloud Dashboard (optional).
deploy: list of commands to deploy your application in your Kubernetes namespace. It is usually a combination of
devs: the paths to the okteto manifests in your Git repository. This is used to fill the hints in the Develop dialog of each service (optional).
Okteto will run an installation job that clones your Git repository, checks out the selected branch, and executes the sequence of
deploy commands. The job will fail if any of the commands in the
deploy list fails.
The installation job will run in an Alpine Linux container with the following tools preinstalled:
The installation job container is automatically configured with credentials to use the above tools on the namespace where your application is deployed.
Are we missing any binaries you use? File an issue here and we will do our best to make it available.
The installation job also populates the following environment variables. You can refer to this in your
deploy commands if needed:
OKTETO_NAMESPACE: the namespace where your application is going to be installed.
OKTETO_GIT_BRANCH: the name of the Git branch currently being deployed.
OKTETO_GIT_COMMIT: the SHA1 hash of the last commit of the branch.
OKTETO_REGISTRY_URL: the url of the Okteto Registry.
BUILDKIT_HOST: the address of the Okteto Cloud buildkit instance. You can use it to build your images with any CLI tool that supports Buildkit builds.