mirror of https://github.com/knative/client.git
2.0 KiB
2.0 KiB
Traffic Splitting Examples
- Tag revisions
echo-v1andecho-v2asstableandstagingrespectively:
kn service update svc --tag echo-v1=stable --tag echo-v2=staging
- Ramp up/down revision
echo-v3to20%, adjusting other traffic to accommodate:
kn service update svc --traffic echo-v3=20 --traffic echo-v2=80
- Give revision
echo-v3tagcandidate, without otherwise changing any traffic split:
kn service update svc --tag echo-v3=candidate
- Give
echo-v3tagcandidate, and2%of traffic adjusting other traffic to go to revisionecho-v2:
kn service update svc --tag echo-v3=candidate --traffic candidate=2 --traffic echo-v2=98
- Update tag for
echo-v3fromcandidatetocurrent:
kn service update svc --untag candidate --tag echo-v3=current
- Remove tag
currentfromecho-v3:
kn service update svc --untag current
- Remove
echo-v3having no tag(s) entirely, adjustingecho-v2to fill up:
kn service update svc --traffic echo-v2=100 # a target having no-tags or no-traffic gets removed
- Remove
echo-v1and its tagoldfrom the traffic assignments entirely:
kn service update svc --untag old --traffic echo-v1=0
- Tag revision
echo-v1withstableas well ascurrent, and50-50%traffic split to each:
kn service update svc --tag echo-v1=stable,echo-v2=current --traffic stable=50,current=50
- Revert all the traffic to the latest ready revision of service:
kn service update svc --traffic @latest=100
- Tag latest ready revision of service as
current:
kn service update svc --tag @latest=current
- Update tag for
echo-v4totestingand assign all traffic to it:
kn service update svc --untag oldv4 --tag echo-v4=testing --traffic testing=100
- Update
latesttag ofecho-v1witholdtag, givelatesttoecho-v2:
kn service update svc --untag latest --tag echo-v1=old --tag echo-v2=latest