dashboard 镜像源_Category-SCM-tool

ConfigMaps allow you to decouple configuration artifacts from image content to keep containerized applications portable. This page provides a series of usage examples demonstrating how to create ConfigMaps and configure Pods using data stored in ConfigMaps.

ConfigMaps允许您将配置构件与映像内容解耦,以保持容器化应用程序的可移植性。这个页面提供了一系列使用示例,演示如何使用ConfigMaps中存储的数据创建ConfigMaps和配置Pods。

用kubectl create configmap创建

kubectl create configmap

--from-file

--from-file 可以跟路径,可以跟单个文件,可以多次使用跟多个文件mkdir -p configure-pod-container/configmap/

# Download the sample files into `configure-pod-container/configmap/` directory

wget https://kubernetes.io/examples/configmap/game.properties -O configure-pod-container/configmap/game.properties

wget https://kubernetes.io/examples/configmap/ui.properties -O configure-pod-container/configmap/ui.properties

# Create the configmap

kubectl create configmap game-config --from-file=configure-pod-container/configmap/

kubectl create configmap game-config-2 --from-file=config

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值