Accessing Erlang/Elixir node inside MiniKube pod

7/31/2017

I've got Deployment which has n nodes and I have service that exposes 4369. I want to connect to one of those nodes via IEX. I am using MiniKube for my local development Kubernetes cluster which binds to some IP and I can access it's dashboard.

I tried calling minikube service thatServiceName, but after few moments of w8ing it ends work and does not output link that it supposed to give me.

apiVersion: v1
kind: Service
metadata:
  name: erlangpl-demo-mnesia
  labels:
    app: erlangpl-demo-mnesia
spec:
  clusterIP: None
  ports:
    - port: 10000
      targetPort: 10000
      name: disterl-mesh-0
    - port: 4369
      targetPort: 4369
      name: epmd
  selector:
    app: erlangpl-demo-mnesia
  type: ClusterIP

Could anyone let me know what am I missing or what am I doing wrong?

-- Haito
elixir
erlang
kubernetes
minikube

2 Answers

7/31/2017

type: ClusterIP with clusterIP: None looks fishy to me. I do not think that minikube provides support for that service type.

I would try using type: NodePort, which should expose the service on the minikube IP.

-- mhb
Source: StackOverflow

7/31/2017

You can connect to the pod directly:

kubectl exec -it your-pod-name

it defaults to bash, which I didn't had so I have to do:

kubectl exec -it your-pod-name -- /bin/sh

I hope that helps.

-- Steven Barragán
Source: StackOverflow