For TLS connections to be trusted by clients, the certificates used by RabbitMQ nodes must include specific Subject Alternative Names (SANs). The SANs must match the DNS names used to reach the nodes and the service.
Required SAN Patterns
At a minimum, the certificate should include:
- A wildcard pattern for the nodes:
*.<RabbitMQ cluster name>-nodes.<namespace>.svc.<K8s cluster domain name> - The client service DNS name:
<RabbitMQ cluster name>.<namespace>.svc.<K8s cluster domain name>
Example Configuration
For a 3-node cluster named myrabbit in namespace mynamespace with the domain cluster.local, the SANs must include:
myrabbit-server-0.myrabbit-nodes.mynamespace.svc.cluster.localmyrabbit-server-1.myrabbit-nodes.mynamespace.svc.cluster.localmyrabbit-server-2.myrabbit-nodes.mynamespace.svc.cluster.localmyrabbit.mynamespace.svc.cluster.local
Note: If wildcards are not permitted, you must provide a separate SAN attribute for every individual node. If using spec.service.type: NodePort, you may also need to include the external IP addresses of each Kubernetes node in the SANs.