There are two ways.
From perspective of comfirmability if the new revison was available, the B has advantage rather than A.
Note: Log Analytics or Log sink will enable you to see if traffic was mixed by logging query before working it.
- Docker engine working on local.
- Build image
make image
- Deploy the first revison.
make deploy
It will give you the service url.
https://###########-############-uc.a.run.app
You can test the service,
curl https://###########-############-uc.a.run.app/version
You will see like this,
version: standard
- Deploy the new tagged revision. Set tag name
export VER=v10
Deploy as below,
make tag-deploy
It generate new tagged url.
https://v10---###########-############-uc.a.run.app
- Switch to new one after confirmation. Make sure if the new tagged revision is available completely.
curl https://v10---###########-############-uc.a.run.app/version
After that,
make update-traffic-tag
- Access the url of service.
curl https://###########-############-uc.a.run.app/version
You will not see any responses from the old url.
- Remove the tagged url after switching successfully.
make remove-tag
That's it.
Have a nice Cloud Run day!