Istio 1.0.1作为8月份的版本已经发布,主要修复了1.0.0版本发布以来发现的一些关键Issue。官网的release note(istio.io/about/notes… Istio涉及的组件和CRD较多,Istio 1.0 中包含了 51 个 CRD,组件包括pilot,galley,policy,telemetry,citadel和许多插件,对想快速试用Istio的同学来说比较困难。
Istio 1.0.1允许部署一个仅包含 Pilot 组件的最小轻量级的 Istio。对想快速上手 Istio 和只想使用 Istio 流量治理功能的同学带来了福音。Istio 的流量治理功能非常强大,包括配置请求路由,设置请求超时,重试,熔断,故障注入,实现灰度发布等。
下面让我们一起看下如何安装一个最小化的 Istio:
首先需要一个已经安装了Kubernetes的环境,并下载Istio1.0.1版本:(github.com/istio/istio…
步骤如下
- 通过 kubectl apply 命令安装 Istio 的 Custom Resource Definitions,等待几秒直到 CRDs 提交 kube-apiserver:
kubectl apply -f install/kubernetes/helm/istio/templates/crds.yaml
- 通过helm template,渲染Istio核心组件到
istio-minimal.yaml(Kubernetes manifest文件):
helm template install/kubernetes/helm/istio --name istio --namespace istio-system \
--set security.enabled=false \
--set ingress.enabled=false \
--set gateways.istio-ingressgateway.enabled=false \
--set gateways.istio-egressgateway.enabled=false \
--set galley.enabled=false \
--set sidecarInjectorWebhook.enabled=false \
--set mixer.enabled=false \
--set prometheus.enabled=false \
--set global.proxy.envoyStatsd.enabled=false \
--set pilot.sidecar=false > $HOME/istio-minimal.yaml
- 创建 istio-system 的命名空间:
kubectl create namespace istio-system
- 通过第2步生成的 manifest 安装 pilot 组件:
kubectl apply -f $HOME/istio-minimal.yaml
- 检查istio-pilot-* pod 是否部署成功:
kubectl get pods -n istio-system

最后卸载Istio也很方便:
kubectl delete -f $HOME/istio-minimal.yaml
kubectl delete -f install/kubernetes/helm/istio/templates/crds.yaml -n istio-system