A small project demonstrating Kubernetes deployment with Helm
Switch branches/tags
Clone or download
Latest commit c34b468 Apr 10, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
chart-museum changed folders and added chart museum Apr 8, 2018
helm-chart obfuscate Apr 10, 2018
kubernetes added kube files Apr 9, 2018
server fix things after running it Apr 10, 2018
.gitignore fix things after running it Apr 10, 2018
.travis.yml try to fix the build Apr 10, 2018
LICENSE added MIT license Apr 9, 2018
README.md Added link to post Apr 10, 2018

README.md

Helm Deployment Demo

This repo contains a full working demo of how we are using Helm for rapid Kubernetes deployment. Use this repo to feel how fast and simple it can be. To have a better understanding of the flow, check out this Blog Post

Structure

  • chart-museum: All that is required to run Chart Museum that will hold our charts.
  • helm-chart: All the files that are required for building the chart and publishing it to Chart Museum
  • kubernetes: Kubernetes file required for running the demo (create namespace and TLS secret)
  • server: The app that we will deploy on Kubernetes, a small web app written in Lolcode.

Flow

The idea is to use Helm to pack all Kubernetes configuration files. The developer can use the chart to publish her code into production. All the customization is done on server/values.yaml. Prerequisites: Docker and kubernetes (Minikube will do just fine) The demo will create a namespace named helm-demo on your cluster and will create all the artifacts in this namespace.

Preparing the environment:

  • Run Chart Museum: cd chart-museum && docker-compose up -d
  • Publish the chart: cd ../helm-chart/web-api && ../scripts/publish.sh 1 http://localhost:8080/
  • Prepare Kubernetes:cd ../../kubernetes && kubectl apply -f .
  • Add Chart Museum to Helm: helm repo add local-chart-museum http://localhost:8080

Now deploy the app:

  • Build the app so it will be available for minikube: cd ../server && eval $(minikube docker-env) && docker build -t local/httpd:1 .
    • If you're using something other than minikube, first publish your image to a repository.
    • Than, modify server/values.yaml: image.repository to the repository, and image.version to the tag.
  • Deploy the app: helm upgrade --install -f values.yaml httpd local-chart-museum/web-api --wait
  • Use curl to test the deployment (or edit /etc/hosts): curl -H "Host: httpd.local" -k https://<ingress ip>/lol.html. To get the IP run kubectl get ingress --namespace=helm-demo.