Skip to content

Commit 14d598b

Browse files
andy.shiandy.shi
authored andcommitted
Merge branch 'june' of https://github.com/szihai/istio-workshop into june
2 parents 15385d5 + 102cd9e commit 14d598b

File tree

3 files changed

+65
-1
lines changed

3 files changed

+65
-1
lines changed

exercise-1/README.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,35 @@
11
# Exercise 1 - Accessing a Kubernetes cluster
22

3-
This is the section to configure your kubectl CLI to point to your Kubernetes cluster. Will update with more specific information.
3+
This is the section to configure your kubectl CLI to point to your Kubernetes cluster. For the convienence we will use Minikube here.
4+
5+
### Install Minikube on Mac
6+
7+
The following are the quick steps to install Minikube on Mac if you have homebrew installed:
8+
9+
```
10+
brew cask install virtualbox
11+
12+
brew cask install minikube
13+
```
14+
15+
Make sure the minikube has at least 4G of memory(more is better). Otherwise it will not be sufficient to run Istio.
16+
17+
```
18+
minikube start
19+
--extra-config=controller-manager.cluster-signing-cert-file="/var/lib/localkube/certs/ca.crt"
20+
--extra-config=controller-manager.cluster-signing-key-file="/var/lib/localkube/certs/ca.key"
21+
--extra-config=apiserver.admission-control="NamespaceLifecycle,LimitRanger,ServiceAccount,PersistentVolumeLabel,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota"
22+
--kubernetes-version=v1.10.0
23+
```
24+
25+
### Else
26+
27+
In case the first approach doesn't work, here are the full references to set up Minikube:
28+
- [Install Minikube](https://kubernetes.io/docs/tasks/tools/install-minikube/)
29+
- [Minikube release](https://github.com/kubernetes/minikube/releases)
30+
- [Vbox download](https://www.virtualbox.org/wiki/Downloads)
31+
- [Set up Minikube](https://kubernetes.io/docs/setup/minikube/)
32+
433

534
### Clone the lab repo
635

exercise-6/README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,39 @@ image: docker.io/istio/proxy######
2929
imagePullPolicy: IfNotPresent
3030
name: istio-proxy
3131
```
32+
#### Automatic sidecar injection
33+
34+
Istio sidecars can also be automatically injected into a pod at creation time using a feature in Kubernetes called a mutating webhook admission controller. Note that unlike manual injection, automatic injection occurs at the pod-level. You won't see any change to the deployment itself. Instead you'll want to check individual pods (via kubectl describe) to see the injected proxy.
35+
36+
An admission controller is a piece of code that intercepts requests to the Kubernetes API server prior to persistence of the object, but after the request is authenticated and authorized. Admission controllers may be “validating”, “mutating”, or both. Mutating controllers may modify the objects they admit; validating controllers may not.
37+
38+
The admission control process proceeds in two phases. In the first phase, mutating admission controllers are run. In the second phase, validating admission controllers are run.
39+
40+
MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object.
41+
42+
For Istio the webhook is the sidecar injector webhook deployment called "istio-sidecar-injector". It will modify a pod before it is started to inject an istio init container and istio proxy container.
43+
44+
#### Using the Sidecar Injector
45+
46+
By default, Istio is configured to apply a sidecar injector to namespaces with the label/value of `istio-injection=enabled`.
47+
48+
Label the default namespace with `istio-injection` label set to `enabled`.
49+
50+
```sh
51+
kubectl label namespace default istio-injection=enabled
52+
```
53+
54+
Check that the label is applied.
55+
56+
```sh
57+
kubectl get namespace -L istio-injection
58+
59+
NAME STATUS AGE ISTIO-INJECTION
60+
default Active 1h enabled
61+
istio-system Active 1h
62+
kube-public Active 1h
63+
kube-system Active 1h
64+
```
3265

3366
### Deploy Guestbook services
3467

exercise-7/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## Exercise 7 - Istio Ingress Controller
22

3+
**NOTE: If you are using Minikube, this section may not work. However there are other approaches to access the service such as using [telepresence](https://www.telepresence.io/).**
4+
35
The components deployed on the service mesh by default are not exposed outside the cluster. External access to individual services so far has been provided by creating an external load balancer on each service.
46

57
Traditionally in Kubernetes, you would use an Ingress to configure a L7 proxy. However, Istio provides a much richer set of proxy configurations that are not well-defined in Kubernetes Ingress.

0 commit comments

Comments
 (0)