Realtime sync k8s pod with Okteto

Syncing local code

In this tutorial, I will show you how to sync code with Okteto in action.

  1. Install Okteto on your local machine.
  2. Go to the root of your project and initialize an okteto.xml file. The content looks like this for me. Since I am working with PHP the configuration looks somewhat similar regardless of the language you work with.
name: api
namespace: "staging-namespace"
command: "php-fpm"
context: "staging-server"
container: php
- .:/var/www/html
- $HOME/.composer:/root/.composer
enabled: false


Okteto is not the only tool that is capable of doing this there are lot more tools that do similar things as Okteto does. But the main purpose here is to make the feedback loop shorter by syncing code to a remote server.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store