大网数据广告活动
服务器运维问答

Docker/Kubernetes change volume data without restarting container

· 52CE 我爱测

We have application which is using some additional files from one catalog. Right now when some of this file is changed we need to log in to each application container clone repository and copy files to catalog. We want to automat…

问题原文

原帖链接 · user3069488 · CC BY-SA 3.0

We have application which is using some additional files from one catalog. Right now when some of this file is changed we need to log in to each application container clone repository and copy files to catalog. We want to automate this process without rebuilding/restarting whole application.

Is there some native approach how to handle such thing?

I was thinking about using docker volume which is use/share by all containers and when is such need to rebuild just volume. Will it work as im expecting without restarting containers which are using this volume?

Or maybe there is some better solution for such case eg like NFS volumes?

已采纳解答

原帖链接 · Radek 'Goblin' Pieczonka · CC BY-SA 3.0

Have a look at PersistentVolume Access Modes matrix. What you are looking for is either ROX or RWX support. ROX is more common but you'll need some side process to update the content. RWX give you full access to change content on these volumes from any pod.

ROX support is by definition much wider, as you do not need distributed write locking, so if you can handle that (and I think that in your case it is quite probable) that would be the best choice for a shared PV where your changing data can be stored.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2018-01-11)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。