Now lets deploy a new version (version 2) of Catalog Product Detail backend service.
And change the proddetail
VirtualRouter to route traffic 90% to proddetail-v1
version 1 and 10% to proddetail-v2
version 2.
And as we gain confidence in the proddetail-v2
, we can increase the % in a linear fashion.
aws ecr get-login-password --region $AWS_REGION | docker login --username AWS --password-stdin $ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com
PROJECT_NAME=eks-app-mesh-demo
export APP_VERSION_2=2.0
for app in catalog_detail; do
aws ecr describe-repositories --repository-name $PROJECT_NAME/$app >/dev/null 2>&1 || \
aws ecr create-repository --repository-name $PROJECT_NAME/$app >/dev/null
TARGET=$ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/$PROJECT_NAME/$app:$APP_VERSION_2
cd apps/$app
docker build -t $TARGET -f version2/Dockerfile .
docker push $TARGET
done
cd ../../.
Looking at the section of canary.yaml shown below,
you can see we’ve added the route as 10% to new service proddetail-v2
and 90% to existing service proddetail-v1
.
Lets deploy the resources for proddetail service version v2
envsubst < ./deployment/canary.yaml | kubectl apply -f -
Check the resources for proddetail service version 2
kubectl get all -n prodcatalog-ns | grep 'proddetail2\|proddetail-v2'