Istio 在 Kubernetes 中部署:完整安装指南

1. Istio下载

  1. 点击下载或者使用如下命令进行下载。
[root@c72082 ~]# curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.6.0 sh -
% Total   % Received % Xferd Average Speed   Time   Time     Time Current
                                Dload Upload   Total   Spent   Left Speed
100   107  100   107    0     0     98      0  0:00:01  0:00:01 --:--:--    98
100  3896  100  3896    0     0   2601      0  0:00:01  0:00:01 --:--:--  2601
Downloading istio-1.6.0 from https://github.com/istio/istio/releases/download/1.6.0/istio-1.6.0-linux.tar.gz ...Failed.
​
Trying with TARGET_ARCH. Downloading istio-1.6.0 from https://github.com/istio/istio/releases/download/1.6.0/istio-1.6.0-linux-amd64.tar.gz ...
​
Istio 1.6.0 Download Complete!
​
Istio has been successfully downloaded into the istio-1.6.0 folder on your system.
​
Next Steps:
See https://istio.io/docs/setup/kubernetes/install/ to add Istio to your Kubernetes cluster.
​
To configure the istioctl client tool for your workstation,
add the /root/istio-1.6.0/bin directory to your environment path variable with:
export PATH="$PATH:/root/istio-1.6.0/bin"
​
Begin the Istio pre-installation verification check by running:
istioctl verify-install
​
Need more information? Visit https://istio.io/docs/setup/kubernetes/install/

[warning]以上命令将会下载最新的istio版本,如果想要下载指定的版本。使用如下命令

#  下载1.4.3版本的
curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.4.3 sh -
  1. 进入到下载的istio目录
cd istio-1.6.0

这些安装目录包含如下:

  • install/kubernetes: 针对kubernetes的安装YAML文件.
  • samples/: 应用案例
  • bin/: istioctl客户端二进制文件。
  1. 添加istioctl客户端到你的路径。
export PATH=$PWD/bin:$PATH

或者执行如下:

[root@c72082 istio-1.6.0]# ln -s  /root/istio-1.6.0/bin/istioctl /usr/local/bin/istioctl

2. Istio的部署

  1. 针对安装,在这里使用demo的配置文件。它被选择为具有一组用于测试的良好默认设置,但是还有用于生产或性能测试的其他配置文件。
$ istioctl manifest apply --set profile=demo
​
Detected that your cluster does not support third party JWT authentication. Falling back to less secure first party JWT. See https://istio.io/docs/ops/best-practices/security/#configure-third-party-service-account-tokens for details.
- Applying manifest for component Base...
✔ Finished applying manifest for component Base.
- Applying manifest for component Pilot...
✔ Finished applying manifest for component Pilot.
Waiting for resources to become ready...
- Applying manifest for component IngressGateways...
- Applying manifest for component EgressGateways...
- Applying manifest for component AddonComponents...
✔ Finished applying manifest for component EgressGateways.
✔ Finished applying manifest for component IngressGateways.
✔ Finished applying manifest for component AddonComponents.
✔ Installation complete
  1. 添加名称空间的标签,当部署应用后,告诉istio去自动的注入Envoy sidecar代理。
$ kubectl label namespace default istio-injection=enabled
namespace/default labeled

发表回复

后才能评论