https://github.com/skalar/k8sync
Watch and sync local files to kubernetes pods using watchman and rsync
https://github.com/skalar/k8sync
Last synced: about 2 months ago
JSON representation
Watch and sync local files to kubernetes pods using watchman and rsync
- Host: GitHub
- URL: https://github.com/skalar/k8sync
- Owner: Skalar
- Created: 2018-09-10T19:00:46.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-02-21T09:58:07.000Z (over 6 years ago)
- Last Synced: 2025-04-11T05:39:47.511Z (about 2 months ago)
- Language: TypeScript
- Homepage:
- Size: 135 KB
- Stars: 5
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# k8sync
Watch and sync local files to kubernetes pods using watchman and rsync.
Heavily inspired by [ksync](https://github.com/vapor-ware/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
* [NodeJS](https://nodejs.org/en/)
* [watchman](https://facebook.github.io/watchman/docs/install.html)
* [rsync >= 3.0.0](https://rsync.samba.org/)### Install k8sync
```shell
npm -g install k8sync
```### Configure k8sync for project
Create a `k8sync.yaml` in your project root.
```yaml
namespace: mynamespace
daemonSetNamespace: kube-systemsync:
api:
localPath: api
containerPath: /src
podSelector:
labelSelector: 'app=myapp-api'
excludeDirs:
- node_moduleswebapp-poller:
localPath: webapp
containerPath: /src
podSelector:
labelSelector: 'app=myapp-webapp'
excludeDirs:
- node_modules
```### Install cluster-side components
```shell
k8sync cluster:init
```### Watch and sync local files to cluster
```shell
k8sync sync
```### Retart containers while retaining synced files
```shell
k8sync restart api
```### Remove cluster-side components
```shell
k8sync cluster:clean
```