Mon identity in a dynamic environment
How can we get monitors to work in an environment where their identity/endpoint might change? (Kubernetes). On the Rook team we have a few ideas on how to deal with this. What is your recommendation on which one of these we should pursue or if you have another recommendation altogether?
Background: Consider the following in Kubernetes:
* A monitor runs inside a pod, which has an unstable ip address. Whenever the pod restarts it might get a new ip address. This is not a frequent event, but it also must be an expected part of failure or maintenance
* A stable endpoint can be created with a Kubernetes service, which is done by routing to the ip address of the pod. Now you have a stable address routing to the unstable address. You can hand out the service address and theoretically nobody should care there is an unstable address under the covers.
Solutions:
There are at least two approaches to this problem.
1) Modify Ceph with the concept of an "advertise address" that is different from the "bind address". In other words, the ip address the monitor binds to locally is different than the ip address that is advertised to the monmap. Other monitors and clients would all connect to a mon with its advertise_addr, which would be routed to the the local bind_addr where the mon is actually listening. The monmap would be stable for a given set of mons even if they had a new bind_addr after restart. The main challenge with this is that it would be a non-trivial change for Ceph to support the advertise_addr.
This is a pattern followed in other systems such as etcd that support both a bind and advertise address.
Today the mons prohibit an advertised address from being different from the bind address with a check for the mon identity in a couple places such as this:
https://github.com/ceph/ceph/blob/7f72100be553072d2b8fcf2699296fd2b23f2665/
src/msg/async/AsyncConnection.cc#L980
In a prototype, I confirmed that disabling this error allowed the communication with monitors to be successful with a simulated advertise_addr. Essentially I generated config files with an advertised ip address, except that a mon would start with its own bind_addr in the config. The prototype has the shortcoming that the bind_addr is in the mon map, so there is still a problem as soon as the pod restarts. We still need the advertise_addr to be in the monmap, while the mon binds to a bind_addr.
2) Every time the mons get a new address, inject a new monmap to the changed monitors. This would require no changes in the Ceph codebase, but Rook would implement automation around the monmap injection. Rook would carefully track the health of the monitors. When a mon ip address changes, if quorum has been lost Rook would inject the new address to the monmap of each mon, and the monitors would come up again. This seems feasible, but it's also very difficult to get right.
This proposal is along a similar vein as #2 to move the same mon to a new endpoint, but it doesn't seem complete for the scenario.
https://trello.com/c/mgmh0YGO/214-mon-ceph-mon-move
Conclusion
Having a stable identity as in #1 is the only approach that feels right so far. Feedback? See this Rook issue for more discussion.
https://github.com/rook/rook/issues/586
Thanks!
Travis
The information contained in this transmission may be confidential. Any disclosure, copying, or further distribution of confidential information is not permitted unless such privilege is explicitly granted in writing by Quantum. Quantum reserves the right to have electronic communications, including email and attachments, sent across its networks filtered through security software programs and retain such messages in order to comply with applicable data security and retention requirements. Quantum is not responsible for the proper and complete transmission of the substance of this communication or for any delay in its receipt.
Hi Travis,
Quoted 40 lines · Travis Nielsen
How can we get monitors to work in an environment where their identity/endpoint might change? (Kubernetes). On the Rook team we have a few ideas on how to deal with this. What is your recommendation on which one of these we should pursue or if you have another recommendation altogether?
Background: Consider the following in Kubernetes:
* A monitor runs inside a pod, which has an unstable ip address. Whenever the pod restarts it might get a new ip address. This is not a frequent event, but it also must be an expected part of failure or maintenance
* A stable endpoint can be created with a Kubernetes service, which is done by routing to the ip address of the pod. Now you have a stable address routing to the unstable address. You can hand out the service address and theoretically nobody should care there is an unstable address under the covers.Solutions:
There are at least two approaches to this problem.
1) Modify Ceph with the concept of an "advertise address" that is different from the "bind address". In other words, the ip address the monitor binds to locally is different than the ip address that is advertised to the monmap. Other monitors and clients would all connect to a mon with its
advertise_addr, which would be routed to the the localbind_addrwhere the mon is actually listening. The monmap would be stable for a given set of mons even if they had a newbind_addrafter restart. The main challenge with this is that it would be a non-trivial change for Ceph to support theadvertise_addr.This is a pattern followed in other systems such as etcd that support both a bind and advertise address.
Today the mons prohibit an advertised address from being different from the bind address with a check for the mon identity in a couple places such as this:
https://github.com/ceph/ceph/blob/7f72100be553072d2b8fcf2699296fd2b23f2665/
src/msg/async/AsyncConnection.cc#L980
Quoted 8 lines
In a prototype, I confirmed that disabling this error allowed the communication with monitors to be successful with a simulated
advertise_addr. Essentially I generated config files with an advertised ip address, except that a mon would start with its ownbind_addrin the config. The prototype has the shortcoming that thebind_addris in the mon map, so there is still a problem as soon as the pod restarts. We still need theadvertise_addrto be in the monmap, while the mon binds to abind_addr.
I think this is the way to go, and I don't think it will be *that* involved. Probably it just requires an option to supplement public_addr with bind_addr. As long as the Messenger myaddr field is populated with the public_addr (and not bind_addr) field I suspect everything will Just Work. Peers connecting to us will see the public_addr for their getpeeraddr config and that's the one that the messenger will advertise during its handshake; bind_addr would be used *only* by the actual bind call. Does that seem reasonable?
Quoted 11 lines
2) Every time the mons get a new address, inject a new monmap to the changed monitors. This would require no changes in the Ceph codebase, but Rook would implement automation around the monmap injection. Rook would carefully track the health of the monitors. When a mon ip address changes, if quorum has been lost Rook would inject the new address to the monmap of each mon, and the monitors would come up again. This seems feasible, but it's also very difficult to get right.
This proposal is along a similar vein as #2 to move the same mon to a new endpoint, but it doesn't seem complete for the scenario.
https://trello.com/c/mgmh0YGO/214-mon-ceph-mon-move
Yeah, this seems more fragile. :)
sage
Thanks Sage for the thoughts on where we should look for #1, it did seem like the much better option. Bassam started to look into it as well so may have some perspective on what he had found when digging through the code.
Travis
Quoted 96 lines · Sage Weil
Hi Travis,
Quoted 52 lines · Travis Nielsen
How can we get monitors to work in an environment where their identity/endpoint might change? (Kubernetes). On the Rook team we have a few ideas on how to deal with this. What is your recommendation on which one of these we should pursue or if you have another recommendation altogether?
Background: Consider the following in Kubernetes:
* A monitor runs inside a pod, which has an unstable ip address. Whenever
the pod restarts it might get a new ip address. This is not a frequent event, but it also must be an expected part of failure or maintenance
* A stable endpoint can be created with a Kubernetes service, which is done by routing to the ip address of the pod. Now you have a stable address routing to the unstable address. You can hand out the service address and theoretically nobody should care there is an unstable address
under the covers.Solutions:
There are at least two approaches to this problem.
1) Modify Ceph with the concept of an "advertise address" that is different from the "bind address". In other words, the ip address the monitor binds to locally is different than the ip address that is advertised to the monmap. Other monitors and clients would all connect to
a mon with itsadvertise_addr, which would be routed to the the localbind_addrwhere the mon is actually listening. The monmap would be stable
for a given set of mons even if they had a newbind_addrafter restart. The main challenge with this is that it would be a non-trivial change for
Ceph to support theadvertise_addr.This is a pattern followed in other systems such as etcd that support both
a bind and advertise address.Today the mons prohibit an advertised address from being different from the bind address with a check for the mon identity in a couple places such
as this:https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.c
om%2Fceph%2Fceph%2Fblob%2F7f72100be553072d2b8fcf2699296fd2b23f2665%2F&dat a=02%7C01%7CTravis.Nielsen%40Quantum.com%7Cbbbdde4dd6e64e008a7808d4988210 89%7C322a135f14fb4d72aede122272134ae0%7C1%7C0%7C636301131764750926&sdata= L5VQw0H9GaadP5hhjXemhWHq42tDRn1V4khv9V2u2LY%3D&reserved=0 src/msg/async/AsyncConnection.cc#L980Quoted 10 lines
In a prototype, I confirmed that disabling this error allowed the communication with monitors to be successful with a simulated
advertise_addr. Essentially I generated config files with an advertised ip
address, except that a mon would start with its ownbind_addrin the config. The prototype has the shortcoming that thebind_addris in the mon
map, so there is still a problem as soon as the pod restarts. We still need theadvertise_addrto be in the monmap, while the mon binds to abind_addr.I think this is the way to go, and I don't think it will be *that* involved. Probably it just requires an option to supplement
public_addrwithbind_addr. As long as the Messenger myaddr field is populated with thepublic_addr(and notbind_addr) field I suspect everything will Just Work. Peers connecting to us will see thepublic_addrfor their getpeeraddr config and that's the one that the messenger will advertise during its handshake;bind_addrwould be used *only* by the actual bind call. Does that seem reasonable?Quoted 15 lines
2) Every time the mons get a new address, inject a new monmap to the changed monitors. This would require no changes in the Ceph codebase, but
Rook would implement automation around the monmap injection. Rook would carefully track the health of the monitors. When a mon ip address changes,
if quorum has been lost Rook would inject the new address to the monmap of
each mon, and the monitors would come up again. This seems feasible, but it's also very difficult to get right.This proposal is along a similar vein as #2 to move the same mon to a new
endpoint, but it doesn't seem complete for the scenario.Quoted 5 lines
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftrello.c
om%2Fc%2Fmgmh0YGO%2F214-mon-ceph-mon-move&data=02%7C01%7CTravis.Nielsen%4 0Quantum.com%7Cbbbdde4dd6e64e008a7808d498821089%7C322a135f14fb4d72aede122 272134ae0%7C1%7C0%7C636301131764750926&sdata=ypx8E97pBxIQZR0OXrzQh01bRi%2 FL9Q%2F2G0535l5M2yM%3D&reserved=0
Quoted 3 lines
Yeah, this seems more fragile. :)
sage
The information contained in this transmission may be confidential. Any disclosure, copying, or further distribution of confidential information is not permitted unless such privilege is explicitly granted in writing by Quantum. Quantum reserves the right to have electronic communications, including email and attachments, sent across its networks filtered through security software programs and retain such messages in order to comply with applicable data security and retention requirements. Quantum is not responsible for the proper and complete transmission of the substance of this communication or for any delay in its receipt.
Quoted 52 lines · Sage Weil
Hi Travis,
Quoted 40 lines · Travis Nielsen
How can we get monitors to work in an environment where their identity/endpoint might change? (Kubernetes). On the Rook team we have a few ideas on how to deal with this. What is your recommendation on which one of these we should pursue or if you have another recommendation altogether?
Background: Consider the following in Kubernetes:
* A monitor runs inside a pod, which has an unstable ip address. Whenever the pod restarts it might get a new ip address. This is not a frequent event, but it also must be an expected part of failure or maintenance
* A stable endpoint can be created with a Kubernetes service, which is done by routing to the ip address of the pod. Now you have a stable address routing to the unstable address. You can hand out the service address and theoretically nobody should care there is an unstable address under the covers.Solutions:
There are at least two approaches to this problem.
1) Modify Ceph with the concept of an "advertise address" that is different from the "bind address". In other words, the ip address the monitor binds to locally is different than the ip address that is advertised to the monmap. Other monitors and clients would all connect to a mon with its
advertise_addr, which would be routed to the the localbind_addrwhere the mon is actually listening. The monmap would be stable for a given set of mons even if they had a newbind_addrafter restart. The main challenge with this is that it would be a non-trivial change for Ceph to support theadvertise_addr.This is a pattern followed in other systems such as etcd that support both a bind and advertise address.
Today the mons prohibit an advertised address from being different from the bind address with a check for the mon identity in a couple places such as this:
https://github.com/ceph/ceph/blob/7f72100be553072d2b8fcf2699296fd2b23f2665/
src/msg/async/AsyncConnection.cc#L980Quoted 8 lines
In a prototype, I confirmed that disabling this error allowed the communication with monitors to be successful with a simulated
advertise_addr. Essentially I generated config files with an advertised ip address, except that a mon would start with its ownbind_addrin the config. The prototype has the shortcoming that thebind_addris in the mon map, so there is still a problem as soon as the pod restarts. We still need theadvertise_addrto be in the monmap, while the mon binds to abind_addr.
Quoted 8 lines
I think this is the way to go, and I don't think it will be *that* involved. Probably it just requires an option to supplement
public_addrwithbind_addr. As long as the Messenger myaddr field is populated with thepublic_addr(and notbind_addr) field I suspect everything will Just Work. Peers connecting to us will see thepublic_addrfor their getpeeraddr config and that's the one that the messenger will advertise during its handshake;bind_addrwould be used *only* by the actual bind call. Does that seem reasonable?
I think this is technically feasible on the monitor as well, and I really enjoy the idea.
We would have to keep some info about the monitor's addresses in the monmap though, even if just for monitor consumption, such as the latest address for a given monitor. Unless the point was to have the monitors also benefiting from this translation/routing, which hopefully will not impact latency between them.
However, in all my ignorance about how the messenger works (and networking, generally speaking, baffles me), I wonder whether this would open weird attack vectors. E.g., malicious peer handshaking with the advertised ip, without having the ip stack to back it up.
I know ip spoofing is a thing, and if we stretch things enough everything is a potential problem. May it be ignorance driven, but I just worry that we'd be removing a sane check - that a message is expected to come from a given address, and if not we should probably discard it.
Also, how would routing be implemented? If this is on the network, iptables, wtv, then we are introducing a new dependency on this feature that goes beyond having a properly configured network (which, in my experience, can sometimes be a challenge).
Quoted 8 lines
Quoted 8 lines
2) Every time the mons get a new address, inject a new monmap to the changed monitors. This would require no changes in the Ceph codebase, but Rook would implement automation around the monmap injection. Rook would carefully track the health of the monitors. When a mon ip address changes, if quorum has been lost Rook would inject the new address to the monmap of each mon, and the monitors would come up again. This seems feasible, but it's also very difficult to get right.
Quoted 5 lines
Quoted 3 lines
This proposal is along a similar vein as #2 to move the same mon to a new endpoint, but it doesn't seem complete for the scenario.
https://trello.com/c/mgmh0YGO/214-mon-ceph-mon-moveYeah, this seems more fragile. :)
As I see it, the major benefits from this would be maintaining a stable set of addresses for clients, such that one would not need to update them as monitors move from address to address, and to maintain an up to date map with as little - or without - admin intervention as possible.
And with that in mind, injecting monmaps is definitely not the way to go. However, I think the 'mon move' could help - or, at least, the concept behind it, of having a monitor moving its address from A to B. Not necessarily by itself, but certainly paired with routing the advertised address to the bind addr.
It's not as transparent as having all the addresses being routed between the advertise_addr and the bind_addr, without questions asked, but it would allow to keep track of the real addresses of the monitors. If for nothing else, at least to prevent loss of quorum in the event of the routing failing or being disabled [1].
[1] I know this is tangential to the thread, but this could be a good use for the optional monmap features: if feature is enabled, use the advertised address; if disabled, use the monitor's address.
-Joao
Hi Joao, thanks for the perspective. Regarding the routing questions, I believe the answer is that the default behavior would still be the same as today. The advertise and bind address are the same. If they are set to different addresses, that means you trust the environment to route them appropriately. In our case, Kubernetes provides that routing.
Travis
Quoted 146 lines · Joao Eduardo Luis
Quoted 68 lines · Sage Weil
Hi Travis,
Quoted 54 lines · Travis Nielsen
How can we get monitors to work in an environment where their identity/endpoint might change? (Kubernetes). On the Rook team we have a
few ideas on how to deal with this. What is your recommendation on which
one of these we should pursue or if you have another recommendation altogether?Background: Consider the following in Kubernetes:
* A monitor runs inside a pod, which has an unstable ip address. Whenever
the pod restarts it might get a new ip address. This is not a frequent event, but it also must be an expected part of failure or maintenance
* A stable endpoint can be created with a Kubernetes service, which is done by routing to the ip address of the pod. Now you have a stable address routing to the unstable address. You can hand out the service address and theoretically nobody should care there is an unstable address
under the covers.Solutions:
There are at least two approaches to this problem.
1) Modify Ceph with the concept of an "advertise address" that is different from the "bind address". In other words, the ip address the monitor binds to locally is different than the ip address that is advertised to the monmap. Other monitors and clients would all connect to
a mon with itsadvertise_addr, which would be routed to the the localbind_addrwhere the mon is actually listening. The monmap would be stable
for a given set of mons even if they had a newbind_addrafter restart. The main challenge with this is that it would be a non-trivial change for
Ceph to support theadvertise_addr.This is a pattern followed in other systems such as etcd that support both
a bind and advertise address.Today the mons prohibit an advertised address from being different from the bind address with a check for the mon identity in a couple places such
as this:https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.
com%2Fceph%2Fceph%2Fblob%2F7f72100be553072d2b8fcf2699296fd2b23f2665%2F&d ata=02%7C01%7CTravis.Nielsen%40Quantum.com%7Ca811b4a92b1443204ce408d498c 742a3%7C322a135f14fb4d72aede122272134ae0%7C1%7C0%7C636301428971476119&sd ata=McDCWlt75b6JLYGJhBsMQe%2FNDm9RBZp6EeNcQuZyQ5o%3D&reserved=0 src/msg/async/AsyncConnection.cc#L980Quoted 10 lines
In a prototype, I confirmed that disabling this error allowed the communication with monitors to be successful with a simulated
advertise_addr. Essentially I generated config files with an advertised ip
address, except that a mon would start with its ownbind_addrin the config. The prototype has the shortcoming that thebind_addris in the mon
map, so there is still a problem as soon as the pod restarts. We still need theadvertise_addrto be in the monmap, while the mon binds to abind_addr.Quoted 8 lines
I think this is the way to go, and I don't think it will be *that* involved. Probably it just requires an option to supplement
public_addrwithbind_addr. As long as the Messenger myaddr field is populated with thepublic_addr(and notbind_addr) field I suspect everything will Just Work. Peers connecting to us will see thepublic_addrfor their getpeeraddr config and that's the one that the messenger will advertise during its handshake;bind_addrwould be used *only* by the actual bind call. Does that seem reasonable?I think this is technically feasible on the monitor as well, and I really enjoy the idea.
We would have to keep some info about the monitor's addresses in the monmap though, even if just for monitor consumption, such as the latest address for a given monitor. Unless the point was to have the monitors also benefiting from this translation/routing, which hopefully will not impact latency between them.
However, in all my ignorance about how the messenger works (and networking, generally speaking, baffles me), I wonder whether this would open weird attack vectors. E.g., malicious peer handshaking with the advertised ip, without having the ip stack to back it up.
I know ip spoofing is a thing, and if we stretch things enough everything is a potential problem. May it be ignorance driven, but I just worry that we'd be removing a sane check - that a message is expected to come from a given address, and if not we should probably discard it.
Also, how would routing be implemented? If this is on the network, iptables, wtv, then we are introducing a new dependency on this feature that goes beyond having a properly configured network (which, in my experience, can sometimes be a challenge).
Quoted 16 lines
Quoted 16 lines
2) Every time the mons get a new address, inject a new monmap to the changed monitors. This would require no changes in the Ceph codebase, but
Rook would implement automation around the monmap injection. Rook would carefully track the health of the monitors. When a mon ip address changes,
if quorum has been lost Rook would inject the new address to the monmap of
each mon, and the monitors would come up again. This seems feasible, but
it's also very difficult to get right.This proposal is along a similar vein as #2 to move the same mon to a new
endpoint, but it doesn't seem complete for the scenario.Quoted 7 lines
Quoted 5 lines
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftrello.
com%2Fc%2Fmgmh0YGO%2F214-mon-ceph-mon-move&data=02%7C01%7CTravis.Nielsen %40Quantum.com%7Ca811b4a92b1443204ce408d498c742a3%7C322a135f14fb4d72aede 122272134ae0%7C1%7C0%7C636301428971476119&sdata=umPYAj7oO2STcPFPMAdyQwUI JXR47lqe7BBefdA7FMQ%3D&reserved=0Yeah, this seems more fragile. :)
As I see it, the major benefits from this would be maintaining a stable set of addresses for clients, such that one would not need to update them as monitors move from address to address, and to maintain an up to date map with as little - or without - admin intervention as possible.
And with that in mind, injecting monmaps is definitely not the way to go. However, I think the 'mon move' could help - or, at least, the concept behind it, of having a monitor moving its address from A to B. Not necessarily by itself, but certainly paired with routing the advertised address to the bind addr.
It's not as transparent as having all the addresses being routed between the
advertise_addrand thebind_addr, without questions asked, but it would allow to keep track of the real addresses of the monitors. If for nothing else, at least to prevent loss of quorum in the event of the routing failing or being disabled [1].
Quoted 5 lines
[1] I know this is tangential to the thread, but this could be a good use for the optional monmap features: if feature is enabled, use the advertised address; if disabled, use the monitor's address.
-Joao
The information contained in this transmission may be confidential. Any disclosure, copying, or further distribution of confidential information is not permitted unless such privilege is explicitly granted in writing by Quantum. Quantum reserves the right to have electronic communications, including email and attachments, sent across its networks filtered through security software programs and retain such messages in order to comply with applicable data security and retention requirements. Quantum is not responsible for the proper and complete transmission of the substance of this communication or for any delay in its receipt.
Hi Sage,
Finally getting around to this one.
Quoted 8 lines
I think this is the way to go, and I don't think it will be *that* involved. Probably it just requires an option to supplement
public_addrwithbind_addr. As long as the Messenger myaddr field is populated with thepublic_addr(and notbind_addr) field I suspect everything will Just Work. Peers connecting to us will see thepublic_addrfor their getpeeraddr config and that's the one that the messenger will advertise during its handshake;bind_addrwould be used *only* by the actual bind call. Does that seem reasonable?
There is a fair amount of logic around public_addr that makes this a little more complex. For example, we automatically select the public_addr using pick_addresses when public_network is set. Also we have logic that attempts to discover available ports, and “rebinds” the socket which we would want to carry over to the proposed “bind_addr”.
I think it might be easier to go in the other direction. i.e, introduce “mon_advertise_addr” which overrides msgr->my_inst->addr and be used on the network to reach the mons. If empty (default) advertise_addr will be set to the effective value of public_addr. If set it must be an ip address or resolvable DNS name. If a port is specified it will be used, otherwise CEPH_MON_PORT is assumed.
Finally, by using the “mon_” prefix this makes it clear that this is limited to MONs where its needed. While its possible to do with for OSD, MDS, etc. I think it unnecessarily increases the config surface area.
What do you think?
Thanks!
Bassam
Quoted 3 lines · Bosom Tabby
Hi Sage,
Finally getting around to this one.
Great!
Quoted 20 lines
Quoted 8 lines
I think this is the way to go, and I don't think it will be *that* involved. Probably it just requires an option to supplement
public_addrwithbind_addr. As long as the Messenger myaddr field is populated with thepublic_addr(and notbind_addr) field I suspect everything will Just Work. Peers connecting to us will see thepublic_addrfor their getpeeraddr config and that's the one that the messenger will advertise during its handshake;bind_addrwould be used *only* by the actual bind call. Does that seem reasonable?There is a fair amount of logic around
public_addrthat makes this a little more complex. For example, we automatically select thepublic_addrusingpick_addresseswhenpublic_networkis set. Also we have logic that attempts to discover available ports, and “rebinds” the socket which we would want to carry over to the proposed “bind_addr”.I think it might be easier to go in the other direction. i.e, introduce “mon_advertise_addr” which overrides
msgr->my_inst->addrand be used on the network to reach the mons. If empty (default)advertise_addrwill be set to the effective value ofpublic_addr. If set it must be an ip address or resolvable DNS name. If a port is specified it will be used, otherwiseCEPH_MON_PORTis assumed.
Quoted 4 lines
Finally, by using the “mon_” prefix this makes it clear that this is limited to MONs where its needed. While its possible to do with for OSD, MDS, etc. I think it unnecessarily increases the config surface area.
What do you think?
Yeah, that sounds reasonable to me.
Can you elaborate on how the kubernetes side of this approach will work?
Thanks!
sage
I’m still going back and forth on the design but we can move the design/implementation discussion to the PR.
Quoted 1 line
Can you elaborate on how the kubernetes side of this approach will work?
In Kubernetes, each pod (think container) is assigned a unique podIP which is routable within the cluster. This PodIP can change each time a Pod is restarted/scheduled/moved etc. Its also the only ip address that can be bound inside the pod. Obviously using PodIP and public_addr is problematic for MONs since its not stable.
Kubernetes also supports a “service” which is essentially a static IP address allocated and is routable cluster wide (serviceIP to podIP). You can associate the service with a pod (based on pod name, labels etc.). The networking layer will ensure that routes are updated even when the pod moves/restarted etc.
So the idea is to set public_addr to the podIP (also possible with public_network) and mon_advertise_addr to serviceIP.