<p>this is my service information</p>
<p><code>NAME             TYPE        CLUSTER-IP       EXTERNAL-IP     PORT(S)          AGE</code></p>
<p><code>k8s-demo         NodePort    10.103.77.121    192.168.96.10   80:32236/TCP     24h</code></p>
<p>when I <code>curl 192.168.96.10:32236</code>,returns <code>curl: (56) Recv failure: Connection reset by peer</code></p>
<p>but I can use minikube service command to access this service locally</p>
<p>configuration file below</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  creationTimestamp: &quot;2022-10-10T08:27:35Z&quot;
  labels:
    app: k8s-demo
  name: k8s-demo
  namespace: default
  resourceVersion: &quot;65370&quot;
  uid: 9ccd2662-a3df-4e25-9691-3f6e3421d78b
spec:
  clusterIP: 10.103.77.121
  clusterIPs:
  - 10.103.77.121
  externalIPs:
  - 192.168.96.10
  externalTrafficPolicy: Cluster
  internalTrafficPolicy: Cluster
  ipFamilies:
  - IPv4
  ipFamilyPolicy: SingleStack
  ports:
  - nodePort: 32236
    port: 80
    protocol: TCP
    targetPort: 8080
  selector:
    app: k8s-demo
  sessionAffinity: None
  type: NodePort
status:
  loadBalancer: {}
</code></pre>
<p>I already set the externalIP and port for this service, but it seems didn't work, I wonder what's wrong with the configuration, thanks !!</p>

AutumnZeng
<p>To have an external access to a NodePort service the node should have a public ip address assigned to it. 192.168.96.10 is a private ip address.</p>
<p>IANA has assigned the following 3 ip ranges for private network -</p>
<pre><code>Address ranges to be use by private networks are:

    Class A: 10.0.0.0 to 10.255.255.255
    Class B: 172.16.0.0 to 172.31.255.255
    Class C: 192.168.0.0 to 192.168.255.255
</code></pre>
<p>Ref: <a href="https://www.ibm.com/docs/en/networkmanager/4.2.0?topic=translation-private-address-ranges" rel="nofollow noreferrer">https://www.ibm.com/docs/en/networkmanager/4.2.0?topic=translation-private-address-ranges</a></p>
