Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[zh] Sync #16178 fix typos in Ambient docs into Chinese #16181

Merged
merged 2 commits into from
Feb 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions content/zh/docs/ambient/usage/networkpolicy/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,31 +30,35 @@ Istio 不是 CNI,不强制执行或管理 `NetworkPolicy`,
{{< text syntax=yaml snip_id=none >}}
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: my-app-allow-ingress-web
spec:
ingress:
- ports:
- port: 9090
protocol: TCP
podSelector:
matchLabels:
app.kubernetes.io/name: my-app
ingress:
- ports:
- port: 8080
protocol: TCP
{{< /text >}}

如果已将 `my-app` 添加到 Ambient 网格中,应改为:

{{< text syntax=yaml snip_id=none >}}
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: my-app-allow-ingress-web
spec:
podSelector:
matchLabels:
app.kubernetes.io/name: my-app
ingress:
- ports:
- port: 8080
protocol: TCP
- port: 15008
protocol: TCP
podSelector:
matchLabels:
app.kubernetes.io/name: my-app
{{< /text >}}

## Ambient、健康探测和 Kubernetes NetworkPolicy {#ambient-health-probes-and-kubernetes-networkpolicy}
Expand Down