kubernetes – My app is not accessible, is my service definition wrong?

I’m trying to set up nodered (nodered.org/) locally in minikube. Nodered is a web service, exposing its service on 1880 by default.

I seem to have everything up and running, but the service is not responding when I open the endpoint:

C:UsersfooDesktop>minikube kubectl get ep nodered-service
NAME              ENDPOINTS         AGE
nodered-service   172.17.0.5:1880   7m54s

Everything seems to run fine in kubernetes dashboard after running the deployment and service yaml files.

Deployment:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: nodered-deployment
spec:
  selector:
    matchLabels:
      app: nodered
  replicas: 1
  template:
    metadata:
      labels:
        app: nodered
    spec:
      containers:
      - name: nodered
        image: nodered/node-red:latest
        ports:
        - containerPort: 1880

Service:

apiVersion: v1
kind: Service
metadata:
  name: nodered-service
spec:
  type: NodePort
  selector:
    app: nodered
  ports:
    - protocol: TCP
      port: 1880
      targetport: 1880
      nodePort: 30100

From service section inside the dashboard:

enter image description here

Is there something wrong with my service.yaml file here?

Read more here: Source link