Skip to content

infinitelambda/istio-helm-deployment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

istio-helm-deployment

This repository creates canary and blue/green deployment of a demo application with Istio and Helm on EKS

This code contains the following resources

  • demo application helm chart
  • basic istio configuration

Prerequisites

Installation

$ kubectl create namespace prod
$ kubectl create namespace stage
$ kubectl label namespace prod istio-injection=enabled
$ kubectl label namespace stage istio-injection=enabled
$ helm install demoappv1 helm-chart/demoapp/ --wait --set deployment.tag=v1 --namespace prod
$ helm install demoappv2 helm-chart/demoapp/ --wait --set deployment.tag=v2 --namespace stage
$ kubectl create -f istio-config/gateway.yaml
$ kubectl create -f istio-config/vsvc.yaml

If everything went good, you should be able to see in your kiali versioned graph the following: Screenshot


How it works

The magic happens in the next two files that we applied earlier

apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  name: app-gateway
spec:
  selector:
    istio: ingressgateway
  servers:
  - port:
      number: 80
      name: http
      protocol: HTTP
    hosts:
    - "*"
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: demoapp
spec:
  hosts:
  - "*"
  gateways:
  - app-gateway
  http:
    - route:
      - destination:
          host: flaskapp.prod.svc.cluster.local 
        weight: 50
      - destination:
          host: flaskapp.stage.svc.cluster.local
        weight: 50

Gateway file applies a listening policy to the istio ingress-controller whereas virtualservice maps that gateway with the services we would like to destribute the traffic to.

Contributor Nikolay Vaklinov

About

This repository creates canary and blue/green deployment of a demo application with Istio and Helm on EKS

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published