<p>I have seen that PATCH request is supported in Kubernetes REST API reference manual from this link: <a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#patch-ingress-v1beta1-networking-k8s-io" rel="nofollow noreferrer">https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#patch-ingress-v1beta1-networking-k8s-io</a></p>
<pre><code>HTTP Request
PATCH /apis/networking.k8s.io/v1beta1/namespaces/{namespace}/ingresses/{name}
</code></pre>
<p>However, I get HTTP 415 Unsupported Media Type error when sending PATCH request to Kubernetes cluster through Kubernetes REST API server in Postman.</p>
<p>I want to update our specified ingress partially outside the cluster. For this purpose, I added a snapshot from my trial.</p>
<p><a href="https://i.stack.imgur.com/UK1kR.png" rel="nofollow noreferrer">Kubernetes REST API server Ingress PATCH Request</a></p>
<p>Our Kubernetes version is:</p>
<pre><code>Client Version: version.Info{Major:&quot;1&quot;, Minor:&quot;15&quot;, GitVersion:&quot;v1.15.3&quot;, GitCommit:&quot;2d3c76f9091b6bec110a5e63777c332469e0cba2&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2019-08-19T11:13:54Z&quot;, GoVersion:&quot;go1.12.9&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;}
Server Version: version.Info{Major:&quot;1&quot;, Minor:&quot;15&quot;, GitVersion:&quot;v1.15.3&quot;, GitCommit:&quot;2d3c76f9091b6bec110a5e63777c332469e0cba2&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2019-08-19T11:05:50Z&quot;, GoVersion:&quot;go1.12.9&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;}
</code></pre>
<p>Patching JSON:</p>
<pre><code>{
   &quot;apiVersion&quot;: &quot;networking.k8s.io/v1beta1&quot;,
   &quot;kind&quot;: &quot;Ingress&quot;,
   &quot;metadata&quot;: {
      &quot;name&quot;: &quot;demo-ingress&quot;,
      &quot;annotations&quot;: {
         &quot;nginx.org/rewrites&quot;: &quot;serviceName=demo-service-235 rewrite=/&quot;
      }
   },
   &quot;spec&quot;: {
      &quot;rules&quot;: [
         {
            &quot;host&quot;: &quot;www.demodeployment.com&quot;,
            &quot;http&quot;: {
               &quot;paths&quot;: [
                  {
                     &quot;path&quot;: &quot;/235/&quot;,
                     &quot;backend&quot;: {
                        &quot;serviceName&quot;: &quot;demo-service-235&quot;,
                        &quot;servicePort&quot;: 8088
                     }
                  }
               ]
            }
         }
      ]
   }
}
</code></pre>
<p>I can use GET, POST, PUT and DELETE successfully, in PATCH request I can't get the same results. What could be the root cause of the problem? What are your ideas?</p>

<p>I solved this same issue by setting the following header:</p>
<pre><code>&quot;Content-Type&quot;: &quot;application/strategic-merge-patch+json&quot;
</code></pre>
