Skip to content

Commit 7a6ae1d

Browse files
committed
sync service local-debugging
sync service local-debugging
1 parent d4b4e0d commit 7a6ae1d

File tree

2 files changed

+39
-11
lines changed

2 files changed

+39
-11
lines changed

content/zh-cn/docs/concepts/services-networking/service.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1116,7 +1116,7 @@ Select one of the tabs.
11161116
metadata:
11171117
name: my-service
11181118
annotations:
1119-
cloud.google.com/load-balancer-type: "Internal"
1119+
networking.gke.io/load-balancer-type: "Internal"
11201120
[...]
11211121
```
11221122

content/zh-cn/docs/tasks/debug/debug-cluster/local-debugging.md

Lines changed: 38 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,31 @@ content_type: task
1212
{{% thirdparty-content %}}
1313

1414
<!--
15-
Kubernetes applications usually consist of multiple, separate services, each running in its own container. Developing and debugging these services on a remote Kubernetes cluster can be cumbersome, requiring you to [get a shell on a running container](/docs/tasks/debug/debug-application/get-shell-running-container/) in order to run debugging tools.
15+
Kubernetes applications usually consist of multiple, separate services,
16+
each running in its own container. Developing and debugging these services
17+
on a remote Kubernetes cluster can be cumbersome, requiring you to
18+
[get a shell on a running container](/docs/tasks/debug/debug-application/get-shell-running-container/)
19+
in order to run debugging tools.
1620
-->
1721
Kubernetes 应用程序通常由多个独立的服务组成,每个服务都在自己的容器中运行。
1822
在远端的 Kubernetes 集群上开发和调试这些服务可能很麻烦,
1923
需要[在运行的容器上打开 Shell](/zh-cn/docs/tasks/debug/debug-application/get-shell-running-container/)
2024
以运行调试工具。
2125

2226
<!--
23-
`telepresence` is a tool to ease the process of developing and debugging services locally while proxying the service to a remote Kubernetes cluster. Using `telepresence` allows you to use custom tools, such as a debugger and IDE, for a local service and provides the service full access to ConfigMap, secrets, and the services running on the remote cluster.
27+
`telepresence` is a tool to ease the process of developing and debugging
28+
services locally while proxying the service to a remote Kubernetes cluster.
29+
Using `telepresence` allows you to use custom tools, such as a debugger and
30+
IDE, for a local service and provides the service full access to ConfigMap,
31+
secrets, and the services running on the remote cluster.
2432
-->
2533
`telepresence` 是一个工具,用于简化本地开发和调试服务的过程,同时可以将服务代理到远程 Kubernetes 集群。
2634
`telepresence` 允许你使用自定义工具(例如调试器和 IDE)调试本地服务,
2735
并能够让此服务完全访问 ConfigMap、Secret 和远程集群上运行的服务。
2836

2937
<!--
30-
This document describes using `telepresence` to develop and debug services running on a remote cluster locally.
38+
This document describes using `telepresence` to develop and debug services
39+
running on a remote cluster locally.
3140
-->
3241
本文档描述如何在本地使用 `telepresence` 开发和调试远程集群上运行的服务。
3342

@@ -47,7 +56,8 @@ This document describes using `telepresence` to develop and debug services runni
4756
<!--
4857
## Connecting your local machine to a remote Kubernetes cluster
4958
50-
After installing `telepresence`, run `telepresence connect` to launch its Daemon and connect your local workstation to the cluster.
59+
After installing `telepresence`, run `telepresence connect` to launch
60+
its Daemon and connect your local workstation to the cluster.
5161
-->
5262
## 从本机连接到远程 Kubernetes 集群 {#connecting-your-local-machine-to-a-remote-cluster}
5363

@@ -70,7 +80,11 @@ You can curl services using the Kubernetes syntax e.g. `curl -ik https://kuberne
7080
<!--
7181
## Developing or debugging an existing service
7282
73-
When developing an application on Kubernetes, you typically program or debug a single service. The service might require access to other services for testing and debugging. One option is to use the continuous deployment pipeline, but even the fastest deployment pipeline introduces a delay in the program or debug cycle.
83+
When developing an application on Kubernetes, you typically program
84+
or debug a single service. The service might require access to other
85+
services for testing and debugging. One option is to use the continuous
86+
deployment pipeline, but even the fastest deployment pipeline introduces
87+
a delay in the program or debug cycle.
7488
-->
7589
## 开发和调试现有的服务 {#developing-or-debugging-an-existing-service}
7690

@@ -79,8 +93,9 @@ When developing an application on Kubernetes, you typically program or debug a s
7993
一种选择是使用连续部署流水线,但即使最快的部署流水线也会在程序或调试周期中引入延迟。
8094

8195
<!--
82-
Use the `telepresence intercept $SERVICE_NAME --port $LOCAL_PORT:$REMOTE_PORT` command to create an "intercept" for rerouting remote service traffic.
83-
96+
Use the `telepresence intercept $SERVICE_NAME --port $LOCAL_PORT:$REMOTE_PORT`
97+
command to create an "intercept" for rerouting remote service traffic.
98+
8499
Where:
85100
86101
- `$SERVICE_NAME` is the name of your local service
@@ -97,7 +112,11 @@ Where:
97112
- `$REMOTE_PORT` 是服务在集群中侦听的端口
98113

99114
<!--
100-
Running this command tells Telepresence to send remote traffic to your local service instead of the service in the remote Kubernetes cluster. Make edits to your service source code locally, save, and see the corresponding changes when accessing your remote application take effect immediately. You can also run your local service using a debugger or any other local development tool.
115+
Running this command tells Telepresence to send remote traffic to your
116+
local service instead of the service in the remote Kubernetes cluster.
117+
Make edits to your service source code locally, save, and see the corresponding
118+
changes when accessing your remote application take effect immediately.
119+
You can also run your local service using a debugger or any other local development tool.
101120
-->
102121
运行此命令会告诉 Telepresence 将远程流量发送到本地服务,而不是远程 Kubernetes 集群中的服务中。
103122
在本地编辑保存服务源代码,并在访问远程应用时查看相应变更会立即生效。
@@ -106,7 +125,14 @@ Running this command tells Telepresence to send remote traffic to your local ser
106125
<!--
107126
## How does Telepresence work?
108127
109-
Telepresence installs a traffic-agent sidecar next to your existing application's container running in the remote cluster. It then captures all traffic requests going into the Pod, and instead of forwarding this to the application in the remote cluster, it routes all traffic (when you create a [global intercept](https://www.getambassador.io/docs/telepresence/latest/concepts/intercepts/#global-intercept)) or a subset of the traffic (when you create a [personal intercept](https://www.getambassador.io/docs/telepresence/latest/concepts/intercepts/#personal-intercept)) to your local development environment.
128+
Telepresence installs a traffic-agent sidecar next to your existing
129+
application's container running in the remote cluster. It then captures
130+
all traffic requests going into the Pod, and instead of forwarding this
131+
to the application in the remote cluster, it routes all traffic (when you
132+
create a [global intercept](https://www.getambassador.io/docs/telepresence/latest/concepts/intercepts/#global-intercept)
133+
or a subset of the traffic (when you create a
134+
[personal intercept](https://www.getambassador.io/docs/telepresence/latest/concepts/intercepts/#personal-intercept))
135+
to your local development environment.
110136
-->
111137
## Telepresence 是如何工作的? {#how-does-telepresence-work}
112138

@@ -119,7 +145,9 @@ Telepresence 会在远程集群中运行的现有应用程序容器旁边安装
119145
## {{% heading "whatsnext" %}}
120146

121147
<!--
122-
If you're interested in a hands-on tutorial, check out [this tutorial](https://cloud.google.com/community/tutorials/developing-services-with-k8s) that walks through locally developing the Guestbook application on Google Kubernetes Engine.
148+
If you're interested in a hands-on tutorial, check out
149+
[this tutorial](https://cloud.google.com/community/tutorials/developing-services-with-k8s)
150+
that walks through locally developing the Guestbook application on Google Kubernetes Engine.
123151
-->
124152
如果你对实践教程感兴趣,
125153
请查看[本教程](https://cloud.google.com/community/tutorials/developing-services-with-k8s)

0 commit comments

Comments
 (0)