<p>I need to extract the ca-bundle.crt from the configmap &quot;kubelet-serving-ca&quot; in the namespace &quot;openshift-kube-apiserver&quot; to use it on another configmap and on a pod using the path to the file.</p>
<p>how I can do this?</p>
<p>Thanks!</p>

Syirtblplmj
<p>In order to extract <code>ca-bundle.crt</code> from the config map <code>kubelet-serving-ca</code> in the namespace <code>openshift-kube-apiserver</code> and use it in another configmap, please use the following commands which was provided by “P….” in the comments section.</p>
<pre><code>kubectl get configmap -n openshift-kube-apiserver kubelet-serving-ca  
-o jsonpath='{.data.ca-bundle\.crt}' &gt;  ca-bundle.crt
</code></pre>
<p>If the fields by the jsonpath expression needs to be printed into another file then please use the below command along with the kubectl command.</p>
<pre><code>-o jsonpath-file=&lt;filename&gt; 
</code></pre>
<p>The syntax <code>kubectl get configmap</code> retrieves the value of a key from the specified file and the syntax <code>-o jsonpath=&lt;template&gt;</code>  prints the fields defined in a jsonpath expression.</p>
<p>Please refer to the official <a href="https://kubernetes.io/docs/reference/kubectl/cheatsheet/" rel="nofollow noreferrer">documentation</a> for more information.</p>
