shanesveller

shanesveller

New Series: Kubernetes-Native Phoenix Apps

Introduction and first content post in my new series about running Elixir Phoenix apps on Kubernetes are live! I’m describing an opinionated and focused approach that assumes you are already comfortable with Elixir/Phoenix and with Kubernetes primitives, but not necessarily experienced with marrying the two. I can definitely point people to more resources for the latter as need be, but won’t include them in the posts, except as links.

Feedback and questions are very welcome on basically any medium, but you can reach me on Slack, Twitter, GitHub or here on the forum as @shanesveller.

First 5 of 5 Posts! Switch mode

shanesveller

shanesveller

The second content post of my series, covering Docker-Compose and Docker-friendly migrations, seeds and Distillery config providers is live! Our first taste of Kubernetes in Part 3 should follow sometime this week.

maz

maz

Pretty comprehensive and ambitious posts! I noticed that the ‘kube_native’ app has access to the ecto repo while the ‘kube_native_web’ app does not. I’ve never done an umbrella app before so my question is is this the usual way to configure db access in an umbrella app? Just wondering what you would do if you needed the ‘kube_native_web’ app to use the db/repo?

shanesveller

shanesveller

Thank you!

Yes, and as a matter of fact this is how mix phx.new --umbrella will construct your application for you. The super-brief explanation is that you want to have only one umbrella application directly responsible for your Ecto interactions with a given Repo. You have that umbrella app provide an abstraction layer used by your other applications within the umbrella, and they depend on that first one in their mix.exs. This is mostly just a slight variation on Phoenix Contexts which were introduced in Phoenix 1.3 - the umbrella structure just sort of forces your hand a little bit in terms of providing good isolation/boundaries.

shanesveller

shanesveller

The first post that actually touches Kubernetes (and a little bit of Helm is available today in Part 3 of my series, and it’s a dense one! Looking forward to feedback and comments, as always!

stefanluptak

stefanluptak

Those 3 parts were really well written and informative. I am looking forward to the next one. :slight_smile: :+1:

Where Next?

Trending in Blog Posts Top

bartblast
Hey folks, I just published a post about Hologram’s funding and where the project goes next - the short version: Curiosum as Main Spons...
New
ryanzidago
Hi all, In this article, I make the case for each test owning its setup. Usually I forbid my AI agents to use the setup callbacks; I mu...
New
zorn
As I’ve leaned into AI code generation on LocalCents, the volume I ship has climbed, and my worry shifted from any single change to the l...
New
jswanner
I wrote about an issue I had with a LiveView application, and how I solved the problem by debouncing updates server-side (within the Live...
New
abreujp
I’ve published a new article in my Elixir learning series on dev.to exploring what happens when tagged tuples aren’t enough - the try, re...
New
zorn
A recent ex_money v6 upgrade was blocked because Timex pins an old gettext. Rather than one big remove-and-rewrite PR, I used a shim: a m...
New
jola
Doing a little mini-series on distributed Elixir with some examples, starting with setting up your cluster and monitoring it. If you have...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
type1fool
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New
akoutmos
@hugobarauna and I (Alex Koutmos) have been hard at work on writing a book on Nerves that takes you from simply blinking LEDs to building...
New

We're in Beta

About us Mission Statement