LoginSignup
1
0

More than 1 year has passed since last update.

kubectlのconfigmapを更新するコマンド

Last updated at Posted at 2022-03-08

kubectlでのconfigmapは更新コマンドなくて、
いちいちDeleteUpdateしてたら面倒くさいし、
削除したら差分とれないし
なんとか上手い具合にならないかと思って色々調べてたら
--save-config --dry-run=client -o yaml オプションをつけてyamlを生成し
kubectl apply に渡せば良い感じに更新できました。

以下はConfigmap作成の例です。

kubectl create configmap nginx-server-config --from-file=./conf.d \
  --save-config --dry-run=client -o yaml | kubectl apply -f -
1
0
1

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
1
0