7

k8s 生产配置文件以挂载形式好,还是直接打包的时候打到镜像之中?

 2 years ago
source link: https://www.v2ex.com/t/793761
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
k8s 生产配置文件以挂载形式好,还是直接打包的时候打到镜像之中?

V2EX  ›  Kubernetes

k8s 生产配置文件以挂载形式好,还是直接打包的时候打到镜像之中?

  dunhanson · 31 分钟前 · 243 次点击

k8s 生产配置文件以挂载形式好,还是直接打包的时候打到镜像之中?

打到镜像里面就做到真正的可以回滚版本

挂载的话修改配置文件就不需要重新构建一边镜像

8 条回复    2021-08-05 09:45:05 +08:00

arischow

arischow   29 分钟前 via iPhone

啊? ConfigMap ?

arischow

arischow   28 分钟前 via iPhone

实际应用中打到镜像也不是不行,如果你有一个比较好的措施去管理 single source of truth,何乐而不为

star7th

star7th   26 分钟前

读取环境变量更好一点吧。

qping

qping   22 分钟前

我一般是放 configmap, 各种服务都可以用一套配置,管理起来挺方便.
你打到镜像里面,哪天要换个库,改个配置,还得再打一次镜像,不麻烦么

37Y37

37Y37   16 分钟前

配置存配置中心,启动的时候自动加载

777777

777777   15 分钟前

configmap,挂载好

dingyaguang117

dingyaguang117   13 分钟前

为什么不用配置中心,Apollo 之类的

fuis

fuis   7 分钟前

ConfigMap

关于   ·   帮助文档   ·   FAQ   ·   API   ·   我们的愿景   ·   广告投放   ·   感谢   ·   实用小工具   ·   3528 人在线   最高记录 5497   ·  

创意工作者们的社区

World is powered by solitude

VERSION: 3.9.8.5 · 15ms · UTC 01:52 · PVG 09:52 · LAX 18:52 · JFK 21:52
♥ Do have faith in what you're doing.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK