-
|
Given the following example apiVersion: v1
kind: ConfigMap
metadata:
name: test-config
namespace: default
data:
hello: world
file.conf: |-
key1: value1
key2: value2
key3: value3How can I override a single key's value in the yaml-formatted apiVersion: v1
kind: ConfigMap
metadata:
name: test-config
namespace: default
data:
hello: world
file.conf: |-
key1: new-value1
key2: value2
key3: value3 |
Beta Was this translation helpful? Give feedback.
Answered by
koba1t
Nov 15, 2025
Replies: 1 comment 2 replies
-
|
You can execute it using apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- configmap.yaml
replacements:
- sourceValue: new-value1
targets:
- select:
name: test-config
namespace: default
fieldPaths:
- data.file\.conf.key1 |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
koba1t
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can execute it using
replacementsin the following format.Please use kustomize version
v5.8.0or later.