k8sync
v2.2.0
Published
Watch and sync local files to kubernetes pods using watchman and rsync
Readme
k8sync
Watch and sync local files to kubernetes pods using watchman and rsync.
Heavily inspired by ksync.
Work In Progress
WARNING: Only meant to be used in development clusters - anyone with access to the DaemonSet pods have write access to all overlay2 filesystems, on all cluster nodes.
Getting started
Dependencies
Install k8sync
npm -g install k8syncConfigure k8sync for project
Create a k8sync.yaml in your project root.
namespace: mynamespace
daemonSetNamespace: kube-system
sync:
api:
localPath: api
containerPath: /src
podSelector:
labelSelector: 'app=myapp-api'
excludeDirs:
- node_modules
webapp-poller:
localPath: webapp
containerPath: /src
podSelector:
labelSelector: 'app=myapp-webapp'
excludeDirs:
- node_modulesInstall cluster-side components
k8sync cluster:initWatch and sync local files to cluster
k8sync syncRetart containers while retaining synced files
k8sync restart apiRemove cluster-side components
k8sync cluster:clean