Allows the user to config remote development settings per component, kubernetes resource and container, so it's easy to start a remote dev session with all the desired options already configured.

dev is an object with keys being component names, and foreach component you can configure many k8s resources. Non deployable components, like DockerImage, InitContainer, SidecarContainer and the GenericComponent cannot have remote dev sessions, so they cannot be used here, and Applications, Services and Databases cannot have configured many k8s resources, as we create only one Deployment or StatefulSet or DaemonSet, and because of this you don't even need to provide the k8s resource kind, name and namespace, only the containers.

Foreach container you can configure the command to run immediately after starting the remote dev session, a list of syncPaths to sync between your local and the container, extra environment variables which will be injected in container when in remote dev, portForwards between your local and the container, and resources if they need to be different in development mode. Any of these are optional, so you can specify only the ones you need.


Please refer to the Debugging locally with port forwarding page for more information about portForwarding.

Instead of providing all these explicit settings for a container, you can configure the remoteDevProfile, which is a name which points to named config, containing the above configuration, and which is located somewhere on your local, in a rdev.yaml, which can also be stored in git.

You can configure only the components and resources you will use more often, and this doesn't mean you cannot start remote development sessions on the other non-configured components or resources.

As you can see in the example below, we allow interpolation expressions in kubernetes resource name and namespace and container command and environment.


  api: # the component name
    - containers:
        api: # the container name
          remoteDevProfile: api_rdev
        log_streamer: # the container name
          remoteDevProfile: logs_rdev
  workers: # the component name
    - containers:
        workers: # the container name
          remoteDevProfile: api_rdev
  helm_component: # the component name
    - kind: Deployment
      name: api-deployment-{{env.unique}}
      namespace: namespace-{{env.unique}}
          command: ['php-fpm']
            - remotePath: /var/www/
              localPath: ~/project
            - "9003<9003"
            - "80>8080"
            VAR: value
            VAR_INTERPOLATED: '{{ env.vars.OTHER_VAR }}'
              memory: 750M
              cpus: '0.15'
              memory: 500M