Skip to content

Commit

Permalink
istio
Browse files Browse the repository at this point in the history
  • Loading branch information
wardviaene committed Aug 31, 2018
1 parent f8e5bd6 commit 919dcb6
Showing 1 changed file with 101 additions and 0 deletions.
101 changes: 101 additions & 0 deletions istio/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# istio

## download (1.0.1):
```
cd ~
wget https://github.com/istio/istio/releases/download/1.0.1/istio-1.0.1-linux.tar.gz
tar -xzvf istio-1.0.1-linux.tar.gz
cd istio-1.0.1
echo 'export PATH="$PATH:/home/ubuntu/istio-1.0.1/bin"' >> ~/.profile
```

## Download (latest):
```
cd ~
curl -L https://git.io/getLatestIstio | sh -
echo 'export PATH="$PATH:/home/ubuntu/istio-0.7.1/bin"' >> ~/.profile # change 0.7.1 in your version
cd istio-1.0.1 # change 1.0.1 in your version
```

## Kops configuration
```
kops edit cluster kubernetes.newtech.academy
```
Add:
```
kubeAPIServer:
admissionControl:
- NamespaceLifecycle
- LimitRanger
- ServiceAccount
- PersistentVolumeLabel
- DefaultStorageClass
- DefaultTolerationSeconds
- MutatingAdmissionWebhook
- ValidatingAdmissionWebhook
- ResourceQuota
- NodeRestriction
- Priority
```

## Istio install

Apply CRDs:

```
kubectl apply -f install/kubernetes/helm/istio/templates/crds.yaml
```

Wait a few seconds.


Option 1: with no mutual TLS authentication
```
kubectl apply -f install/kubernetes/istio.yaml
```

Option 2: or with mutual TLS authentication
```
kubectl apply -f install/kubernetes/istio-auth.yaml
```

## Example app

Example app (from istio)
```
export PATH="$PATH:/home/ubuntu/istio-1.0.1/bin"
kubectl apply -f <(istioctl kube-inject -f samples/bookinfo/platform/kube/bookinfo.yaml)
```


### Traffic management

Add default route to v1:
```
istioctl create -f samples/bookinfo/routing/route-rule-all-v1.yaml
```

Route traffic to v2 if rule matches
```
istioctl replace -f samples/bookinfo/routing/route-rule-reviews-test-v2.yaml
```

Route 50% of traffic between v1 and v3:
```
istioctl replace -f samples/bookinfo/routing/route-rule-reviews-50-v3.yaml
```

## Distributed tracing

Enable zipkin:
```
kubectl apply -f install/kubernetes/addons/zipkin.yaml
```

Enable Jaeger:
```
kubectl delete -f install/kubernetes/addons/zipkin.yaml # if zipkin was installed, delete it first
kubectl apply -n istio-system -f https://raw.githubusercontent.com/jaegertracing/jaeger-kubernetes/master/all-in-one/jaeger-all-in-one-template.yml
```

0 comments on commit 919dcb6

Please sign in to comment.