laurentkempe / polykube

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

polykube

NOTE:

  • This is still very much a work-in-progress
  • Some features in the list are not completed.
  • I will be resetting master and the repo history regularly

Overview

This application serves an example of a full-stack application built for Kubernetes.

See demo for instructions on deploying this application.

The application is running at http://polykube.io.

TODO

  1. Finish the frontend. (Angular2)

Features

  1. Docker: Minimal production containers including only the application (no source code, no build tools, etc)

  2. Kubernetes: Fast, reliable and repeatable deployments using Kubernetes Deployments, Services, DaemonSets and Secrets.

  3. .NET Core: Example AspNetCore API web application.

  4. Angular2: Example angular2-material frontend Typescript application

Goals

  1. Provide an example of how to use Docker for local development. This repo shows how you can use docker to have a full development environment that only relies on make and docker being available.

  2. Provide an example of how to build Docker containers meant for production.

  3. Provide an example of using Kubernetes for production container management,

Motivations

  1. Encourage Docker adoption, even for software that doesn't need to be run with Docker. The fact that anyone can install git, make, docker, and clone my repository and instantly have a working development environment is a big deal. I can't imagine the number of projects that I've fiddled with for hours before abandoning because I couldn't get the right version of node/npn/dependencies and the application code to get along together. These issues largely disappear if there is a Dockerfile that defines the development environment for the project.

  2. Encourage better Docker practices. Your production service doesn't need a compiler. Your production service doesn't need a copy of your application source code. So why ship them and their bloat to your production environment? This repo includes an example of how one can have separate build and runtime containers so that you can ship only your final binary bits (and their dependencies) to production.

  3. Encourage Kubernetes adoption. I continue to see people who think they don't need the "complexity" of Kubernetes, and then wind up re-inventing the so-called complexity via bash scripts that are subject to less design and review than the Kubernetes project. Hopefully this repo can demonstrate the few yaml files needed to make a project deployable into Kubernetes.

Kubernetes features

  1. Basics

    Uses Deployments and Services to abstract and manage your actual application.

  2. Secrets

    Uses Secrets to provide database and redis passwords at runtime. This eliminates the need for application secrets to ever live in the application source code repository.

  3. Service Discovery

    Uses the Cluster DNS addon to resolve services at runtime in cluster. (The dotnet api simply connects to postgres via tcp://db:5432, redis via tcp://redis:6379, etc.)

About


Languages

Language:C# 40.8%Language:TypeScript 22.0%Language:Makefile 12.5%Language:JavaScript 10.4%Language:Nginx 6.6%Language:HTML 4.5%Language:Shell 3.2%