All Projects → ContainerSolutions → K8s Deployment Strategies

ContainerSolutions / K8s Deployment Strategies

Kubernetes deployment strategies explained

Programming Languages

go
31211 projects - #10 most used programming language
Dockerfile
14818 projects
Makefile
30231 projects

Projects that are alternatives of or similar to K8s Deployment Strategies

k3s-gitops
GitOps principles to define kubernetes cluster state via code
Stars: ✭ 103 (-96.11%)
Mutual labels:  helm, grafana, prometheus
K8s Gitops
GitOps principles to define kubernetes cluster state via code. Community around [email protected] is on discord: https://discord.gg/7PbmHRK
Stars: ✭ 192 (-92.75%)
Mutual labels:  prometheus, grafana, helm
K8s Tew
Kubernetes - The Easier Way
Stars: ✭ 269 (-89.85%)
Mutual labels:  prometheus, grafana, helm
K8ssandra
K8ssandra is an open-source distribution of Apache Cassandra for Kubernetes including API services and operational tooling.
Stars: ✭ 155 (-94.15%)
Mutual labels:  prometheus, grafana, helm
Zenko
Zenko is the open source multi-cloud data controller: own and keep control of your data on any cloud.
Stars: ✭ 353 (-86.67%)
Mutual labels:  prometheus, grafana, helm
Jira Prometheus Exporter
Prometheus Exporter For JIRA
Stars: ✭ 113 (-95.73%)
Mutual labels:  prometheus, grafana
Ethereum Staking Guide
Ethereum 2.0 Staking Guides
Stars: ✭ 116 (-95.62%)
Mutual labels:  prometheus, grafana
Swarmprom
Docker Swarm instrumentation with Prometheus, Grafana, cAdvisor, Node Exporter and Alert Manager
Stars: ✭ 1,739 (-34.35%)
Mutual labels:  prometheus, grafana
Prom ex
An Elixir Prometheus metrics collection library built on top of Telemetry with accompanying Grafana dashboards
Stars: ✭ 149 (-94.38%)
Mutual labels:  prometheus, grafana
Pingprom
Prometheus uptime monitoring quickstart
Stars: ✭ 107 (-95.96%)
Mutual labels:  prometheus, grafana
Go Notify
An email automation solution, written in Golang.
Stars: ✭ 143 (-94.6%)
Mutual labels:  prometheus, grafana
Appmetrics
App Metrics is an open-source and cross-platform .NET library used to record and report metrics within an application.
Stars: ✭ 1,986 (-25.03%)
Mutual labels:  prometheus, grafana
Kubernetes Book
Mastering Kubernetes with Real Life Lessons from Deploying Production Systems
Stars: ✭ 113 (-95.73%)
Mutual labels:  prometheus, grafana
Heplify Server
HEP Capture Server
Stars: ✭ 110 (-95.85%)
Mutual labels:  prometheus, grafana
Pepper Metrics
pepper metrics is a tool, it can helps you collect runtime performance use RED method, and then output as log / timeseries data, by default it use prometheus as datasource, grafana as UI
Stars: ✭ 119 (-95.51%)
Mutual labels:  prometheus, grafana
Grafana
The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
Stars: ✭ 45,930 (+1633.86%)
Mutual labels:  prometheus, grafana
Elephant Shed
PostgreSQL Management Appliance
Stars: ✭ 146 (-94.49%)
Mutual labels:  prometheus, grafana
Grafana Prometheus Alertmanager Datasource
Stars: ✭ 163 (-93.85%)
Mutual labels:  prometheus, grafana
Github Monitoring
Monitor your GitHub Repos with Docker & Prometheus
Stars: ✭ 163 (-93.85%)
Mutual labels:  prometheus, grafana
Swarmstack
A Docker swarm-based starting point for operating highly-available containerized applications.
Stars: ✭ 181 (-93.17%)
Mutual labels:  prometheus, grafana

Kubernetes deployment strategies

In Kubernetes there is few different way to release an application, you have to carefully choose the right strategy to make your infrastructure resilient.

  • recreate: terminate the old version and release the new one
  • ramped: release a new version on a rolling update fashion, one after the other
  • blue/green: release a new version alongside the old version then switch traffic
  • canary: release a new version to a subset of users, then proceed to a full rollout
  • a/b testing: release a new version to a subset of users in a precise way (HTTP headers, cookie, weight, etc.). This doesn’t come out of the box with Kubernetes, it imply extra work to setup a smarter loadbalancing system (Istio, Linkerd, Traeffik, custom nginx/haproxy, etc).
  • shadow: release a new version alongside the old version. Incoming traffic is mirrored to the new version and doesn't impact the response.

deployment strategy decision diagram

Before experimenting, checkout the following resources:

Getting started

These examples were created and tested on Minikube running with Kubernetes v1.10.0.

$ minikube start --kubernetes-version v1.10.0 --memory 8192 --cpus 2

Visualizing using Prometheus and Grafana

The following steps describe how to setup Prometheus and Grafana to visualize the progress and performance of a deployment.

Install Helm

To install Helm, follow the instructions provided on their website.

$ helm init

Install Prometheus

$ helm install \
    --namespace=monitoring \
    --name=prometheus \
    --version=7.0.0 \
    stable/prometheus

Install Grafana

$ helm install \
    --namespace=monitoring \
    --name=grafana \
    --version=1.12.0 \
    --set=adminUser=admin \
    --set=adminPassword=admin \
    --set=service.type=NodePort \
    stable/grafana

Setup Grafana

Now that Prometheus and Grafana are up and running, you can access Grafana:

$ minikube service grafana

To login, username: admin, password: admin.

Then you need to connect Grafana to Prometheus, to do so, add a DataSource:

Name: prometheus
Type: Prometheus
Url: http://prometheus-server
Access: Server

Create a dashboard with a Graph. Use the following query:

sum(rate(http_requests_total{app="my-app"}[5m])) by (version)

To have a better overview of the version, add {{version}} in the legend field.

Example graph

Recreate:

Kubernetes deployment recreate

Ramped:

Kubernetes deployment ramped

Blue/Green:

Kubernetes deployment blue-green

Canary:

Kubernetes deployment canary

A/B testing:

kubernetes ab-testing deployment

Shadow:

kubernetes shadow deployment

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].