背景
公式のサンプル(Real World Example: Configuring Redis using a ConfigMap)通りに進めた。
ただ、この例だと kustomization.yaml と同じ階層にRedisの設定ファイルを置く必要があって、
やりたいことと違った。
./redis/config/redis.conf とか、好きなところに置きたい。
結論
define-the-key-to-use-when-generating-a-configmap-from-a-file に書いてあるとおりっぽい。
kustomization.yaml
resources:
- redis-pod.yaml
configMapGenerator:
- name: example-redis-config
files:
- redis-config=<<好きなところ>>
その他はまったこと
- Replication ControllerのPodでmountしてたらエラーになった(ReplicaSetを使ったら直った)