<p>below is the configmap yaml i need to update &quot;mnc-0878787889&quot; ,&quot;mncidn-090876900&quot; , start-date: 2019-06-27T10:00:00 values to &quot;mnc-099999999&quot; ,&quot;mncidn-06666666&quot; , start-date: 2010-06-27T10:00:00 i tried using oc patch couldnot able to update so i need parse yaml and need to update and i cannot use yq is there any other way i can achive this using shell script or python script</p>
<pre><code>apiVersion: v1
data:
  data-provisioning.yaml: |-
    # Copyright (c) 2019-2020 .
    # All Rights Reserved.
    #
    # This software is proprietary information of
    # Development NP.

    datatype-provisioning:
      - company-id:
          - &quot;mnc-0878787889&quot;
          - &quot;mncidn-090876900&quot;
        available-service:
          - &quot;first-package&quot;
        start-date: 2019-06-27T10:00:00
        end-date: 2050-06-27T10:30:00
        propagate-value: true
        info-level: &quot;MEDIUM&quot;
kind: ConfigMap
</code></pre>

sanketh Ranebennur
<p>You can use envsubst. create template yaml like below.</p>
<pre><code>apiVersion: v1
data:
  data-provisioning.yaml: |-
    # Copyright (c) 2019-2020 .
    # All Rights Reserved.
    #
    # This software is proprietary information of
    # Development NP.

    datatype-provisioning:
      - company-id:
          - &quot;mnc-0878787889&quot;
          - &quot;mncidn-090876900&quot;
        available-service:
          - &quot;first-package&quot;
        start-date: ${START_DATE}
        end-date: ${END_DATE}
        propagate-value: true
        info-level: &quot;MEDIUM&quot;
kind: ConfigMap
</code></pre>
<p>Go to shell and export START_DATE and END_DATE with required values
And now run command:</p>
<pre><code>cat &lt;yaml_file_name&gt; | envsubst | kubectl apply -f -
</code></pre>
