ksync speeds up developers who build applications for Kubernetes. It transparently updates containers running on the cluster from your local checkout. This enables developers to use their favorite IDEs, such as Atom or Sublime Text to work from inside a cluster instead of from outside it. There is no reason to wait minutes to test code changes when you can see the results in seconds.
If you've been wanting to do something like docker run -v /foo:/bar with Kubernetes, ksync is for you!
This scenario will walk you through:
- Setting up a kubernetes cluster.
- Getting ksync installed and running.
- Fetching files from a container running on the cluster.
- Updating the container by editing files locally.
Step 1 - Setup the cluster
Start the cluster via. minikube
Add the demo app to your cluster. This is a simple python app made with flask. Because ksync moves files around, it would work for any kind of data you'd like to move between your local system and the cluster.
kubectl apply -f https://ksync.github.io/ksync/example/app/app.yaml
Make sure that the app is ready and running.
kubectl get po --selector=app=app
Forward the remote port to your local system.
kubectl get po --selector=app=app -o=custom-columns=:metadata.name --no-headers | xargs -IPOD kubectl port-forward POD 8080:80 &
Take a look at what the app's response is now. You'll see all the files in the remote container, their modification times and when the container was last restarted.