<p>I have a manifest as the following</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: my-redis
spec:
  selector:
    matchLabels:
      app: my-redis
  replicas: 1
  template:
    metadata:
      labels:
        app: my-redis
    spec:
      containers:
       - name: my-redis
         image: redis
         ports:
         - name: redisport1
           containerPort: 6379
           hostPort: 6379

---
apiVersion: v1
kind: Service
metadata:
  name: redis-service
  labels:
    app: my-redis
spec:
  type: NodePort
  selector:
    name: my-redis
  ports:
  - name: redisport1
    port: 6379
    targetPort: 6379
    nodePort: 30036
    protocol: TCP
</code></pre>

<p>This is a sample that reproduces my problem. My intention here is to create a simple cluster that has a pod with a redis container in it, and it should be exposed to my localhost. Still, get services gives me the following output:</p>

<pre><code>redis-service   NodePort    10.107.233.66   &lt;none&gt;        6379:30036/TCP   10s
</code></pre>

<p>If I swap NodePort with LoadBalancer, I get an external-ip but still port doesn't work. </p>

<p>Can you help me identify why I'm failing to map the 6379 port to my localhost, please?</p>

<p>Thanks,</p>

Akaedintov
<p>In order to access your app through node port, you have to use this url
<code>http://{node ip}:{node port}</code>. </p>

<p>If you are using minikube, your minikube ip is the node ip. You can retrieve it using <code>minikube ip</code> command.</p>

<p>You can also use <code>minikube service redis-service --url</code> command to get the url to access your application through node port.</p>
