0

If the Google Container Engine cluster has the service configured as LoadBalancer it's available to the general public as expected. But if I change that to NodePort it is not available as <nodeIp>:<nodePort>. The service (web-service.yml) looks like that:

apiVersion: v1
kind: Service
metadata:
 name: web
 labels:
   name: web
spec:
 type: NodePort
# type: LoadBalancer
 ports:
   - port: 80
     targetPort: 8080
     protocol: TCP
     nodePort: 30000
 selector:
   name: web

I would be very happy if someone could tell me why it isn't working.

Here is some background The cluster consists of a MongoDB deployment (db-deployment.yml) with an according service (db-service.yml) and a Jetty deployment (web-deployment.yml) with an according service (web-service.yml)

It can be found at GitHub as part of this project with the according Readme.md file.

Sandro
  • 1,757
  • 1
  • 19
  • 29

1 Answers1

1

Did you open the port (30000) in the firewall? Also make sure you use the public IP of your VM.

See this answer

Community
  • 1
  • 1
Oswin Noetzelmann
  • 9,166
  • 1
  • 33
  • 46