Illustrate traffic control using label in Kubernetes with Istio There are two version of control.
- Version 1 is binary control which only send requrest to pods with label "status=normal".
- Version 2 distribute requests to 3 subsets according to status label.
- Install Minikube/Istio
- Build demo app(hostname) image in "src/hostname-app/" and make it available to minikube vm(currently, the demo using local image).
- eval $(minikube docker-env)
- cd src/hostname-app/
- docker build -t hostname .
- Deploy configuration
- cd to root of repository
- To deploy version 1, using: ./deploy
- To deploy version 2, using: ./deploy -2
- remove configuration
- cd to root of repository
- ./deploy -d
All control can be done under the root of repository
- Change status of intended pod
- ./cmdshell.py setStatus <normal|busy>
- Test request ditribution
- ./tstdis <number of requests, default 500>
All control can be done under the root of repository
- Change status of intended pod
- ./cmdshell.py setStatus <idle|normal|busy>
- Test request ditribution(if there's no idle or busy pods, istio will return failure)
- ./tstdis <number of requests, default 500>
- Change number of intended pod
- ./cmdshell.py scale <# of pods>