Skip to content

Latest commit

 

History

History
66 lines (53 loc) · 1.95 KB

examples.md

File metadata and controls

66 lines (53 loc) · 1.95 KB

Traffic Splitting Examples

  1. Tag revisions echo-v1 and echo-v2 as stable and staging respectively:
kn service update svc --tag echo-v1=stable --tag echo-v2=staging
  1. Ramp up/down revision echo-v3 to 20%, adjusting other traffic to accommodate:
kn service update svc --traffic echo-v3=20 --traffic echo-v2=80
  1. Give revision echo-v3 tag candidate, without otherwise changing any traffic split:
kn service update svc --tag echo-v3=candidate
  1. Give echo-v3 tag candidate, and 2% of traffic adjusting other traffic to go to revision echo-v2:
kn service update svc --tag echo-v3=candidate --traffic candidate=2 --traffic echo-v2=98
  1. Update tag for echo-v3 from candidate to current:
kn service update svc --untag candidate --tag echo-v3=current
  1. Remove tag current from echo-v3:
kn service update svc --untag current
  1. Remove echo-v3 having no tag(s) entirely, adjusting echo-v2 to fill up:
kn service update svc --traffic echo-v2=100    # a target having no-tags or no-traffic gets removed
  1. Remove echo-v1 and its tag old from the traffic assignments entirely:
kn service update svc --untag old --traffic echo-v1=0
  1. Tag revision echo-v1 with stable as well as current, and 50-50% traffic split to each:
kn service update svc --tag echo-v1=stable,echo-v2=current --traffic stable=50,current=50
  1. Revert all the traffic to the latest ready revision of service:
kn service update svc --traffic @latest=100
  1. Tag latest ready revision of service as current:
kn service update svc --tag @latest=current
  1. Update tag for echo-v4 to testing and assign all traffic to it:
kn service update svc --untag oldv4 --tag echo-v4=testing --traffic testing=100
  1. Update latest tag of echo-v1 with old tag, give latest to echo-v2:
kn service update svc --untag latest --tag echo-v1=old --tag echo-v2=latest