iam*_*nat 6 kubernetes microservices kubernetes-helm
我当然检查过 helm.sh,但乍一看整个设置似乎有点复杂(helm-client 和tiller-server)。在我看来,在大多数情况下,我只需拥有一个 helm-client 就可以逃脱。
这就是我目前所做的
假设我有一个由 3 个服务组成的项目,即。postgres, express, nginx.
我创建了一个名为的目录product-release,如下所示:
product-release/
.git/
k8s/
postgres/
Deployment.yaml
Service.yaml
Secret.mustache.yaml # Needs to be rendered by the dev before use
express/
Deployment.yaml
Service.yaml
nginx/
Deployment.yaml
Service.yaml
updates/
0.1__0.2/
Job.yaml # postgres schema migration
update.sh # k8s API server scritps to patch/replace existing k8s objects, and runs the state change job
Run Code Online (Sandbox Code Playgroud)
通常的 git 东西现在可以应用了。每次进行更改时,我都会更改规范文件,测试它们,编写更新脚本以帮助从上一个版本移动到当前版本,然后提交并标记它。
问题:
helm要有分蘖服务器?在客户端做模板不是更简单吗?当然,如果您想将部署活动与应用程序知识(如机密)分开,模板必须在服务器上进行,否则为什么呢?似乎https://redspread.com/(开源)解决了这个特定问题,但在投入生产之前需要更多的开发 - 至少从我的团队快速浏览来看是这样。
我想,我们现在将坚持将 yaml 文件与已部署的应用程序一起保存在 git 中。
| 归档时间: |
|
| 查看次数: |
2124 次 |
| 最近记录: |