What is the difference between the "okteto deploy" and "okteto pipeline deploy"?

When is okteto deploy recommended, and when should I use okteto pipeline deploy?

Both okteto deploy and okteto pipeline deploy help you automatically deploy a remote development environment.

The major difference between commands is that okteto deploy always uses your local files, while okteto pipeline deploy always uses the files in your repository, ignoring local changes.

okteto deploy (Local Mode)

When you run okteto deploy (or when okteto up triggers deployment for you) in local mode , here’s what happens:

  1. The Okteto CLI fetches the required Okteto context (e.g., secrets, configurations, etc.) if needed
  2. Deploy steps are executed locally using your machine’s tooling and resources
  3. Logs from the process are streamed in real-time to your terminal

okteto deploy (Remote Mode)

When you run okteto deploy (or when okteto up triggers deployment for you) in remote mode, here’s what happens:

  1. The Okteto CLI generates the deploy context . By default, this includes everything in your current folder. You can use an .oktetoignore file to exclude specific files or directories.
  2. The deploy context is sent to your cluster (specifically, to one of the BuildKit pods running in your cluster)
  3. BuildKit starts an isolated job for your deployment, using the image defined in your Okteto manifest. If no image is specified, a default Okteto image is used
  4. The Okteto CLI fetches the required Okteto context (e.g., secrets, configurations, etc.) if needed
  5. Okteto executes the deploy steps inside the isolated job (all steps share the same file system)
  6. Logs from the job are streamed in real-time to your terminal

okteto pipeline deploy

When you run okteto pipeline deploy, the process looks slightly different:

  1. The Okteto CLI sends a request to the Okteto API in your cluster to schedule the deployment job. This includes the repository URL, branch, and any deployment variables
  2. The Okteto API schedules an installer job (a Kubernetes job) in your cluster, using the image defined in your Okteto Manifest. If no image is specified, the default Okteto image is used
  3. The installer job clones the specified repository and fetches the required Okteto context (e.g., secrets, configurations, etc.) into the job environment
  4. The deploy steps are executed within the installer job
  5. Logs are streamed to your terminal in real-time or displayed in the Okteto UI
  6. Notes: okteto pipeline deploy ignores all local changes. The deployment is based solely on the state of the repository branch. This is the equivalent of deploying from the UI.

Key Differences

  1. okteto deploy (Remote Mode): Runs deployment in a BuildKit-powered Kubernetes job within your cluster using your local changes
  2. okteto deploy (Local Mode): Runs deployment locally on your machine
  3. okteto pipeline deploy **: Runs deployment through an API-triggered Kubernetes job based on repository state, ignoring local changes