Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
假设 pod 在其规范中都设置了环境变量,如下所示
spec: containers: - name: env-print-demo image: bash env: - name: FOO value: "BAR"
还通过 a ConfigMap(但具有不同的值)注入它,这是要考虑的?
ConfigMap
当一个键存在于多个源中时,与最后一个源关联的值将优先。
覆盖容器规范中定义的环境值
将采用的值是配置映射,因为配置映射将覆盖具有相同键的 env 值