Kubernetes service with different port types (NodePort / ClisterIP)

1/26/2018

Is it possible to expose service ports with different policies like NodePort or ClusterIP.

For example we have

  • some public XMPP API that should be accessible for end users
  • internal cluster API to communicate with other micro-services

Right now I can create different services of types NodePort and ClisterIP but is it possible to handle it with single k8s 'Service'?

-- Silk0vsky
kubernetes

1 Answer

1/26/2018

No, using two distinct services each of its own type is the right way to do it, and there is no harm/overhead in doing it like this

-- Radek 'Goblin' Pieczonka
Source: StackOverflow