<p>I i'm making Kubernetes HTTP Request
GET /apis/apps/v1/namespaces/{namespace}/deployments/{name}</p>

<p>This gives response in json but i want response in json.</p>

<p>Does Kubernetes give response in yaml? if yes, let me know how to do it?</p>

Venky Ohana
<p>When running curl requests you can tell api-server to send you yaml formated output by setting <code>Accept: application/yaml</code> header. Take a look at example below:</p>

<pre><code>curl --header "Accept: application/yaml" "/apis/[...]"
</code></pre>

<p>Or you can also use some external tool to convert from json to yaml, e.g. <code>yq</code>:</p>

<pre><code>curl "/apis/[...]" | yq -y .
</code></pre>

<p>where <code>-y</code> stands for yaml output.</p>
