I have a ConfigMap as following:
kind: ConfigMap
apiVersion: v1
metadata:
name: health-ip
data:
ip.json: |-
[
1.1.1.1,
2.2.2.2
]
I want to modify/append or patch a small piece of this configuration by adding ip 3.3.3.3
to the ConfigMap so that it becomes:
kind: ConfigMap
apiVersion: v1
metadata:
name: health-ip
data:
ip.json: |-
[
1.1.1.1,
2.2.2.2,
3.3.3.3
]
How can it do this using kubectl patch
or equivalent?