Elixir module that uses the Kubernetes API to find the IP of other nodes of the cluster to connect to.
If available in Hex, the package can be installed as:
- Add
elixir_kubernetes_cluster
to your list of dependencies inmix.exs
:
```elixir
def deps do
[{:elixir_kubernetes_cluster, "~> 0.1.0"}]
end
```
- Ensure
elixir_kubernetes_cluster
is started before your application:
```elixir
def application do
[applications: [:elixir_kubernetes_cluster]]
end
```
- Periodically compare list of pods from Kubernetes to our list of connected nodes
- Reconcile with Kubernetes if lists differ