Skip to content

Some simple tooling for a fast build, run, debug cycle on k8s

License

Notifications You must be signed in to change notification settings

runeb-wombo/k8s-rsync

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Watch files and rsync to k8s pods automatically


Full Tutorial

https://www.izumanetworks.com/blog/use-rsync-with-k8s/


watch-krsync.sh

This script will allow you to watch a local file system on your development machine, with it automatically syncing to a pod.

Generally, the form is:

watch-krsync.sh PODNAME /local/path:/remote/path [/another/local:/another/remove]..

for instance:

% kubectl get pods
NAME                                 READY   STATUS      RESTARTS   AGE
debug-pod                            1/1     Running     0          18d
...
website-77ddc857cd-f2t99             1/1     Running     0          10h

%  ./watch-krsync.sh website-77ddc857cd-f2t99 ~/work/website/public:/www/public

Would watch ~/work/website/public and sync it to /www/public in the website-77ddc857cd-f2t99 pod. Run the command in a separate terminal during active development. Multiple directories can be watched, just by adding pairs of LOCAL:REMOTE arguments at the end.

Prerequisites

Pod:

  • Must have rsync installed

Dev machine:

About

Some simple tooling for a fast build, run, debug cycle on k8s

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%