码迷,mamicode.com
首页 > 其他好文 > 详细

使用ksync 加速基于k8s 的应用开发

时间:2018-08-19 22:42:00      阅读:397      评论:0      收藏:0      [点我收藏+]

标签:demo   mkdir   同步   mes   资料   技术分享   column   实现   war   

ksync 实际上实现了类似 docker docker run -v /foo:/bar 的功能,可以加速我们应用的开发&&运行

安装

mac os

curl https://vapor-ware.github.io/gimme-that/gimme.sh | bash

技术分享图片

基本使用

  • 初始化
ksync init
  • 启动
ksync watch &
  • 简单demo
kubectl apply -f https://vapor-ware.github.io/ksync/example/app/app.yaml
  • 创建同步设置
mkdir -p $(pwd)/ksync
ksync create --selector=app=app $(pwd)/ksync /code
  • 转发配置

    实现本地访问

kubectl get po --selector=app=app -o=custom-columns=:metadata.name --no-headers |     xargs -IPOD kubectl port-forward POD 8080:80 &
  • 修改代码
  open ksync/server.py
  • 查看状态
ksync get

生命周期图

技术分享图片

参考资料

https://github.com/vapor-ware/ksync

使用ksync 加速基于k8s 的应用开发

标签:demo   mkdir   同步   mes   资料   技术分享   column   实现   war   

原文地址:https://www.cnblogs.com/rongfengliang/p/9502999.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!