Skip to content

Commit 42313ab

Browse files
authored
Merge pull request #27977 from CaoDonghui123/fix4
[zh]Resync tasks files[9]
2 parents 94da19e + 4795d7f commit 42313ab

File tree

2 files changed

+110
-87
lines changed

2 files changed

+110
-87
lines changed

content/zh/docs/tasks/access-application-cluster/access-cluster.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ You have several options for connecting to nodes, pods and services from outside
381381
- Use a service with type `NodePort` or `LoadBalancer` to make the service reachable outside
382382
the cluster. See the [services](/docs/user-guide/services) and
383383
[kubectl expose](/docs/reference/generated/kubectl/kubectl-commands/#expose) documentation.
384-
- Depending on your cluster environment, this may just expose the service to your corporate network,
384+
- Depending on your cluster environment, this may only expose the service to your corporate network,
385385
or it may expose it to the internet. Think about whether the service being exposed is secure.
386386
Does it do its own authentication?
387387
- Place pods behind services. To access one specific pod from a set of replicas, such as for debugging,
@@ -482,28 +482,29 @@ at `https://104.197.5.247/api/v1/namespaces/kube-system/services/elasticsearch-l
482482
<!--
483483
#### Manually constructing apiserver proxy URLs
484484
485-
As mentioned above, you use the `kubectl cluster-info` command to retrieve the service's proxy URL. To create proxy URLs that include service endpoints, suffixes, and parameters, you simply append to the service's proxy URL:
485+
As mentioned above, you use the `kubectl cluster-info` command to retrieve the service's proxy URL. To create proxy URLs that include service endpoints, suffixes, and parameters, you append to the service's proxy URL:
486486
`http://`*`kubernetes_master_address`*`/api/v1/namespaces/`*`namespace_name`*`/services/`*`service_name[:port_name]`*`/proxy`
487487
488-
If you haven't specified a name for your port, you don't have to specify *port_name* in the URL.
488+
If you haven't specified a name for your port, you don't have to specify *port_name* in the URL. You can also use the port number in place of the *port_name* for both named and unnamed ports.
489489
490490
By default, the API server proxies to your service using http. To use https, prefix the service name with `https:`:
491491
`http://`*`kubernetes_master_address`*`/api/v1/namespaces/`*`namespace_name`*`/services/`*`https:service_name:[port_name]`*`/proxy`
492492
493493
The supported formats for the name segment of the URL are:
494494
495495
* `<service_name>` - proxies to the default or unnamed port using http
496-
* `<service_name>:<port_name>` - proxies to the specified port using http
496+
* `<service_name>:<port_name>` - proxies to the specified port name or port number using http
497497
* `https:<service_name>:` - proxies to the default or unnamed port using https (note the trailing colon)
498-
* `https:<service_name>:<port_name>` - proxies to the specified port using https
498+
* `https:<service_name>:<port_name>` - proxies to the specified port name or port number using https
499499
-->
500500
#### 手动构建 apiserver 代理 URL {#manually-constructing-apiserver-proxy-urls}
501501

502502
如上所述,你可以使用 `kubectl cluster-info` 命令来获得服务的代理 URL。
503-
要创建包含服务端点、后缀和参数的代理 URL,只需添加到服务的代理 URL:
503+
要创建包含服务端点、后缀和参数的代理 URL,需添加到服务的代理 URL:
504504
`http://`*`kubernetes_master_address`*`/api/v1/namespaces/`*`namespace_name`*`/services/`*`service_name[:port_name]`*`/proxy`
505505

506506
如果尚未为端口指定名称,则不必在 URL 中指定 *port_name*
507+
对于已命名和未命名的端口,也可以使用端口号代替 *port_name*
507508

508509
默认情况下,API server 使用 HTTP 代理你的服务。
509510
要使用 HTTPS,请在服务名称前加上 `https:`
@@ -512,9 +513,9 @@ The supported formats for the name segment of the URL are:
512513
URL 名称段支持的格式为:
513514

514515
* `<service_name>` - 使用 http 代理到默认或未命名的端口
515-
* `<service_name>:<port_name>` - 使用 http 代理到指定的端口
516+
* `<service_name>:<port_name>` - 使用 http 代理到指定的端口名称或端口号
516517
* `https:<service_name>:` - 使用 https 代理到默认或未命名的端口(注意后面的冒号)
517-
* `https:<service_name>:<port_name>` - 使用 https 代理到指定的端口
518+
* `https:<service_name>:<port_name>` - 使用 https 代理到指定的端口名称或端口号
518519

519520
<!--
520521
##### Examples
@@ -628,7 +629,7 @@ There are several different proxies you may encounter when using Kubernetes:
628629
- proxies UDP and TCP
629630
- does not understand HTTP
630631
- provides load balancing
631-
- is just used to reach services
632+
- is only used to reach services
632633
-->
633634
3. [kube proxy](/zh/docs/concepts/services-networking/service/#ips-and-vips)
634635

0 commit comments

Comments
 (0)