mirror of https://github.com/istio/istio.io.git
[zh] Sync boilerplates folder (#14513)
This commit is contained in:
parent
74cdfd4bb4
commit
a005918603
|
@ -1,16 +0,0 @@
|
||||||
---
|
|
||||||
---
|
|
||||||
{{< tip >}}
|
|
||||||
{{< boilerplate gateway-api-future >}}
|
|
||||||
{{< boilerplate gateway-api-choose >}}
|
|
||||||
{{< /tip >}}
|
|
||||||
|
|
||||||
{{< warning >}}
|
|
||||||
以下 Gateway API 指令包括 [Experimental(实验)](https://gateway-api.sigs.k8s.io/geps/overview/#status)以及
|
|
||||||
Istio 特定的功能。在使用 Gateway API 指令之前,请确保安装**实验版本**的 Gateway API CRD:
|
|
||||||
|
|
||||||
{{< text syntax=bash snip_id=install_experimental_crds >}}
|
|
||||||
$ kubectl kustomize "github.com/kubernetes-sigs/gateway-api/config/crd/experimental?ref={{< k8s_gateway_api_version >}}" | kubectl apply -f -
|
|
||||||
{{< /text >}}
|
|
||||||
|
|
||||||
{{< /warning >}}
|
|
|
@ -6,9 +6,9 @@
|
||||||
{{< /tip >}}
|
{{< /tip >}}
|
||||||
|
|
||||||
{{< warning >}}
|
{{< warning >}}
|
||||||
请注意,本文使用 Gateway API 配置内部网格(东西)流量,即不仅是 Ingress(南北)流量。
|
本文使用 Gateway API 配置内部网格(东西)流量。
|
||||||
使用 Gateway API 配置内部网格流量目前是一个还在开发的[实验性特性](https://gateway-api.sigs.k8s.io/geps/overview/#status)。
|
使用 Gateway API 配置内部网格流量目前是一个还在开发的[实验性特性](https://gateway-api.sigs.k8s.io/geps/overview/#status),
|
||||||
在使用 Gateway API 指令之前,请确保:
|
也是 Istio 特有的功能。在使用 Gateway API 指令之前,请确保:
|
||||||
|
|
||||||
1) 安装 **实验版本** 的 Gateway API CRD:
|
1) 安装 **实验版本** 的 Gateway API CRD:
|
||||||
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
---
|
|
||||||
---
|
|
||||||
{{< text syntax=plain snip_id=value >}}
|
|
||||||
{{< k8s_gateway_api_version >}}
|
|
||||||
{{< /text >}}
|
|
|
@ -28,7 +28,8 @@ test: yes
|
||||||
[启用 Envoy 的访问记录](/zh/docs/tasks/observability/logs/access-log/#enable-envoy-s-access-logging)。
|
[启用 Envoy 的访问记录](/zh/docs/tasks/observability/logs/access-log/#enable-envoy-s-access-logging)。
|
||||||
|
|
||||||
* 部署 [sleep]({{< github_tree >}}/samples/sleep) 这个示例应用,用作发送请求的测试源。
|
* 部署 [sleep]({{< github_tree >}}/samples/sleep) 这个示例应用,用作发送请求的测试源。
|
||||||
如果您启用了[自动注入 Sidecar](/zh/docs/setup/additional-setup/sidecar-injection/#automatic-sidecar-injection),使用以下的命令来部署示例应用:
|
如果您启用了[自动注入 Sidecar](/zh/docs/setup/additional-setup/sidecar-injection/#automatic-sidecar-injection),
|
||||||
|
使用以下的命令来部署示例应用:
|
||||||
|
|
||||||
{{< text bash >}}
|
{{< text bash >}}
|
||||||
$ kubectl apply -f @samples/sleep/sleep.yaml@
|
$ kubectl apply -f @samples/sleep/sleep.yaml@
|
||||||
|
@ -246,9 +247,9 @@ Istio 代理允许调用未知的服务。如果这个选项设置为 `REGISTRY_
|
||||||
与集群间请求类似,可以为使用 `ServiceEntry` 配置访问的外部服务设置路由规则。
|
与集群间请求类似,可以为使用 `ServiceEntry` 配置访问的外部服务设置路由规则。
|
||||||
在本示例中,您将设置对 `httpbin.org` 服务访问的超时规则。
|
在本示例中,您将设置对 `httpbin.org` 服务访问的超时规则。
|
||||||
|
|
||||||
{{< boilerplate gateway-api-experimental >}}
|
{{< boilerplate gateway-api-gamma-support >}}
|
||||||
|
|
||||||
1. 从用作测试源的 Pod 内部,向外部服务 `httpbin.org` 的 `/delay`
|
1) 从用作测试源的 Pod 内部,向外部服务 `httpbin.org` 的 `/delay`
|
||||||
endpoint 发出 **curl** 请求:
|
endpoint 发出 **curl** 请求:
|
||||||
|
|
||||||
{{< text bash >}}
|
{{< text bash >}}
|
||||||
|
@ -261,11 +262,11 @@ Istio 代理允许调用未知的服务。如果这个选项设置为 `REGISTRY_
|
||||||
|
|
||||||
这个请求大约在 5 秒内返回 200 (OK)。
|
这个请求大约在 5 秒内返回 200 (OK)。
|
||||||
|
|
||||||
1. 退出测试源 Pod,使用 `kubectl` 设置调用外部服务 `httpbin.org` 的超时时间为 3 秒。
|
2) 使用 `kubectl` 设置调用外部服务 `httpbin.org` 的超时时间为 3 秒。
|
||||||
|
|
||||||
{{< tabset category-name="config-api" >}}
|
{{< tabset category-name="config-api" >}}
|
||||||
|
|
||||||
{{< tab name="Istio APIs" category-value="istio-apis" >}}
|
{{< tab name="Istio API" category-value="istio-apis" >}}
|
||||||
|
|
||||||
{{< text bash >}}
|
{{< text bash >}}
|
||||||
$ kubectl apply -f - <<EOF
|
$ kubectl apply -f - <<EOF
|
||||||
|
@ -317,7 +318,7 @@ EOF
|
||||||
|
|
||||||
{{< /tabset >}}
|
{{< /tabset >}}
|
||||||
|
|
||||||
1. 几秒后,重新发出 **curl** 请求:
|
3) 几秒后,重新发出 **curl** 请求:
|
||||||
|
|
||||||
{{< text bash >}}
|
{{< text bash >}}
|
||||||
$ kubectl exec "$SOURCE_POD" -c sleep -- time curl -o /dev/null -sS -w "%{http_code}\n" http://httpbin.org/delay/5
|
$ kubectl exec "$SOURCE_POD" -c sleep -- time curl -o /dev/null -sS -w "%{http_code}\n" http://httpbin.org/delay/5
|
||||||
|
@ -334,7 +335,7 @@ EOF
|
||||||
|
|
||||||
{{< tabset category-name="config-api" >}}
|
{{< tabset category-name="config-api" >}}
|
||||||
|
|
||||||
{{< tab name="Istio APIs" category-value="istio-apis" >}}
|
{{< tab name="Istio API" category-value="istio-apis" >}}
|
||||||
|
|
||||||
{{< text bash >}}
|
{{< text bash >}}
|
||||||
$ kubectl delete serviceentry httpbin-ext google
|
$ kubectl delete serviceentry httpbin-ext google
|
||||||
|
@ -494,7 +495,7 @@ $ kubectl describe pod kube-apiserver -n kube-system | grep 'service-cluster-ip-
|
||||||
{{< /warning >}}
|
{{< /warning >}}
|
||||||
|
|
||||||
使用平台的 IP 范围更新 `istio-sidecar-injector` 的配置。比如,如果 IP 范围是
|
使用平台的 IP 范围更新 `istio-sidecar-injector` 的配置。比如,如果 IP 范围是
|
||||||
10.0.0.1/24,则使用一下命令:
|
10.0.0.1/24,则使用以下命令:
|
||||||
|
|
||||||
{{< text syntax=bash snip_id=none >}}
|
{{< text syntax=bash snip_id=none >}}
|
||||||
$ istioctl install <flags-you-used-to-install-Istio> --set values.global.proxy.includeIPRanges="10.0.0.1/24"
|
$ istioctl install <flags-you-used-to-install-Istio> --set values.global.proxy.includeIPRanges="10.0.0.1/24"
|
||||||
|
|
Loading…
Reference in New Issue