I have a statefulset with 5 replica. This means I have pods with name pod-0 .. pod-4.
I want to create 2 service.
A service that only routes the request to pod-0 ( this is my edit server ) : I know I can achieve this by "statefulset.kubernetes.io/pod-name=pod-0" in the service selector. This is fine.
A service that routes the request to all remaining nodes excluding pod-0( even if the application scales up and add more instances those new instances needs to be mapped to this service) : I am unable to achieve this.
Any idea on how to achieve the 2nd service ??
Since it is deployed via 1 stateful manifest file , all pods are having same label .