<p>I'm pretty well versed in Docker, but I haven't got Minikube/K8s working yet. I first tried setting up artifactory-oss in helm but failed to connect to the LoadBalancer. Now I'm just trying the <a href="https://minikube.sigs.k8s.io/docs/start/" rel="nofollow noreferrer">basic hello-minikube NodePort setup as a sanity check</a>.</p>
<p>When I do <code>minikube start</code>, it starts up minikube in Docker:</p>
<pre><code>&gt; docker ps
CONTAINER ID   IMAGE                                 COMMAND                  CREATED       STATUS          PORTS                                                                                                                                  NAMES
ebabea521ffe   gcr.io/k8s-minikube/kicbase:v0.0.18   &quot;/usr/local/bin/entr…&quot;   2 weeks ago   Up 36 minutes   127.0.0.1:49167-&gt;22/tcp, 127.0.0.1:49166-&gt;2376/tcp, 127.0.0.1:49165-&gt;5000/tcp, 127.0.0.1:49164-&gt;8443/tcp, 127.0.0.1:49163-&gt;32443/tcp   minikube
</code></pre>
<p>So Minikube only has ports 4916(3/4/5/6/7) open?</p>
<p>So I installed hello-minikube:</p>
<pre><code>&gt; kubectl create deployment hello-minikube --image=k8s.gcr.io/echoserver:1.4
&gt; kubectl expose deployment hello-minikube --type=NodePort --port=8080



&gt; minikube ip
192.168.49.2


&gt; minikube service list
|----------------------|------------------------------------|--------------|---------------------------|
|      NAMESPACE       |                NAME                | TARGET PORT  |            URL            |
|----------------------|------------------------------------|--------------|---------------------------|
| default              | hello-minikube                     |         8080 | http://192.168.49.2:30652 |
| default              | kubernetes                         | No node port |
| kube-system          | ingress-nginx-controller-admission | No node port |
| kube-system          | kube-dns                           | No node port |
| kubernetes-dashboard | dashboard-metrics-scraper          | No node port |
| kubernetes-dashboard | kubernetes-dashboard               | No node port |
|----------------------|------------------------------------|--------------|---------------------------|

&gt; minikube service --url hello-minikube
http://192.168.49.2:30652
</code></pre>
<p>I check firewall, and it has the ports I've opened:</p>
<pre><code>&gt; sudo firewall-cmd --list-all
public (active)
  target: default
  icmp-block-inversion: no
  interfaces: ens192
  sources:
  services: dhcpv6-client http https ssh
  ports: 8000-9000/tcp 30000-35000/tcp
  protocols:
  masquerade: no
  forward-ports:
  source-ports:
  icmp-blocks:
  rich rules:

&gt; kubectl get pods
NAME                              READY   STATUS    RESTARTS   AGE
hello-minikube-6ddfcc9757-hxxmf   1/1     Running   0          40m

&gt; kubectl get svc
NAME             TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)          AGE
hello-minikube   NodePort    10.97.233.42   &lt;none&gt;        8080:30652/TCP   36m
kubernetes       ClusterIP   10.96.0.1      &lt;none&gt;        443/TCP          19d

&gt; kubectl describe services hello-minikube
Name:                     hello-minikube
Namespace:                default
Labels:                   app=hello-minikube
Annotations:              &lt;none&gt;
Selector:                 app=hello-minikube
Type:                     NodePort
IP Families:              &lt;none&gt;
IP:                       10.97.233.42
IPs:                      10.97.233.42
Port:                     &lt;unset&gt;  8080/TCP
TargetPort:               8080/TCP
NodePort:                 &lt;unset&gt;  30652/TCP
Endpoints:                172.17.0.6:8080
Session Affinity:         None
External Traffic Policy:  Cluster
Events:                   &lt;none&gt;
</code></pre>
<p>I've tried every IP and port combination, <code>minikube tunnel</code>, and <code>kube proxy</code> and a few other things but I just can't find any port to access this service from another machine.  I can't get an 'External-IP'.  nmap finds a bunch of ports if i search from the machine itself.</p>
<pre><code>&gt; nmap -p 1-65000 localhost

Starting Nmap 6.40 ( http://nmap.org ) at 2021-04-26 15:16 SAST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.0013s latency).
Other addresses for localhost (not scanned): 127.0.0.1
Not shown: 64971 closed ports
PORT      STATE SERVICE
22/tcp    open  ssh
25/tcp    open  smtp
80/tcp    open  http
111/tcp   open  rpcbind
443/tcp   open  https
631/tcp   open  ipp
3000/tcp  open  ppp
5000/tcp  open  upnp
5050/tcp  open  mmcc
8060/tcp  open  unknown
8080/tcp  open  http-proxy
8082/tcp  open  blackice-alerts
9090/tcp  open  zeus-admin
9093/tcp  open  unknown
9094/tcp  open  unknown
9100/tcp  open  jetdirect
9121/tcp  open  unknown
9168/tcp  open  unknown
9187/tcp  open  unknown
9229/tcp  open  unknown
9236/tcp  open  unknown
33757/tcp open  unknown
35916/tcp open  unknown
41266/tcp open  unknown
49163/tcp open  unknown
49164/tcp open  unknown
49165/tcp open  unknown
49166/tcp open  unknown
49167/tcp open  unknown
</code></pre>
<p>But if I scan that machine from another machine on the network:</p>
<pre><code>&gt; nmap -p 1-65000 10.20.2.26

Starting Nmap 6.40 ( http://nmap.org ) at 2021-04-26 15:23 SAST
Nmap scan report for 10.20.2.26
Host is up (0.00032s latency).
Not shown: 58995 filtered ports, 6001 closed ports
PORT     STATE SERVICE
22/tcp   open  ssh
80/tcp   open  http
443/tcp  open  https
8060/tcp open  unknown
</code></pre>
<p>those ports don't seem to be accessible.  Any ideas?</p>
<p>-- EDIT 1:
The sys admin says only <code>10.20.x.x</code> IPs will resolve.  So <code>192.168.x.x</code> and <code>10.96.x.x</code> won't work.  So perhaps this <code>--service-cluster-ip-range</code> field is what I'm looking for.  I will try it out next.</p>

<p>I faced a similar issue that I was banging my head upon, <a href="https://kubernetes.io/docs/tasks/access-application-cluster/port-forward-access-application-cluster/" rel="nofollow noreferrer">this documentation</a> was quite helpful. In my case I was accessing a Jenkins build server running in a Kubernetes cluster via minikube on my Mac OS.</p>
<p>I followed steps to get this port forwarding working:</p>
<ol>
<li><p>Confirm the port of your pod :</p>
<p><code>kubectl get pod &lt;podname-f5d-48kbr&gt; --template='{{(index (index .spec.containers 0).ports 0).containerPort}}{{&quot;\n&quot;}}' -n &lt;namespace-name&gt;</code></p>
</li>
</ol>
<p>Say the output displays</p>
<pre><code>&gt; 27013             
</code></pre>
<ol start="2">
<li>Forward a local port to a port on the Pod like so :</li>
</ol>
<p><code>kubectl port-forward &lt;podname-deployment-f5db75f7-48kbr&gt; 8080:27013 -n &lt;namespace-name&gt;</code></p>
<p>and that should start the port forwarding, the output like :</p>
<pre><code>Forwarding from 127.0.0.1:8080 -&gt; 27013
Forwarding from [::1]:8080 -&gt; 27013
</code></pre>
<p>now access your application on the browser via http://localhost:8080/</p>
