前提:安装并启动kubernetes
一、下载
```
$ wget https://github.com/istio/istio/releases/download/1.11.2/istio-1.11.2-linux-amd64.tar.gz
$ tar zxvf istio-1.11.2-linux-amd64.tar.gz -C /usr/local/
```
二、设置环境变量
```
$ echo 'export ISTIO_HOME=/usr/local/istio-1.11.2' >> /etc/profile
$ echo 'export PATH=$PATH:$ISTIO_HOME/bin' >> /etc/profile
```
加载环境变量
```
$ source /etc/profile
```
三、安装
```
$ istioctl install --set profile=demo -y
```
![](https://img.kancloud.cn/85/38/853813df26938e43d0fde4882eabdb61_1516x298.png)
查看istio版本
```
$ istioctl version
```
四、部署官方demo
```
$ cd /usr/local/istio-1.11.2
$ kubectl apply -f samples/bookinfo/platform/kube/bookinfo.yaml
```
![](https://img.kancloud.cn/d8/4d/d84d24642d216e1a285f4fc6447248c4_1642x850.png)
```
$ kubectl get services
```
![](https://img.kancloud.cn/01/1f/011f065158ac7c779fc30068d64c625e_1202x332.png)
删除demo
```
$ kubectl delete -f samples/bookinfo/platform/kube/bookinfo.yaml
```
五、
~~~
$ kubectl create serviceaccount istio-admin -n istio-system
$ kubectl create clusterrolebinding istio-admin --clusterrole=cluster-admin --serviceaccount=istio-system:istio-admin
$ kubectl describe secrets -n istio-system $(kubectl -n istio-system get secret | awk '/istio-admin/{print $1}')
~~~
、参考链接
* istio官网链接:https://istio.io/latest/docs/setup/getting-started/
* 安装istio:https://www.cnblogs.com/xiao987334176/p/14236554.html
* 初识istio:https://www.cnblogs.com/freshchen/p/13765650.html