在源代码管理中存储 kubernetes 配置的最佳实践 [英] Best practices for storing kubernetes configuration in source control

查看:24
本文介绍了在源代码管理中存储 kubernetes 配置的最佳实践的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Kubernetes 文档站点的多个位置,他们建议您将配置 YAML 文件存储在源代码管理中,以便于进行版本跟踪、回滚和部署.

In several places on the Kubernetes documentation site they recommend that you store your configuration YAML files inside source control for easy version-tracking, rollback, and deployment.

我和我的同事目前正在尝试决定我们 git 存储库的结构.

My colleagues and I are currently in the process of trying to decide on the structure of our git repository.

  • 我们决定,由于无需更改应用代码即可更改配置,因此我们希望将配置存储在单独的共享存储库中.
  • 我们可能需要在给定环境(集群)中并行运行某些组件的多个版本.这些版本可能有不同的配置.

似乎有很多潜在的变体,而且它们都有缺点.构建此类存储库的公认方式是什么?

There seem to be a lot of potential variations, and all of them have shortcomings. What is the accepted way to structure such a repository?

推荐答案

我认为 helm 将成为标准化的为 kubernetes 集群创建应用程序安装程序的方法.我会尝试创建我自己的图表 参数化我的应用部署.

I think that helm is going to become the standardized way to create an application installer for kubernetes clusters. I'll try to create my own chart to parametrize my app deployments.

这篇关于在源代码管理中存储 kubernetes 配置的最佳实践的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆