tall-greece-9831011/25/2022, 5:47 PM
curved-intern-9122111/28/2022, 12:54 PM
tall-greece-9831011/29/2022, 10:15 AM
cold-jordan-6875311/30/2022, 9:40 AM
tall-greece-9831011/30/2022, 12:18 PM
big-spring-1494511/30/2022, 5:58 PM
curved-intern-9122112/01/2022, 11:08 AM
brief-restaurant-6367912/01/2022, 5:11 PM
yaml services: devMode: command: - "/bin/sh" - "-c", - "watchexec -r -e java --debounce 1000 -- ./compile-and-run-my-code.sh # Tweak debounce depending on how slow the compile-and-run script is
process in the remote container watches for those changes and responds to them, e.g. by compiling your code and then restarting your server. - You can use the
flag so that it has time to compile and restart between changes. You may also want to tweak liveness probes here if it takes a long time for the server to restart, so that K8s doesn't evict the pod in the meantime.
tall-greece-9831012/03/2022, 5:41 PM
millions-family-7794001/08/2023, 8:52 PM
curved-intern-9122101/09/2023, 12:03 PM
quaint-dress-83101/09/2023, 3:16 PM
. Then you'd set up your sync folders between your local environment and remote environment. I do this with Python in this video:
millions-family-7794001/09/2023, 5:04 PM
quaint-dress-83101/09/2023, 5:07 PM
ancient-diamond-8001101/11/2023, 3:48 PM
on it, and a separate dockerfile for the release deployment. let me know if this would work for you or if you need additional help!
millions-family-7794001/16/2023, 10:23 AM
tall-greece-9831001/20/2023, 8:36 AM
does things: if there was a way to detect if devMode is active for a service, then one could use a conditional for the image, so that it uses a separate dev image (with all the tooling required for that), that allows sync'ing files and all that, while not needing to touch the prod image (that shouldn't contain all that kind of stuff). e.g. we could have two container builds that a helm module depends on (conditionally via template ternary test on devMode being active or not). one is a devMode one and a standard "deploy" one. then in the service we can again use a ternary conditional to specify the image used for the service etc. Is there already a way to detect in a template if devMode is active? That'd be a killer addition I think.
(https://kubefwd.com/) into the picture. It can even be started/stopped as part of the workflow or similar to ensure that at the point where the local mode service starts the local machine is able to access all DNS names and service ports just as if it had been running within the k8s cluster. This is similar to how one would use
, but I believe easier to include in a smooth workflow since you don't need to know the name of any pods etc. Rely on
for the reverse port forwarding of traffic FROM cluster TO local service, and on kubefwd for portforwarding of traffic FROM local service TO cluster.