【发布时间】:2018-11-10 19:13:37
【问题描述】:
我正在尝试使用 Kubernetes(特别是 minikube)部署 OreintDB 集群。我正在使用 StatefulSet,但是,当我在所有 OrientDB 集群配置的 volumeMounts 声明中使用子路径时,不会创建 Pod。虽然我想将所有 configMaps 挂载到一个文件夹中。 ConfigMap 对应于设置 OrientDB 集群所需的多个配置文件。
StatefulSet 如下所示:
volumeMounts:
- name: orientdb-config-backups
mountPath: /orientdb/config
subPath: backups
- name: orientdb-config-events
mountPath: /orientdb/config
subPath: events
- name: orientdb-config-distributed
mountPath: /orientdb/config
subPath: distributed
- name: orientdb-config-hazelcast
mountPath: /orientdb/config
subPath: hazelcast
- name: orientdb-config-server
mountPath: /orientdb/config
subPath: server
- name: orientdb-config-client-logs
mountPath: /orientdb/config
subPath: client-logs
- name: orientdb-config-server-logs
mountPath: /orientdb/config
subPath: server-log
- name: orientdb-databases
mountPath: /orientdb/databases
- name: orientdb-backup
mountPath: /orientdb/backup
虽然,当我删除 StatefulSet 中的所有子路径时,会创建 pod 并将配置文件放入单独的文件夹中。所以 StatefulSet 看起来像这样:
volumeMounts:
- name: orientdb-config-backups
mountPath: /orientdb/config/backups
- name: orientdb-config-events
mountPath: /orientdb/config/events
- name: orientdb-config-distributed
mountPath: /orientdb/config/distributed
- name: orientdb-config-hazelcast
mountPath: /orientdb/config/hazelcast
- name: orientdb-config-server
mountPath: /orientdb/config/server
- name: orientdb-config-client-logs
mountPath: /orientdb/config/client-logs
- name: orientdb-config-server-logs
mountPath: /orientdb/config/server-logs
- name: orientdb-databases
mountPath: /orientdb/databases
- name: orientdb-backup
mountPath: /orientdb/backup
- name: orientdb-data
mountPath: /orientdb/bin/data
这种行为的原因可能是什么?
【问题讨论】:
标签: kubernetes orientdb minikube