duncanphillips
LiveBook remote execution within Kubernetes
Hi,
I’ve deployed my application, and livebook within kubernetes. I’m now trying to get livebook to work with remote execution against my running application, and I’m struggling to get the connection working.
for the application:
- deployment has epmd port configured
- service for both web endpoints, and epmd
- release cookie is set as env in dockerfile
in livebook, i’m trying this out
testing dns resolves - these both return ip’s for the services
DNS.resolve("my-app.default.svc.cluster.local")
DNS.resolve("my-app-epmd.default.svc.cluster.local")
testing node connection - these all fail with :pang.
node = :"my-app.prod.svc.cluster.local"
Node.ping(node)
node = :"my-app-epmd.prod.svc.cluster.local"
Node.ping(node)
node = :"my-app@my-app.prod.svc.cluster.local"
Node.ping(node)
node = :"my-app@my-app-epmd.prod.svc.cluster.local"
Node.ping(node)
Naturally, trying to actually run the Kino.RPC fails with {:erpc, :noconnection}
I’m pretty new to distributed elixir, so i’m sure i’m missing something basic ![]()
thanks
Marked As Solved
jonatanklosko
Exactly! You need RELEASE_DISTRIBUTION=name to use full node names with ip/domain, and that’s necessary to connect across nodes. Then, when you do Node.ping from Livebook, you want to use exactly the same node name as specified in RELEASE_NODE.
Also Liked
jonatanklosko
Yeah, I think generally it would be app-name@[pod-ip-addr], and then you do a DNS lookup.
Though, if you are running a single node, then RELEASE_NODE=app-name@something.internal should also work, as long as something.internal is resolvable from the Livebook pod : )
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








