我使用configmaps来填充少数服务的配置。但是一个容器有一种奇怪的行为。在实例化时创建了几个目录,然后每2分钟创建一个新目录:
0 drwxr-xr-x 4 root root 90 Feb 15 14:45 ..2982_15_02_14_45_49.335148891
0 drwxr-xr-x 4 root root 90 Feb 15 14:45 ..2982_15_02_14_45_52.091968736
0 drwxr-xr-x 4 root root 90 Feb 15 14:45 ..2982_15_02_14_45_53.797898431
0 drwxr-xr-x 4 root root 90 Feb 15 14:45 ..2982_15_02_14_45_54.421758226
0 drwxr-xr-x 4 root root 90 Feb 15 14:45 ..2982_15_02_14_45_56.209637705
0 drwxr-xr-x 4 root root 90 Feb 15 14:46 ..2982_15_02_14_46_00.970889748
0 drwxr-xr-x 4 root root 90 Feb 15 14:46 ..2982_15_02_14_46_08.301261923
[..]
0 drwxr-xr-x 4 root root 90 Feb 15 15:22 ..2982_15_02_15_22_01.877596759
0 drwxr-xr-x 4 root root 90 Feb 15 15:24 ..2982_15_02_15_24_01.626300874
0 drwxr-xr-x 4 root root 90 Feb 15 15:26 ..2982_15_02_15_26_01.042779297
0 drwxr-xr-x 4 root root 90 Feb 15 15:28 ..2982_15_02_15_28_01.708510604
0 drwxr-xr-x 4 root root 90 Feb 15 15:30 ..2982_15_02_15_30_01.032055163
0 drwxr-xr-x 4 root root 90 Feb 15 15:32 ..2982_15_02_15_32_01.089879198
0 drwxr-xr-x 4 root root 90 Feb 15 15:34 ..2982_15_02_15_34_02.798668133
0 lrwxrwxrwx 1 root root 31 Feb 15 15:34 ..data -> ..2982_15_02_15_34_02.798668133
4 drwxr-xr-x 2 root root 4096 Feb 15 14:45 apps.d
4 drwxr-xr-x 2 root root 4096 Feb 15 14:45 conf.d
0 lrwxrwxrwx 1 root root 21 Feb 15 14:45 fastcgi-params -> ..data/fastcgi-params
0 lrwxrwxrwx 1 root root 20 Feb 15 14:45 frontend.conf -> ..data/frontend.conf
0 lrwxrwxrwx 1 root root 17 Feb 15 14:45 nginx.conf -> ..data/nginx.conf
0 drwxrwxrwt 3 root root 120 Feb 15 14:45 ssl
YAML看起来像这样:
volumeMounts:
[..]
- name: default-nginx-config
mountPath: /etc/nginx
- name: default-nginx-slash-srv
mountPath: /srv
volumes:
[..]
- name: default-nginx-config
configMap:
name: web-frontend-default
items:
- key: fastcgi-params
path: fastcgi-params
- key: frontend.conf
path: frontend.conf
- key: nginx.conf
path: nginx.conf
- key: internal.conf
path: conf.d/internal.conf
- key: common-static-app.conf
path: conf.d/common-static-app.conf
- key: common-backends.conf
path: conf.d/common-backends.conf
- key: common-dynamic-app.conf
path: conf.d/common-dynamic-app.conf
- key: 00-generic.conf
path: apps.d/00-generic.conf
- key: default.conf
path: apps.d/default.conf
- name: default-nginx-slash-srv
configMap:
name: web-frontend-default
items:
- key: probe.html
path: probe.html
当然,非常感谢任何提示: - )
谢谢
答案 0 :(得分:0)
修好:-)
问题是在同一目标目录中安装了两个卷。 k8s似乎不喜欢它。
谢谢Eric!