0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

kustomizeのconfigMapGeneratorでファイルを設置する

Last updated at Posted at 2019-04-26

背景

公式のサンプル(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を使ったら直った)
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?