From ea85d09cd146470caeed545b43f9e923ef3f0579 Mon Sep 17 00:00:00 2001 From: Qiming Teng Date: Mon, 12 Oct 2020 11:23:15 +0800 Subject: [PATCH] [zh] Sync changes to Ingress example This is a sync from English site where the sample YAML is spawn into a standalone file. (a79db9d5de5ab44ed350edc6050add9e807d0c13). --- .../ingress-minikube.md | 23 ++----------------- .../service/networking/example-ingress.yaml | 18 +++++++++++++++ 2 files changed, 20 insertions(+), 21 deletions(-) create mode 100644 content/zh/examples/service/networking/example-ingress.yaml diff --git a/content/zh/docs/tasks/access-application-cluster/ingress-minikube.md b/content/zh/docs/tasks/access-application-cluster/ingress-minikube.md index 16f7b00ea7..5add4e7920 100644 --- a/content/zh/docs/tasks/access-application-cluster/ingress-minikube.md +++ b/content/zh/docs/tasks/access-application-cluster/ingress-minikube.md @@ -197,26 +197,7 @@ The following file is an Ingress resource that sends traffic to your Service via 1. 根据下面的 YAML 创建文件 `example-ingress.yaml`: - ```yaml - apiVersion: networking.k8s.io/v1 - kind: Ingress - metadata: - name: example-ingress - annotations: - nginx.ingress.kubernetes.io/rewrite-target: /$1 - spec: - rules: - - host: hello-world.info - http: - paths: - - path: / - pathType: Prefix - backend: - service: - name: web - port: - number: 8080 - ``` + {{< codenew file="service/networking/example-ingress.yaml" >}} diff --git a/content/zh/examples/service/networking/example-ingress.yaml b/content/zh/examples/service/networking/example-ingress.yaml new file mode 100644 index 0000000000..b309d13275 --- /dev/null +++ b/content/zh/examples/service/networking/example-ingress.yaml @@ -0,0 +1,18 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: example-ingress + annotations: + nginx.ingress.kubernetes.io/rewrite-target: /$1 +spec: + rules: + - host: hello-world.info + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: web + port: + number: 8080 \ No newline at end of file