Deploy Your Application to Okteto
Okteto builds, deploys, and tests your whole application in your Kubernetes cluster. All it needs is an Okteto Manifest, an okteto.yaml file at the root of your repository. Every developer and every AI agent gets their own copy of the application, with public HTTPS endpoints, and can run the tests against it. This series takes the Movies app, a sample application that already has a complete Okteto Manifest, through each of those steps. To do the same in your own repository, we recommend using an AI agent with the Okteto agent skills.
If your application is defined in a Docker Compose file, follow Develop a Docker Compose application with Okteto instead.
Requirements
- Access to an Okteto instance. To install one, follow the installation guide.
- The Okteto CLI installed, with an Okteto Context configured for your Okteto instance.
- A local copy of the Movies app:
git clone https://github.com/okteto/getting-started
cd getting-started
Run every command in this series from the root of that folder, on the main branch. You don't need to edit any files, except to try hot reload in Develop.
The Movies App
The Movies app has three services, deployed by the Helm chart in the chart folder:
frontend: a React application, built with Vite, that lists movies.api: a Node.js API that reads the movies from MongoDB.mongodb: a MongoDB database that runs the officialmongoimage. Aseedjob loads the movies into it on every deployment.

The Okteto Manifest
This is the okteto.yaml file of the Movies app:
build:
api-dev:
context: api
target: dev
api:
context: api
target: prod
depends_on:
- api-dev
frontend-dev:
context: frontend
target: dev
frontend:
context: frontend
target: prod
depends_on:
- frontend-dev
deploy:
image: alpine/helm:4.3.2
commands:
- name: Helm Install
command: |
helm upgrade --install movies chart \
--set api.image=${OKTETO_BUILD_API_IMAGE} \
--set frontend.image=${OKTETO_BUILD_FRONTEND_IMAGE}
test:
frontend:
image: ${OKTETO_BUILD_FRONTEND_DEV_IMAGE}
context: frontend
caches:
- /root/.npm
commands:
- npm ci
- npm test
e2e:
image: mcr.microsoft.com/playwright:v1.65.1-noble
context: e2e
caches:
- /root/.npm
commands:
- bash run_tests.sh
artifacts:
- test-results
- playwright-report
dev:
api:
image: ${OKTETO_BUILD_API_DEV_IMAGE}
command: node --watch --inspect server.js
sync:
- api:/usr/src/app
persistentVolume:
enabled: false
forward:
- 9229:9229
frontend:
image: ${OKTETO_BUILD_FRONTEND_DEV_IMAGE}
command: npm run dev
sync:
- frontend:/usr/src/app
persistentVolume:
enabled: false
Each page of the series covers one part of that file, in this order:
- Build: the
buildsection, which builds the application and development images of thefrontendandapiservices withokteto build. - Deploy: the
deploysection, which installs the Helm chart withokteto deploy, and the public HTTPS endpoints where Okteto serves the application. - Inspect: a look at the pods, logs, and events of the application with
kubectl. - Test: the
testsection, which runs unit and end-to-end tests withokteto test. - Develop: the
devsection, which letsokteto upreplace theapior thefrontendservice with a Development Container that reloads your changes as you save them.
With the Okteto Manifest of the Movies app in your clone of the repository, you're ready to start. In the first step, build the images of the Movies app with okteto build.