All Projects → wkrzywiec → K8s Helm Helmfile

wkrzywiec / K8s Helm Helmfile

Project which compares 3 approaches to deploy apps on Kubernetes cluster (using kubectl, helm & helmfile)

Projects that are alternatives of or similar to K8s Helm Helmfile

Docs4dev
后端开发常用框架文档及中文翻译,包含 Spring 系列文档(Spring, Spring Boot, Spring Cloud, Spring Security, Spring Session),大数据(Apache Hive, HBase, Apache Flume),日志(Log4j2, Logback),Http Server(NGINX,Apache),Python,数据库(OpenTSDB,MySQL,PostgreSQL)等最新官方文档以及对应的中文翻译。
Stars: ✭ 974 (+2764.71%)
Mutual labels:  postgresql, spring-boot, nginx
Devilbox
A modern Docker LAMP stack and MEAN stack for local development
Stars: ✭ 3,598 (+10482.35%)
Mutual labels:  postgresql, nginx
Blog Tutorials
⭐️ Codebase for the tutorials on my blog about Java, Spring Boot, AWS, Kotlin and Testing
Stars: ✭ 257 (+655.88%)
Mutual labels:  postgresql, spring-boot
Django React Boilerplate
DIY Django + React Boilerplate for starting your SaaS
Stars: ✭ 385 (+1032.35%)
Mutual labels:  postgresql, nginx
Spring Boot Postgresql Jpa Hibernate Rest Api Demo
Building RESTful APIs with Spring Boot, PostgreSQL, JPA and Hibernate
Stars: ✭ 209 (+514.71%)
Mutual labels:  postgresql, spring-boot
Graphqlize
A Clojure & JVM library for developing GraphQL API instantly from Postgres and MySQL databases
Stars: ✭ 240 (+605.88%)
Mutual labels:  postgresql, spring-boot
Shell
Infrastructure Management Shell - Linux
Stars: ✭ 381 (+1020.59%)
Mutual labels:  postgresql, nginx
Dockerized Flask
Dockerized web app using NGINX, Flask and PostgreSQL
Stars: ✭ 119 (+250%)
Mutual labels:  postgresql, nginx
Filterlists
🛡 The independent, comprehensive directory of filter and host lists for advertisements, trackers, malware, and annoyances.
Stars: ✭ 653 (+1820.59%)
Mutual labels:  postgresql, nginx
Metasfresh
We do Open Source ERP - Fast, Flexible & Free Software to scale your Business.
Stars: ✭ 807 (+2273.53%)
Mutual labels:  postgresql, spring-boot
Great Big Example Application
A full-stack example app built with JHipster, Spring Boot, Kotlin, Angular 4, ngrx, and Webpack
Stars: ✭ 899 (+2544.12%)
Mutual labels:  postgresql, spring-boot
Embedded Database Spring Test
A library for creating isolated embedded databases for Spring-powered integration tests.
Stars: ✭ 196 (+476.47%)
Mutual labels:  postgresql, spring-boot
Docker Django
A project to get you started with Docker and Django.
Stars: ✭ 170 (+400%)
Mutual labels:  postgresql, nginx
Typescript Express Starter
🚀 TypeScript Express Starter
Stars: ✭ 238 (+600%)
Mutual labels:  postgresql, nginx
Gemini
Model Driven REST framework to automatically generate CRUD APIs
Stars: ✭ 138 (+305.88%)
Mutual labels:  postgresql, spring-boot
Docker Django Nginx Uwsgi Postgres Tutorial
Docker + Django + Nginx + uWSGI + Postgres 基本教學 - 從無到有 ( Docker + Django + Nginx + uWSGI + Postgres Tutorial )
Stars: ✭ 334 (+882.35%)
Mutual labels:  postgresql, nginx
Netkiller.github.io
Netkiller Free ebook - 免费电子书
Stars: ✭ 861 (+2432.35%)
Mutual labels:  postgresql, nginx
Hydroshare
HydroShare is a collaborative website for better access to data and models in the hydrologic sciences.
Stars: ✭ 117 (+244.12%)
Mutual labels:  postgresql, nginx
Symfony 4 Docker Env
Docker Environment for Symfony. PHP-FPM, NGINX SSL Proxy, MySQL, LEMP
Stars: ✭ 119 (+250%)
Mutual labels:  postgresql, nginx
Hibernate Springboot
Collection of best practices for Java persistence performance in Spring Boot applications
Stars: ✭ 589 (+1632.35%)
Mutual labels:  postgresql, spring-boot

Kubernetes vs Helm vs Helmfile Deployment comparison

With this project I want to compare 3 approaches of deploying same applictions to Kubernetes cluster:

  • k8s - the entire deployment is done with kubectl - Kubernetes command line tool,
  • helm - the deployment is done by using Helm charts,
  • helmfile - very similar to previous one, but this time with installed helmfile plugin for Helm.

Usage

Enter one of the folders to find out about one of the approaches.

Project architecture

This project is based on my previous one - Kanban Board (source code).

It contains 3 components:

  • postgres - database
  • kanban-app - backend service, serving REST endpoints for a frontend
  • kanban-ui - frontend service

And here is a simpliefied schema of what I would like to achieve:

Simple Architecture Diagram

On it you there is an additional component - adminer. It's GUI application for managing the database.

A full picture of Kubernetes cluster that is created with each approach is presented below:

Kubernetes Objects Architecture

Prerequisites

Before testing any of described approaches you need first go through following steps:

Install Minikube & Kubectl

Start a new Minikube cluster

In order to run a minikube cluster:

$ minikube start
😄  minikube v1.8.1 on Ubuntu 18.04
✨  Automatically selected the docker driver
🔥  Creating Kubernetes in docker container with (CPUs=2) (8 available), Memory=2200MB (7826MB available) ...
🐳  Preparing Kubernetes v1.17.3 on Docker 19.03.2 ...
    ▪ kubeadm.pod-network-cidr=10.244.0.0/16
❌  Unable to load cached images: loading cached images: stat /home/wojtek/.minikube/cache/images/k8s.gcr.io/kube-proxy_v1.17.3: no such file or directory
🚀  Launching Kubernetes ... 
🌟  Enabling addons: default-storageclass, storage-provisioner
⌛  Waiting for cluster to come online ...
🏄  Done! kubectl is now configured to use "minikube"

To check the status of the cluster:

$ minikube status
host: Running
kubelet: Running
apiserver: Running
kubeconfig: Configured

To check that kubectl is properly configured:

$ kubectl cluster-info
Kubernetes master is running at https://127.0.0.1:32768
KubeDNS is running at https://127.0.0.1:32768/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.

Next, we need to run another command to enable Ingress addon:

$ minikube addons enable ingress
🌟  The 'ingress' addon is enabled

Edit hosts file

As I want to have two different URLs to enter the adminer (database management tool) and kanban app you need to config your hosts file - add following lines:

<MINIKUBE_IP>	adminer.k8s.com
<MINIKUBE_IP>	kanban.k8s.com

A value for <MINIKUBE_IP> placeholder is individual per machine. To figure it out you need to have minikube up and running. If you're sure it's working you can run the command:

$ minikube ip
172.17.0.2

So in my case, I need to add following lines to the hosts file:

172.17.0.2	adminer.k8s.com
172.17.0.2	kanban.k8s.com

Location of hosts file on different OS:

Maintenance

Official kubectl cheatsheet:

https://kubernetes.io/docs/reference/kubectl/cheatsheet/

Minikube provides a Dashboard for entire cluster, after typing following command it will open

$ minikube dashboard
🔌  Enabling dashboard ...
🤔  Verifying dashboard health ...
🚀  Launching proxy ...
🤔  Verifying proxy health ...
🎉  Opening http://127.0.0.1:45807/api/v1/namespaces/kubernetes-dashboard/services/http:kubernetes-dashboard:/proxy/ in your default browser...

To see a resource (CPU, memory) consumption of services you can enable metrics-server minikube addon (they will be visible on a dashboard):

$ minikube addons enable metrics-server
🌟  The 'metrics-server' addon is enabled

If your pod is not starting properly you can investigate it by describe pods command:

$ kubectl describe pods postgres-6fd67d4976-ljd2j
Name:         postgres-6fd67d4976-ljd2j
Namespace:    default
Priority:     0
Node:         m01/172.17.0.2
Start Time:   Tue, 24 Mar 2020 07:50:28 +0100
Labels:       app=postgres
              pod-template-hash=6fd67d4976
              type=db
Annotations:  <none>
Status:       Pending
IP:           172.18.0.4
IPs:
  IP:           172.18.0.4
Controlled By:  ReplicaSet/postgres-6fd67d4976
Containers:
  postgres:
    Container ID:   
    Image:          postgres:9.6-alpine
    Image ID:       
    Port:           5432/TCP
    Host Port:      0/TCP
    State:          Waiting
      Reason:       CreateContainerConfigError
    Ready:          False
    Restart Count:  0
    Environment:
      POSTGRES_DB:        kanban
      POSTGRES_USER:      kanban
      POSTGRES_PASSWORD:  kanban
    Mounts:
      /var/lib/postgresql/data from postgres-storage (rw,path="postgres")
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-nlb25 (ro)
Conditions:
  Type              Status
  Initialized       True 
  Ready             False 
  ContainersReady   False 
  PodScheduled      True 
Volumes:
  postgres-storage:
    Type:       PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
    ClaimName:  postgres-persistent-volume-claim
    ReadOnly:   false
  default-token-nlb25:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-nlb25
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  <none>
Tolerations:     node.kubernetes.io/not-ready:NoExecute for 300s
                 node.kubernetes.io/unreachable:NoExecute for 300s
Events:
  Type     Reason     Age                 From               Message
  ----     ------     ----                ----               -------
  Normal   Scheduled  2m3s                default-scheduler  Successfully assigned default/postgres-6fd67d4976-ljd2j to m01
  Normal   Pulled     6s (x11 over 2m2s)  kubelet, m01       Container image "postgres:9.6-alpine" already present on machine
  Warning  Failed     6s (x11 over 2m2s)  kubelet, m01       Error: stat /tmp/hostpath-provisioner/pvc-f5d9b781-9cdf-4a4c-8c9b-2edb8330d139: no such file or directory

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].