<p>I have a service running in namespace istio-system , I want to connect it with pod in different namespace say default . My cluster is running on minikube . How to do the same ?
I tried myService.istio-system.svc.cluster.local , but it didnot worked and from where its picking this i.e from which configuration file . I know in normal k8 cluster but not in minikube
Any help would be appreciated</p>
<h3>Added by BMW</h3>
<p>The user in fact is asking a <a href="https://meta.stackexchange.com/questions/66377/what-is-the-xy-problem">XY Problem</a></p>
<p>Here is the real question, he put in comment.</p>
<p>I want to make use of kubectl port forwarding technique to forward traffic from external world to service running inside minikube so that I can access it from outside I am trying below command :</p>
<pre><code>kubectl port-forward --address 0.0.0.0 svc/kiali.istio-system.svc.cluster.local 31000 31000 
Error from server (NotFound): services &quot;kiali.istio-system.svc.cluster.local&quot; not found

</code></pre>

<p>Realized the user is asking <a href="https://meta.stackexchange.com/questions/66377/what-is-the-xy-problem">XY Problem</a></p>
<p>I put the answer here:</p>
<pre><code>kubectl -n istio-system port-forward --address 0.0.0.0 svc/kiali 31000 31000 
</code></pre>
<p>with <code>-n istio-system</code>, you can nominiate the namespace you are working on, and no need care of its domain name postfix.</p>
<p>Here is the original answer, but still useful for some use cases.</p>
<p>Please reference this:<a href="https://i.stack.imgur.com/jhLGL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jhLGL.png" alt="enter image description here" /></a></p>
<p>So in your case, if cross namespace, you have to use below names:</p>
<pre><code>&lt;service_name&gt;.&lt;namespace&gt;
&lt;service_name&gt;.&lt;namespace&gt;.svc
&lt;service_name&gt;.&lt;namespace&gt;.svc.cluster.local
</code></pre>
<p>svc is for service, pod is for pod.</p>
<p>If you need double check the last two parts, use <code>CoreDNS</code> as sample, check its configmap:</p>
<pre><code>master $ kubectl -n kube-system get configmap coredns -o yaml
apiVersion: v1
data:
  Corefile: |
    .:53 {
        errors
        health
        ready
        kubernetes cluster.local in-addr.arpa ip6.arpa {
           pods insecure
           fallthrough in-addr.arpa ip6.arpa
           ttl 30
        }
        prometheus :9153
        forward . /etc/resolv.conf
        cache 30
        loop
        reload
        loadbalance
    }
kind: ConfigMap
metadata:
  creationTimestamp: &quot;2020-01-28T11:37:40Z&quot;
  name: coredns
  namespace: kube-system
  resourceVersion: &quot;179&quot;
  selfLink: /api/v1/namespaces/kube-system/configmaps/coredns
  uid: 0ee90a0b-6c71-4dbf-ac8a-906a5b37ea4f
</code></pre>
<p>that's the configuration file for CoreDNS, and it is set <code>cluster.local</code> as port of full DNS name.</p>
