okteto / divert-with-istio-sample

This repo si a sample about using divert with istio

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

This repo si a sample about using divert with istio

License:Apache License 2.0