<p>I have 2 helm deployments (node-app-blue-helm-chart node-app-green-helm-chart ) and my ingress resource is seperate and like this:</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: ingress-resource
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/ssl-redirect: &quot;false&quot;
spec:
  rules:
  - http:
      paths:
      - path: /
        backend:
          serviceName: node-app-blue-helm-chart
          servicePort: 80
</code></pre>
<p>Tried to patch ingress resource with following command:</p>
<pre><code>kubectl patch ingress ingress-resource --type=json \
  -p='[{&quot;op&quot;: &quot;replace&quot;, &quot;path&quot;: &quot;/spec/rules/0/http/paths/0/backend/serviceName&quot;, &quot;value&quot;:&quot;node-app-green-helm-chart&quot;}]'
</code></pre>
<p>Returns no change:</p>
<pre><code>ingress.networking.k8s.io/ingress-resource patched (no change)
</code></pre>
<p>Describing resource:</p>
<pre><code>$ kubectl describe ingress ingress-resource
Name:             ingress-resource
Namespace:        default
Address:          -----
Default backend:  default-http-backend:80 (10.72.0.6:8080)
Rules:
  Host        Path  Backends
  ----        ----  --------
  *           
              /   node-app-blue-helm-chart:80 (10.72.0.46:80)
Annotations:  kubernetes.io/ingress.class: nginx
              nginx.ingress.kubernetes.io/ssl-redirect: false
Events:       &lt;none&gt;
</code></pre>
<p>What is missing?</p>

bcan
<p>serviceName is not the recent representation. Changing it to service/name fixed problem.</p>
<pre><code>$ kubectl patch ingress ingress-resource --type=json \
  -p='[{&quot;op&quot;: &quot;replace&quot;, &quot;path&quot;: &quot;/spec/rules/0/http/paths/0/backend/service/name&quot;, &quot;value&quot;:&quot;node-app-green-helm-chart&quot;}]'
ingress.networking.k8s.io/ingress-resource patched
</code></pre>
