istio在k8s中的部署

官方github:https://github.com/istio/istio

官方部署介绍文档:https://istio.io/latest/zh/docs/setup/getting-started/

1.下载istio

curl -L https://istio.io/downloadIstio | sh -

这一步就是下载istio,地址会映射到一般是github,如果无法通过脚本下载,建议直接访问 https://github.com/istio/istio/releases 进行下载。下载完成后执行

tar -xzf fileName

这样完成后和上面直接运行脚本的效果是一样的。

2.转到 Istio 包目录

cd istio-1.17.1/

安装目录包含:

  • samples/ 目录下的示例应用程序
  • bin/ 目录下的 istioctl 客户端二进制文件。

3.将 istioctl 客户端添加到路径(Linux 或 macOS)

export PATH=$PWD/bin:$PATH

4.安装istio

istioctl install --set profile=demo -y
✔ Istio core installed                                                                                                                                                                                           
✔ Istiod installed                                                                                                                                                                                               
✔ Egress gateways installed                                                                                                                                                                                      
✔ Ingress gateways installed                                                                                                                                                                                     
✔ Installation complete                                                                                                                                                                                          Making this installation the default for injection and validation.

Thank you for installing Istio 1.17.  Please take a few minutes to tell us about your install/upgrade experience!  https://forms.gle/hMHGiwZHPU7UQRWe9

在学习过程中建议profile选择demo,生产及其他环境请按照需求选择配置文件,具体参考:https://istio.io/latest/zh/docs/setup/additional-setup/config-profiles/

5.给命名空间添加标签,指示 Istio 在部署应用的时候,自动注入 Envoy 边车代理:

kubectl label namespace default istio-injection=enabled

namespace/default labeled

kubectl describe ns default

Name: default
Labels: istio-injection=enabled
kubernetes.io/metadata.name=default
Annotations: <none>
Status: Active

No resource quota.

No LimitRange resource.

 

posted @ 2023-02-27 13:44  SpringCore  阅读(237)  评论(0编辑  收藏  举报