exit fi echo "start to reload [$app] configmap" kubectl get configmap $app-config -o yaml -n $namespace...echo "---------------------start delete-----------------------------" kubectl delete configmap $app-config...namespace echo "---------------------start create-----------------------------" kubectl create configmap $app-config...--from-file=$app.yaml -n $namespace sleep 1 kubectl get configmap $app-config -o yaml -n $namespace
# ConfigMap Example apiVersion: v1 kind: ConfigMap metadata: name: app-config data: config.json:...mountPath: /etc/config volumes: - name: config-volume configMap: name: app-config
NoSchedule cat <<EOF | kubectl apply -f - apiVersion: v1 kind: PersistentVolume metadata: name: app-config...spec: capacity: storage: 2Gi accessModes: - ReadWriteMany hostPath: path: "/srv/app-config
创建完成数据库集群后,可通过集群内任意节点IP+端口的形式来访问您的应用;如果您配置了负载均衡服务,通过修改app-config配置文件,使用LB的ip +端口的形式进行应用访问: kubectl edit...cm app-config –n qfusion-rds 将proxyServiceType: "nodeport" 字段修改为proxyServiceType: "LoadBalancer" 将clusterServiceType
name: mysql-secret literals: - MYSQL_PASSWD=root123 configMapGenerator: - name: app-config...line to enable packet forwarding for IPv4 net.ipv4.ip_forward=1 kind: ConfigMap metadata: name: app-config
include: "*" cors: allowed-origins: "*" allowed-methods: "*" turbine: app-config
案例: # ConfigMap Example apiVersion: v1 kind: ConfigMap metadata: name: app-config data: config.json...mountPath: /etc/config volumes: - name: config-volume configMap: name: app-config...这个配置将 app-config 的内容注入到 pod 中,使应用程序能够从 /etc/config/config.json 中读取其配置。
使用示例: # ConfigMap Example apiVersion: v1 kind: ConfigMap metadata: name: app-config data: config.json...mountPath: /etc/config volumes: - name: config-volume configMap: name: app-config...这个配置将 app-config 的内容注入到 Pod 中,使得应用程序可以从 /etc/config/config.json 读取其配置。
: CloneSet metadata: ... spec: replicas: 1 template: metadata: annotations: app-config...APP_CONFIG valueFrom: fieldRef: fieldPath: metadata.annotations['app-config
---------------- # 配置信息(ConfigMap对应架构图左侧「配置信息」模块) apiVersion: v1 kind: ConfigMap metadata: name: app-config... env: - name: DB_HOST valueFrom: configMapKeyRef: name: app-config
feign.hystrix.enabled: false 7、config多级目录配置: 服务端svn 路径上配置一级目录: spring.cloud.config.server.svn.uri=svn://ip:port/repos/app-config
存储非敏感配置 创建 app-configmap.yaml,存储前端 API 地址、MySQL 地址等配置: apiVersion: v1 kind: ConfigMap metadata: name: app-config...- name: MYSQL_DATABASE valueFrom: configMapKeyRef: name: app-config...地址 - name: MYSQL_HOST valueFrom: configMapKeyRef: name: app-config...# 对应 Dockerfile 中指定的配置目录 volumes: - name: api-config configMap: name: app-config...- name: VUE_APP_API_URL valueFrom: configMapKeyRef: name: app-config
ports: - containerPort: 8080 envFrom: - configMapRef: name: app-config...ports: - containerPort: 8080 envFrom: - configMapRef: name: app-config
timeout : 2000 starttls: enable : true required : true turbine: app-config
fetch-registry: true service-url: defaultZone: http://localhost:8001/eureka/ turbine: app-config
temp-file 临时文件,job执行过程中产生的文件 --------builder-history 构建历史记录文件 --------job-params 构建过程中传递参数的文件 ------app-config
CRD 创建之后 进入 fluentd Pod 的 Shell,会发现配置发生变化: $ cat fluentd/app-config/fluentd.conf ...
turbine eureka: client: serviceUrl: defaultZone: http://localhost:8800/eureka/ turbine: app-config
persistentVolumeClaim: claimName: test-pvc4.5 配置管理(ConfigMap/Secret)创建 ConfigMap:kubectl create configmap app-config