k8s pod multicast
By default, a Kubernetes service will load balance requests across all associated pods.
This is normally the desired functionality for High Availability workloads.
However in certain situations, such as with local state cache reloads, a request must be fired to all pods in the service simultaneously.
To accomplish this, I wrote a small service - k8s-multicast
- that sits in the cluster and will recieve a request, and then multicast that same request across all pods in a defined service.
Assuming the RBAC is configured appropriately, the service can be deployed with default environment variables
, and it will multicast the request across all endpoints in the defined service.
For use across various services / namespaces (again, assuming RBAC has been configured appropriately), the form data fields
can be included to send the request to the specified endpoint on the fly.last updated 2021-06-30T19:41:08-0700