# istio实战

## 下载istio

安装最新稳定版本 curl -L <https://istio.io/downloadIstio> | sh -

安装指定版本 curl -L <https://istio.io/downloadIstio> | ISTIO\_VERSION=1.8.0-alpha.2 sh -

## 安装istio

对于loadbalancer类型

```
istioctl install --set profile=demo -y
```

对于Nodeport类型

```
istioctl manifest generate --set profile=demo | sed "s/LoadBalancer/NodePort/g" | kubectl apply -f -
```

添加名称空间标签,以使Istio在对应命名空间部署应用程序时自动注入Envoy sidecar代理:

```
kubectl label namespace default istio-injection=enabled
namespace/default labeled
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://rocdu.gitbook.io/deep-understanding-of-istio/4.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
