I want to run Eventstore in Kubernetes node. I start the node with minikube start
, then I apply this yaml file:
apiVersion: apps/v1
kind: Deployment
metadata:
name: eventstore-deployment
spec:
selector:
matchLabels:
app: eventstore
replicas: 1
template:
metadata:
labels:
app: eventstore
spec:
containers:
- name: eventstore
image: eventstore/eventstore
ports:
- containerPort: 1113
protocol: TCP
- containerPort: 2113
protocol: TCP
---
apiVersion: v1
kind: Service
metadata:
name: eventstore
spec:
selector:
app: eventstore
ports:
- protocol: TCP
port: 1113
targetPort: 1113
---
apiVersion: v1
kind: Service
metadata:
name: eventstore-dashboard
spec:
selector:
app: eventstore
ports:
- protocol: TCP
port: 2113
targetPort: 2113
nodePort: 30113
type: NodePort
the deployment, the replica set and the pod starts, but nothing happens: Eventstore doesn't print to the log, I can't open its dashboard. Also other services can't connect to eventstore:1113. No errors and the pods doesn't crash. The only I see in logs is "The selected container has not logged any messages yet".
I've tried a clean vanilla minukube node with different vm drivers, and also a node with configured Ambassador + Linkerd. The results are the same.
But when I run Eventstore in Docker with this yaml file via docker-compose
eventstore:
image: eventstore/eventstore
ports:
- '1113:1113'
- '2113:2113'
Everything works fine: Eventstore outputs to logs, other services can connect to it and I can open its dashboard on 2113 port.
UPDATE: Eventstore started working after about 30-40 minutes after deployment. I've tried several times, and had to wait. Other pods start working almost immediately (30 secs - 1 min) after deployment.