You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/zh-cn/docs/tasks/debug/debug-cluster/local-debugging.md
+38-10Lines changed: 38 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,22 +12,31 @@ content_type: task
12
12
{{% thirdparty-content %}}
13
13
14
14
<!--
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/)
`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.
@@ -70,7 +80,11 @@ You can curl services using the Kubernetes syntax e.g. `curl -ik https://kuberne
70
80
<!--
71
81
## Developing or debugging an existing service
72
82
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
@@ -79,8 +93,9 @@ When developing an application on Kubernetes, you typically program or debug a s
79
93
一种选择是使用连续部署流水线,但即使最快的部署流水线也会在程序或调试周期中引入延迟。
80
94
81
95
<!--
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
+
84
99
Where:
85
100
86
101
- `$SERVICE_NAME` is the name of your local service
@@ -97,7 +112,11 @@ Where:
97
112
-`$REMOTE_PORT` 是服务在集群中侦听的端口
98
113
99
114
<!--
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.
@@ -106,7 +125,14 @@ Running this command tells Telepresence to send remote traffic to your local ser
106
125
<!--
107
126
## How does Telepresence work?
108
127
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)
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
0 commit comments