Giter VIP home page Giter VIP logo

k8sexamplephx's Introduction

Example repo for using Kubernetes with Elixir+Phoenix

Basically this is just something I hacked together one night to learn about Kubernetes and see how well Elixir worked with it. Thanks to bitwalker's libcluster, it works quite well.

How to make this work for you

If you want to use this project, you'll need to make some changes, and perform some steps in your kubernetes environment. If you haven't used kubernetes before I highly recommend giving it a spin via Google Container Engine, it's a great experience. If you use GCE, their Cloud Shell product makes it really painless to do all of this without messing around with your local machine, but you'll need to install Elixir there (use Erlang Solution's debian repo).

  1. Change prod libcluster config to use your app name (if changed)
  2. Use distillery to build a release MIX_ENV=prod mix release --env=prod
  3. Build the docker image, tag it, and upload it somewhere that kubernetes can see (I used Google Container Engine for everything)
  4. Update the kubernetes "all-in-one" file for your new image (examplephx-aio.yaml), and check other settings.
  5. Create a secret and config map (I've included the proper vm.args for libcluster) see the bottom (Addendum) of this great post for details
  6. Use kubernetes to create your cluster (ReplicationController+Service) kubectl create -f examplephx-aio.yaml

I probably forgot something, don't be afraid to reach out @bbhoss :)

k8sexamplephx's People

Contributors

bbhoss avatar

Watchers

James Cloos avatar imerkle 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.