Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chechiachang/istio-playground
https://github.com/chechiachang/istio-playground
Last synced: 23 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/chechiachang/istio-playground
- Owner: chechiachang
- Created: 2019-05-14T10:06:28.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T05:30:13.000Z (almost 2 years ago)
- Last Synced: 2023-03-03T12:56:04.658Z (over 1 year ago)
- Language: Makefile
- Size: 459 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
istio-playground
===# Install
### K8s
```
minikube start
# or
make kind
```### Fetch istio
```
curl -L https://istio.io/downloadIstio | sh -
sudo mv istio-1.6.4/bin/istioctl /usr/local/binistioctl version
1.6.4cd istio-1.6.4
```---
# Get started
Fetch examples
```
kpt
``````
minikube startistioctl install --set profile=demo
kubectl label namespace default istio-injection=enabledkubectl apply -f samples/bookinfo/networking/bookinfo-gateway.yaml
``````
export INGRESS_PORT=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="http2")].nodePort}')
export SECURE_INGRESS_PORT=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="https")].nodePort}')
export INGRESS_HOST=$(minikube ip)
export GATEWAY_URL=$INGRESS_HOST:$INGRESS_PORT
open http://$GATEWAY_URL/productpage
```# Configuration
### Trafic management
```
kubectl get virtualservices,destinationrules
NAME GATEWAYS HOSTS AGE
virtualservice.networking.istio.io/bookinfo [bookinfo-gateway] [*] 3d22hkubectl apply -f samples/bookinfo/networking/virtual-service-all-v1.yaml
kubectl get virtualservices,destinationrules
NAME GATEWAYS HOSTS AGE
virtualservice.networking.istio.io/bookinfo [bookinfo-gateway] [*] 3d22h
virtualservice.networking.istio.io/details [details] 4s
virtualservice.networking.istio.io/productpage [productpage] 4s
virtualservice.networking.istio.io/ratings [ratings] 4s
virtualservice.networking.istio.io/reviews [reviews] 4skubectl apply -f samples/bookinfo/networking/virtual-service-reviews-test-v2.yaml
```### Fail injection
Default rule
```
kubectl apply -f samples/bookinfo/networking/destination-rule-all.yaml
```Inject delay
```
kubectl apply -f samples/bookinfo/networking/virtual-service-ratings-test-delay.yaml
```Clean up
```
kubectl delete -f samples/bookinfo/networking/virtual-service-all-v1.yaml
```### Traffic Shifting
```
kubectl apply -f samples/bookinfo/networking/virtual-service-all-v1.yaml
kubectl apply -f samples/bookinfo/networking/virtual-service-reviews-50-v3.yaml
```