admiraltyio / admiralty

A system of Kubernetes controllers that intelligently schedules workloads across clusters.
https://admiralty.io
Apache License 2.0
674 stars 87 forks source link

Dynamic Headless service unable to get created in Source cluster #140

Open agulhane-tibco opened 2 years ago

agulhane-tibco commented 2 years ago

I am deploying one application with StatefulSet and it will create discovery service runtime.

Application gets deployed correctly and respective proxy and actual pod is also created correctly at Target & Source clusters. However, service which is created runtime is only getting created at Target cluster, but proxy service is not getting created at Source cluster.

When I tried with simple nginx applications which contains (Deployment/StatefulSet, Service) then it works well. Proxy and Actual service is created at Source and Target cluster respectively. But it is failing while trying with runtime service creation.

Kindly confirm, if proxy service is created at Source cluster only if we are explicitly passing it though deployment yaml else it will not be created?

Can you please help me with some pointers? Is there any way that I can manage this?

adrienjt commented 2 years ago

Hi, that's right, services follow pods from source to target, but not the other way around. Why does your app create its discovery service at runtime? Is there a drawback to declaring it alongside the StatefulSet in your case?