Update localization guidelines (#10485)
* Update localization guidelines for language labels
Continuing work
Continuing work
Continuing work
More work in progress
Add local OWNERS folders
Add an OWNERS file to Chinese
Remove shortcode for repos
Add Japanese
Alphabetize languages, change weights accordingly
More updates
Add Korean in Korean
Add English to languageName
Feedback from gochist
Move Chinese content from cn/ to zh/
Move OWNERS from cn/ to zh/
Resolve merge conflicts by updating from master
Add files back in to prep for resolution
After rebase on upstream/master, remove files
Review and update localization guidelines
Feedback from gochist, tnir, cstoku
Add a trailing newline to content/ja/OWNERS
Add a trailing newline to content/zh/OWNERS
Drop requirement for GH repo project
Clarify language about forks/branches
Edits and typos
Remove a shortcode specific to a multi-repo language setup
Update aliases and owners
Add explicit OWNERS for content/en
Migrate content from Chinese repo, update regex in config.toml
Remove untranslated strings
Add trailing newline to content/en/OWNERS
Add trailing newlines to OWNERS files
add Jaguar project description (#10433)
* add Jaguar project description
[Jaguar](https://gitlab.com/sdnlab/jaguar) is an open source solution for Kubernetes's network based on OpenDaylight.
Jaguar provides overlay network using vxlan and Jaguar CNIPlugin provides one IP address per pod.
* Minor newline tweak
blog post for azure vmss (#10538)
Add microk8s to pick-right-solution.md (#10542)
* Add microk8s to pick-right-solution.md
Microk8s is a single-command installation of upstream Kubernetes on any Linux and should be included in the list of local-machine solutions.
* capitalized Istio
Add microk8s to foundational.md (#10543)
* Add microk8s to foundational.md
Adding microk8s as credible and stable alternative to get started with Kubernetes on a local machine. This is especially attractive for those not wanting to incur the overhead of running a VM for a local cluster.
* Update foundational.md
Thank you for your suggestions! LMK if this works now?
* Rewrote first paragraph
And included a bullet list of features of microk8s
* Copyedit
fix typo (#10545)
Fix the kubectl subcommands links. (#10550)
Signed-off-by: William Zhang <warmchang@outlook.com>
Fix command issue (#10515)
Signed-off-by: mooncake <xcoder@tenxcloud.com>
remove imported community files per issue 10184 (#10501)
networking.md: Markdown fix (#10498)
Fix front matter, federation command-line tools (#10500)
Clean up glossary entry (#10399)
update slack link (#10536)
typo in StatefulSet docs (#10558)
fix discription about horizontal pod autoscale (#10557)
Remove redundant symbols (#10556)
Fix issue #10520 (#10554)
Signed-off-by: William Zhang <warmchang@outlook.com>
Update api-concepts.md (#10534)
Revert "Fix command issue (#10515)"
This reverts commit c02a7fb9f9.
Update memory-constraint-namespace.md (#10530)
update memory request to 100MiB corresponding the yaml content
Blog: Introducing Volume Snapshot Alpha for Kubernetes (#10562)
* blog post for azure vmss
* snapshot blog post
Resolve merge conflicts in OWNERS*
Minor typo fix (#10567)
Not sure what's supposed to be here, proposing removing it.
* Feedback from gochist
Tweaks to feedback
* Feedback from ClaudiaJKang
This commit is contained in:
committed by
k8s-ci-robot
parent
753f57f0e6
commit
abcee2dccd
+190
@@ -0,0 +1,190 @@
|
||||
<!--
|
||||
---
|
||||
title: Provide Load-Balanced Access to an Application in a Cluster
|
||||
content_template: templates/tutorial
|
||||
weight: 50
|
||||
---
|
||||
-->
|
||||
---
|
||||
title: 提供对集群中应用程序的负载均衡访问
|
||||
content_template: templates/tutorial
|
||||
weight: 50
|
||||
---
|
||||
|
||||
{{% capture overview %}}
|
||||
|
||||
<!--
|
||||
This page shows how to create a Kubernetes Service object that provides
|
||||
load-balanced access to an application running in a cluster.
|
||||
-->
|
||||
本文展示如何创建一个 Kubernetes 服务对象,来提供负载均衡入口以访问集群内正在运行的应用程序。
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
|
||||
{{% capture prerequisites %}}
|
||||
|
||||
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
|
||||
{{% capture objectives %}}
|
||||
|
||||
<!--
|
||||
* Run two instances of a Hello World application
|
||||
* Create a Service object
|
||||
* Use the Service object to access the running application
|
||||
-->
|
||||
* 运行两个 Hello World 应用示例
|
||||
* 创建一个服务对象
|
||||
* 使用这个服务对象来访问正在运行的应用
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
|
||||
{{% capture lessoncontent %}}
|
||||
|
||||
<!--
|
||||
## Creating a Service for an application running in two pods
|
||||
|
||||
1. Run a Hello World application in your cluster:
|
||||
-->
|
||||
## 为在两个 pod 中运行的应用程序创建服务
|
||||
|
||||
1. 在您的集群中运行一个 Hello World 应用:
|
||||
|
||||
```
|
||||
kubectl run hello-world --replicas=2 --labels="run=load-balancer-example" --image=gcr.io/google-samples/node-hello:1.0 --port=8080
|
||||
```
|
||||
|
||||
<!--
|
||||
1. List the pods that are running the Hello World application:
|
||||
-->
|
||||
1. 列出运行 Hello World 应用的 pod:
|
||||
|
||||
```
|
||||
kubectl get pods --selector="run=load-balancer-example"
|
||||
```
|
||||
|
||||
<!--
|
||||
The output is similar to this:
|
||||
-->
|
||||
输出应类似于:
|
||||
|
||||
```
|
||||
NAME READY STATUS RESTARTS AGE
|
||||
hello-world-2189936611-8fyp0 1/1 Running 0 6m
|
||||
hello-world-2189936611-9isq8 1/1 Running 0 6m
|
||||
```
|
||||
|
||||
<!--
|
||||
1. Create a Service object that exposes the deployment:
|
||||
-->
|
||||
1. 创建一个服务对象来暴露这个 deployment:
|
||||
|
||||
```
|
||||
kubectl expose deployment <your-deployment-name> --type=NodePort --name=example-service
|
||||
```
|
||||
|
||||
<!--
|
||||
where `<your-deployment-name>` is the name of your deployment.
|
||||
|
||||
1. Display the IP addresses for your service:
|
||||
-->
|
||||
这里的 `<your-deployment-name>` 是您的 deployment 的名称。
|
||||
|
||||
1. 显示您服务的 IP 地址:
|
||||
|
||||
```
|
||||
kubectl get services example-service
|
||||
```
|
||||
|
||||
<!--
|
||||
The output shows the internal IP address and the external IP address of
|
||||
your service. If the external IP address shows as `<pending>`, repeat the
|
||||
command.
|
||||
-->
|
||||
输出展示了您服务的内部和外部 IP 地址。如果外部 IP 地址显示 `<pending>`,那么您需要重复运行以上命令。
|
||||
|
||||
{{< note >}}
|
||||
<!--
|
||||
**Note:** If you are using Minikube, you don't get an external IP address. The
|
||||
external IP address remains in the pending state.
|
||||
-->
|
||||
**注意:** 如果您使用 Minikube,那么您将不会获得外部 IP 地址。外部 IP 地址将保持 pending 状态。
|
||||
{{< /note >}}
|
||||
|
||||
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
|
||||
example-service 10.0.0.160 <pending> 8080/TCP 40s
|
||||
|
||||
<!--
|
||||
1. Use your Service object to access the Hello World application:
|
||||
-->
|
||||
1. 使用您的服务对象来访问这个 Hello World 应用:
|
||||
|
||||
curl <your-external-ip-address>:8080
|
||||
|
||||
<!--
|
||||
where `<your-external-ip-address>` is the external IP address of your
|
||||
service.
|
||||
|
||||
The output is a hello message from the application:
|
||||
-->
|
||||
这里的 `<your-external-ip-address>` 是您服务的外部 IP 地址。
|
||||
|
||||
输出是来自应用的 hello 消息:
|
||||
|
||||
Hello Kubernetes!
|
||||
|
||||
{{< note >}}
|
||||
<!--
|
||||
**Note:** If you are using Minikube, enter these commands:
|
||||
-->
|
||||
**注意:** 如果您使用 Minikube,输入以下命令:
|
||||
{{< /note >}}
|
||||
|
||||
kubectl cluster-info
|
||||
kubectl describe services example-service
|
||||
|
||||
<!--
|
||||
The output displays the IP address of your Minikube node and the NodePort
|
||||
value for your service. Then enter this command to access the Hello World
|
||||
application:
|
||||
-->
|
||||
输出将展示您的 Minikube 节点的 IP 地址和您服务的 NodePort 值。然后输入以下命令来访问这个 Hello World 应用:
|
||||
|
||||
curl <minikube-node-ip-address>:<service-node-port>
|
||||
|
||||
<!--
|
||||
where `<minikube-node-ip-address>` us the IP address of your Minikube node,
|
||||
and `<service-node-port>` is the NodePort value for your service.
|
||||
-->
|
||||
这里的 `<minikube-node-ip-address>` 是您的 Minikube 节点的 IP 地址,`<service-node-port>` 是您服务的 NodePort 值。
|
||||
|
||||
<!--
|
||||
## Using a service configuration file
|
||||
|
||||
As an alternative to using `kubectl expose`, you can use a
|
||||
[service configuration file](/docs/concepts/services-networking/service/)
|
||||
to create a Service.
|
||||
-->
|
||||
## 使用服务配置文件
|
||||
|
||||
作为 `kubectl expose` 的替代方法,您可以使用 [服务配置文件](/docs/concepts/services-networking/service/) 来创建服务。
|
||||
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
|
||||
{{% capture whatsnext %}}
|
||||
|
||||
<!--
|
||||
Learn more about
|
||||
[connecting applications with services](/docs/concepts/services-networking/connect-applications-service/).
|
||||
-->
|
||||
学习更多关于如何 [通过服务连接应用](/docs/concepts/services-networking/connect-applications-service/)。
|
||||
{{% /capture %}}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user