: How can I replace a garden bonsai local mode con...
# 🤖|ask-kapa
w
@microscopic-river-74022 : How can I replace a garden bonsai local mode configuration with reverse port forwarding with an equivalent sync configuration for garden 0.14?
m
Please stand by @worried-salesclerk-16508 as I search the knowledge base. I normally take about 15 seconds or so. :wave:
---------------------- Garden Bonsai's local mode, which uses reverse port forwarding to connect a local application to a Kubernetes cluster, is deprecated and will be removed in Garden 0.14. The official recommendation is to use sync mode instead, or consider third-party tools like mirrord or telepresence for similar workflows. However, the knowledge sources do not provide a direct, step-by-step migration guide from local mode (with reverse port forwarding) to sync mode. They do clarify that sync mode is the intended replacement and provide references to the code synchronization guide for details on configuring sync mode. Here’s what you can do based on the available information: 1. Remove the localMode configuration from your module or deploy action, as this will no longer be supported in 0.14. 2. Configure code synchronization using the
paths
and
mode
fields in your module (e.g.,
container
,
helm
, or
jib-container
). This will sync your local code to the running container in the cluster, allowing you to develop against a live Kubernetes workload. 3. Expose ports as needed using standard Kubernetes service or ingress configurations, since reverse port forwarding via local mode will not be available. Example sync configuration:
Copy code
yaml
paths:
  - source: .
    target: /app
    mode: one-way-safe
    exclude:
      - node_modules
      - .git
This configuration will sync your local directory to
/app
in the container, using the
one-way-safe
mode. You should adjust the
target
path and
exclude
patterns as needed for your project.
Note: If you require the ability to run your application locally while routing cluster traffic to it (as local mode did), you may need to use [mirrord]() or [telepresence]() as suggested in the deprecation guide, since sync mode only synchronizes code and does not provide reverse port forwarding or proxying capabilities. For more details, see the [Deprecations and updating to Cedar > Local mode]() and the [Code Synchronization guide](). I'm sorry, but the knowledge sources do not provide a direct, automated migration path from local mode with reverse port forwarding to sync mode. You will need to adapt your workflow to use code synchronization and standard Kubernetes networking, or use a third-party tool for advanced proxying needs. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
message has been deleted