Coder Social home page Coder Social logo

kabdelrahman / distributed-cache-on-k8s-poc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sharma-rohit/distributed-cache-on-k8s-poc

0.0 2.0 0.0 9 KB

[PoC] Distributed Cache with Akka Cluster Sharding and Akka HTTP on Kubernetes

License: MIT License

Scala 100.00%

distributed-cache-on-k8s-poc's Introduction

distributed-cache-on-k8s-poc

[PoC] Distributed Cache with Akka Cluster Sharding and Akka HTTP on Kubernetes

Running it locally (On Mac) with docker images from local registry

git clone https://github.com/sharma-rohit/distributed-cache-on-k8s-poc.git

  1. Install minikube: brew cask install minikube

  2. Inatall kubectl: brew install kubectl

  3. Start minikube with --insecure-registry option:

    minikube start --insecure-registry localhost:5000

  4. Setup minikube Ingress controller:

    minikube addons enable ingress

  5. To make the local docker command use the minikube vm as docker host and all commands starting with docker affecting the minikube vm not the host computer run:

    eval $(minikube docker-env)

  6. docker run -d -p 5000:5000 --restart=always --name registry -v /data/docker-registry:/var/lib/registry registry:2

  7. To build and publish docker image to local registry of minikube run:

    sbt docker:publish

  8. Create kubernetes manifests:

    kubectl create -f kubernetes/statefulset.yaml

    kubectl apply -f kubernetes/service.yaml

    kubectl apply -f kubernetes/headless_service.yaml

    kubectl apply -f kubernetes/ingress.yaml

  9. To redirect traffic from the domain "distributed-cache.com" stated in ingress.yaml to our minikube cluster run:

    echo "$(minikube ip) distributed-cache.com" | sudo tee -a /etc/hosts

Check if it's working:

curl -v distributed-cache.com/cache-data/2055e73f-7db8-49ce-9eb6-3f9d80525284

distributed-cache-on-k8s-poc's People

Contributors

sharma-rohit avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.