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.

Cloud Run for AnthosでConfigMapを使用する

0
Posted at

Cloud Run for AnthosでConfigMapを使用する方法について記載します。

マニュアル
https://cloud.google.com/run/docs/configuring/using-configmaps?hl=ja

Consoleで指定する場合

Advanced settings > VARIABLES & SECRETS > ConfigMapsで REFFERENCE A CONFIGMAPからconfigmapを選択する

image.png

VolumeとしてMountするか環境変数として読み込むかを指定する。

image.png

Mount Pathを指定する。
image.png

gcloud コマンドで指定する場合

--set-config-maps=[KEY=VALUE,…] で指定することができる。
Volume Mountする場合は、KEYがmount pointでvalueは、ConfigMapの名称を指定する。

gcloud run deploy sample \
--image=docker.pkg.dev/cloudrun/container/hello \
--set-config-maps=/opt=sample-config, \
--platform=gke \
--cluster=cluster-1 --cluster-location=asia-northeast1-a --namespace=default \
--project=my-project
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?