Currently Juju creates 2 services:
- <app-name>
- <app-name>-endpoints
The service <app-name> maps to the ClusterIP of the application, and the <app-name>-endpoints is the headless service from which you can access each specific pod.
Use case: I'm building a mongodb-k8s (=<app-name>) charm, which basically sets a replica set, so the mongo_uri exposed by the charm should look like this:
Hello,
Currently Juju creates 2 services: -endpoints
- <app-name>
- <app-name>
The service <app-name> maps to the ClusterIP of the application, and the <app-name> -endpoints is the headless service from which you can access each specific pod.
Use case: I'm building a mongodb-k8s (=<app-name>) charm, which basically sets a replica set, so the mongo_uri exposed by the charm should look like this:
> mongo_uri= "mongodb: //<ip1> :27017, <ip2>:27017, .../?replicaset =rs0"
The best way to effectively do that, would be if I could have available the FQDNs for each pod, which is formed like this:
<ip1>: <app-name> -0.<app- name>-endpoints --> mongodb- k8s-0.mongodb- k8s-endpoints -1.<app- name>-endpoints --> mongodb- k8s-1.mongodb- k8s-endpoints
<ip2>: <app-name>
This will work within the same model, but having the FQDN will provide the support for CMR within the same Kubernetes cluster.