<p>I have setup VirtualService and ServiceEntry for a few services outside my kubernetes cluster.<br />
My apps can access them without any issue.<br />
I was wondering if it would be somehow possible to perform a port-forward to these services via <code>kubectl</code>, similar to how you would port-forward into a pod or a service.</p>
<p>This works:<br />
<code>kubectl port-forward service/my-service 8080:80</code></p>
<p>This Doesn't:<br />
<code>kubectl port-forward vs/my-virtual-service 6379:6379</code></p>
<p>I get:</p>
<blockquote>
<p>error: no kind &quot;VirtualService&quot; is registered for version
&quot;networking.istio.io/v1beta1&quot; in scheme
&quot;k8s.io/client-go/kubernetes/scheme/register.go:72&quot;</p>
</blockquote>

Alex Weitz
<p>Port forwarding can be done to istio-ingressgateway service but not to virtual service. More details of service and virtual service of istio are in their <a href="https://istio.io/latest/docs/reference/config/networking/virtual-service/" rel="nofollow noreferrer">official documentation</a></p>
<p>One more option is to change istio-ingressgateway service to NodePort</p>
<pre><code>kubectl edit svc istio-ingressgateway -n istio-system
</code></pre>
