mav*_*ick 3 apache nginx openshift kubernetes configmap
我正在部署一个 Spring Boot 应用程序,并正在考虑外部化配置的各种选项。我开始了解以下选项。
1) ConfigMap
2) properties/yaml file in Git and a process in container to watch for changes and restart the application with new properties if there are any changes.
Run Code Online (Sandbox Code Playgroud)
这不仅与应用程序相关,而且还与其他组件相关,例如代理(apache RP、nginx)/负载均衡器等。
谢谢
两者都是处理配置的不错选择。
Git 方法具有版本化配置的优势,但您需要一个额外的容器来进行编码和维护。
对我来说 configmap 是最好的选择。由于它是 Kubernetes 原生对象,因此不需要 git 存储库或 git 容器,它只是存储和保存在 etcd 中,更易于维护。
此外,有一些开源项目可以帮助您使用 configmap:我使用kube-backup来获得每个配置的版本化副本,并使用configmapcontroller在 configmap 更改时自动推出部署。
| 归档时间: |
|
| 查看次数: |
2143 次 |
| 最近记录: |