I'm running an active-passive cluster for a web application running on NGINX.
One of the the two servers will be available at any given time under a virtual IP ( pacemaker is used as the cluster resource manager and corosync provides the communication layer).
How would I configure both the web application server(nginx-node1/nginx-node2) to present a Lets encrypt SSL certificate for the FQDN(nginxlb.example.com) that identifies the cluster ?
Do you have a shared filesystem between the cluster nodes? That is common for configuration data between cluster hosts, but I'm not sure about guests.
Having an ACME client on each, which uses the shared fs for storage of its Let's Encrypt data, could be one way to go. In that scenario, it wouldn't matter much which node is the current master.
Each server would have an independent certificate for nginxlb.example.com. You wouldn't share these between the servers.
You'd register an ACME account using acme.sh on one server, then you'd copy over /root/.acme.sh to the second server. The effect of this would be to have the same ACME account on both servers.
You'd configure nginx to return a synthetic challenge response, hardcoded to this ACME account, per the wiki article I linked.
At this point, either server can request or renew a certificate for nginxlb.example.com, even if it is not the current active cluster node. This is because both servers will statically return the correct HTTP challenge response, no matter what.
The upside of this setup is that it has very few moving parts. It is an exotic setup, but I think it should work for you.
I am not sure I understand how many levels you have.
public internet -> nginx lb -> application
or
public internet -> lb -> nginx -> application
?
Because if you have a single public IP and nginx answers there, it's easy. If you have multiple public IPs then you need some orchestration (like stateless mode).
So you're telling me you have two load balancers in a some kind of IP-level round-robin, with a single A record?
How is the configuration for these two load balancers synced?
That's one way to do it. It's not the best way, you'd have to repeat this every couple of months. Letting each node get a certificate independently should be better.