author avatar

emil

Wed Jan 30 2019

you can use telepresence to connect to a k8s cluster network and do things like start a local debugging session. Here is how to use local elixir observer and debug remote pods in K8S


# Install telepresence.
# Run this command to get an IEx shell connected to the cluster
telepresence --run iex --name debug@127.0.0.1 --cookie <cookie here>
# Find all nodes which are part of the cluster and their IP addresses
:inet_res.getbyname('dockup-headless', :a)
# Connect to one of the nodes
Node.connect(:"dockup@<ip>")
# Start observer locally
:observer.start()