This is an example code and configuration to deploy Akka in Kubernetes using Statefulset for Akka seed nodes, and Deployment for Akka worker nodes.
Special thanks to Johan and Ola for teaching me about Akka at JFokus 2017.
See Clustering Akka in Kubernetes article.
You have a working Kubernetes 1.5 cluster. You can try Minikube, or Google Container Engine for multi-node deployment.
- Deploy the seed nodes:
kubectl apply -f kubernetes/akka-seed.yaml
- Deploy the worker nodes:
kubectll apply -f kubernetes/akka-workers.yaml
Or, deploy everything in one shot: `kubectl apply -f kubernetes/
- Scale seed nodes:
kubectl scale statefulset akka-seed --replicas=3
- Scale worker nodes:
kubectl scale deployment akka-worker --replicas=4
- See logs:
kubectl logs -f akka-seed-0