Kubernetes serivce: NodePort and ClusterIP in the same service definition

Hi All,

I have a Kubernetes service which has 3 ports, all of which are NodePorts. Now, I want to modify that service where 2 ports should be ClusterIPs and 1 port should be NodePort.

Can anybody please suggest the syntax and/or ways that I can accomplish this?

Thanks in advance!

Regards,
Deepthi

@Deepthi_Vishwanath
I think in same service its not possible, you can create 2 different services like external-svc with NodePort and internal-svc with ClusterIP

Yes this method is working. Thank you Sudhakar!