bloomberg/goldpinger

Question: is the type NodePort service needed to function?

pandorasNox opened this issue · 1 comments

In the README.md and the example-serviceaccounts.yml

we got

---
apiVersion: v1
kind: Service
metadata:
  name: goldpinger
  namespace: default
  labels:
    app: goldpinger
spec:
  type: NodePort
  ports:
    - port: 80
      nodePort: 30080
      name: http
  selector:
    app: goldpinger

which exposes the service to the outside world over the NodePort.

Question is: does goldpinger need it to function or can we just use a normal ClusterIP service?

Security wise it doesn't seems to be a good default to me.
If I wanted, I also just could use kubectl port-forward or create a nginx resource for it.

No, the NodePort is not necessary. You could use an ingress controller, a host port, or any other means of reaching out to them.

NodePort is just easy to use in an example, because mostly everyone understands it.

Thanks for the question !