Giter Site home page Giter Site logo

divert-with-istio-sample's Introduction

Sample for Divert with Istio

This repo is a sample about using divert with istio. The following diagram explains the architectture of the application we will be using in this sample:

sample-app

Cluster Admin tasks

The admin of the cluster must run the following commands to install Istio in the Okteto cluster:

helm repo add istio https://istio-release.storage.googleapis.com/charts
helm repo update
helm install --namespace istio-system --create-namespace istio-base istio/base --version 1.13.8 --wait
kubectl create namespace istio-ingress
kubectl label namespace istio-ingress istio-injection=enabled
helm install --namespace istio-system istiod istio/istiod --values istio/istiod-helm-values.yaml --wait
helm install --namespace istio-ingress istio-ingress istio/gateway --values istio/istio-ingress-helm-values.yaml --version 1.13.8 --wait

Replace <<okteto-subdomain>> in istio-ingress-config.yaml by the subdomain field in your okteto Helm values file:

kubectl apply -n istio-ingress -f istio/istio-ingress-config.yaml

Develop tasks

Each developer must run the following commands to deploy their dev environment

Configure Okteto CLI and kubectl credentials

okteto ctx use https://okteto.<<okteto-subdomain>>
okteto kubeconfig

Deploy services in staging

Then, run okteto deploy -f okteto-staging.yml to deploy the application in the staging namespace.

Test services

curl -k https://service-a-staging.<<okteto-subdomain>>/
curl -k https://service-b-staging.<<okteto-subdomain>>/
curl -k https://service-c-staging.<<okteto-subdomain>>/
curl -k https://service-a-staging.<<okteto-subdomain>>/call-b
curl -k https://service-a-staging.<<okteto-subdomain>>/call-c

Divert service-b in your personal namespace

Run okteto deploy.

Test services

curl -k https://service-a-<<your-namespace>>.<<okteto-subdomain>>/
curl -k https://service-b-<<your-namespace>>.<<okteto-subdomain>>/
curl -k https://service-c-<<your-namespace>>.<<okteto-subdomain>>/
curl -k https://service-a-<<your-namespace>>.<<okteto-subdomain>>/call-b
curl -k https://service-a-<<your-namespace>>.<<okteto-subdomain>>/call-c
curl -k https://service-a-staging.<<okteto-subdomain>>/call-b
curl -k https://service-a-staging.<<okteto-subdomain>>/call-c

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.