Skip to Main Content
Mastering Elixir
book

Mastering Elixir

by André Albuquerque, Daniel Caixinha
July 2018
Intermediate to advanced content levelIntermediate to advanced
574 pages
14h 7m
English
Packt Publishing
Content preview from Mastering Elixir

Connecting the deployed Elixir nodes

Our objective in this section is to connect every ElixirDrip node running in Kubernetes. With the current setup, each Elixir node is running on its own pod, without even trying to connect to other pods.

When we introduced the Kubernetes deployment template, we briefly talked about the /health endpoint used by the readiness and liveness probe. Let's use this endpoint to get information about the node that replies to our HTTP GET requests. Here you can find the Phoenix controller that will handle the requests to /health:

$ cat apps/elixir_drip_web/lib/elixir_drip_web/controllers/health_controller.exdefmodule ElixirDripWeb.HealthController do  @moduledoc false  use ElixirDripWeb, :controller def health(conn, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Testing Elixir

Testing Elixir

Andrea Leopardi, Jeffrey Matthias

Publisher Resources

ISBN: 9781788472678Supplemental Content