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