<p>Are the any kubectl commands available in order to interact with ingress?</p>

<p>The desired outcome would be to temporary change the service which a host is mapped and the revert by using kubectl.</p>

<p>My goal is to avoid the using the edit option of kubectl and have a workaround by using something close to the set command.</p>

<p><strong>EDIT</strong></p>

<p>The goal was to simulate green blue deployment in an automated environment using ingress. Kubectl does not support updating the values of ingress or the services therefore 'kubectl edit' or 'kubect apply' has to be used.</p>

gkatzioura
<p>You can't manage Ingress backends directly with Kubectl. 
What I suggest to you is to deploy your two deployment with labels : </p>

<ul>
<li>deploy01 - blue</li>
<li>deploy02 - green</li>
</ul>

<p>Expose Blue with a service/ingress.</p>

<p>When you want to migrate from blue to green, simply edit your Service component to point to the green deployment like : </p>

<pre><code>kubectl edit service myservice
</code></pre>

<p>Replace "blue" by "green" and Here we are, Your ingress controller will change his backend to the Green's ones. </p>
