Skip to content

Commit 0577cb6

Browse files
authored
Merge pull request #25236 from reylejano-rxm/merged-master-dev-1.20
Merged master dev 1.20 - 11-25-20
2 parents 6fa3e91 + d8ae375 commit 0577cb6

File tree

139 files changed

+6581
-5248
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+6581
-5248
lines changed

README-zh.md

Lines changed: 127 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,52 +13,94 @@ This repository contains the assets required to build the [Kubernetes website an
1313
我们非常高兴您想要参与贡献!
1414

1515
<!--
16-
## Running the website locally using Hugo
16+
# Using this repository
1717
18-
See the [official Hugo documentation](https://gohugo.io/getting-started/installing/) for Hugo installation instructions. Make sure to install the Hugo extended version specified by the `HUGO_VERSION` environment variable in the [`netlify.toml`](netlify.toml#L10) file.
18+
You can run the website locally using Hugo (Extended version), or you can run it in a container runtime. We strongly recommend using the container runtime, as it gives deployment consistency with the live website.
1919
-->
20-
## 在本地使用 Hugo 来运行网站
20+
## 使用这个仓库
2121

22-
请参考 [Hugo 的官方文档](https://gohugo.io/getting-started/installing/)了解 Hugo 的安装指令。
23-
请确保安装的是 [`netlify.toml`](netlify.toml#L10) 文件中环境变量 `HUGO_VERSION` 所指定的
24-
Hugo 扩展版本。
22+
可以使用 Hugo(扩展版)在本地运行网站,也可以在容器中运行它。强烈建议使用容器,因为这样可以和在线网站的部署保持一致。
2523

2624
<!--
27-
Before building the site, clone the Kubernetes website repository:
25+
## Prerequisites
26+
27+
To use this repository, you need the following installed locally:
28+
29+
- [npm](https://www.npmjs.com/)
30+
- [Go](https://golang.org/)
31+
- [Hugo (Extended version)](https://gohugo.io/)
32+
- A container runtime, like [Docker](https://www.docker.com/).
33+
2834
-->
29-
在构造网站之前,先克隆 Kubernetes website 仓库:
35+
## 前提条件
3036

31-
```bash
37+
使用这个仓库,需要在本地安装以下软件:
38+
39+
- [npm](https://www.npmjs.com/)
40+
- [Go](https://golang.org/)
41+
- [Hugo (Extended version)](https://gohugo.io/)
42+
- 容器运行时,比如 [Docker](https://www.docker.com/).
43+
44+
<!--
45+
Before you start, install the dependencies. Clone the repository and navigate to the directory:
46+
-->
47+
开始前,先安装这些依赖。克隆本仓库并进入对应目录:
48+
49+
```
3250
git clone https://github.com/kubernetes/website.git
3351
cd website
34-
git submodule update --init --recursive
3552
```
3653

3754
<!--
38-
**Note:** The Kubernetes website deploys the [Docsy Hugo theme](https://github.com/google/docsy#readme).
39-
If you have not updated your website repository, the `website/themes/docsy` directory is empty.
40-
The site cannot build without a local copy of the theme.
41-
42-
Update the website theme:
55+
The Kubernetes website uses the [Docsy Hugo theme](https://github.com/google/docsy#readme). Even if you plan to run the website in a container, we strongly recommend pulling in the submodule and other development dependencies by running the following:
4356
-->
44-
**注意:** Kubernetes 网站要部署 [Docsy Hugo 主题](https://github.com/google/docsy#readme).
45-
如果你还没有更新你本地的 website 仓库,目录 `website/themes/docsy`
46-
会是空目录。
47-
在本地没有主题副本的情况下,网站无法正常构造。
4857

49-
使用下面的命令更新网站主题
58+
Kubernetes 网站使用的是 [Docsy Hugo 主题](https://github.com/google/docsy#readme)。 即使你打算在容器中运行网站,我们也强烈建议你通过运行以下命令来引入子模块和其他开发依赖项
5059

51-
```bash
60+
```
61+
# pull in the Docsy submodule
5262
git submodule update --init --recursive --depth 1
5363
```
5464

5565
<!--
66+
## Running the website using a container
67+
68+
To build the site in a container, run the following to build the container image and run it:
69+
70+
-->
71+
## 在容器中运行网站
72+
73+
要在容器中构建网站,请通过以下命令来构建容器镜像并运行:
74+
75+
```
76+
make container-image
77+
make container-serve
78+
```
79+
80+
<!--
81+
Open up your browser to http://localhost:1313 to view the website. As you make changes to the source files, Hugo updates the website and forces a browser refresh.
82+
-->
83+
启动浏览器,打开 http://localhost:1313 来查看网站。
84+
当你对源文件作出修改时,Hugo 会更新网站并强制浏览器执行刷新操作。
85+
86+
<!--
87+
## Running the website locally using Hugo
88+
89+
Make sure to install the Hugo extended version specified by the `HUGO_VERSION` environment variable in the [`netlify.toml`](netlify.toml#L10) file.
90+
5691
To build and test the site locally, run:
5792
-->
93+
## 在本地使用 Hugo 来运行网站
94+
95+
请确保安装的是 [`netlify.toml`](netlify.toml#L10) 文件中环境变量 `HUGO_VERSION` 所指定的
96+
Hugo 扩展版本。
97+
5898
若要在本地构造和测试网站,请运行:
5999

60100
```bash
61-
hugo server --buildFuture
101+
# install dependencies
102+
npm ci
103+
make serve
62104
```
63105

64106
<!--
@@ -68,6 +110,63 @@ This will start the local Hugo server on port 1313. Open up your browser to http
68110
启动浏览器,打开 http://localhost:1313 来查看网站。
69111
当你对源文件作出修改时,Hugo 会更新网站并强制浏览器执行刷新操作。
70112

113+
<!--
114+
## Troubleshooting
115+
### error: failed to transform resource: TOCSS: failed to transform "scss/main.scss" (text/x-scss): this feature is not available in your current Hugo version
116+
117+
Hugo is shipped in two set of binaries for technical reasons. The current website runs based on the **Hugo Extended** version only. In the [release page](https://github.com/gohugoio/hugo/releases) look for archives with `extended` in the name. To confirm, run `hugo version` and look for the word `extended`.
118+
119+
-->
120+
## 故障排除
121+
122+
### error: failed to transform resource: TOCSS: failed to transform "scss/main.scss" (text/x-scss): this feature is not available in your current Hugo version
123+
124+
由于技术原因,Hugo 会发布两套二进制文件。
125+
当前网站仅基于 **Hugo Extended** 版本运行。
126+
[发布页面](https://github.com/gohugoio/hugo/releases) 中查找名称为 `extended` 的归档。可以运行 `huge version` 查看是否有单词 `extended` 来确认。
127+
128+
<!--
129+
### Troubleshooting macOS for too many open files
130+
131+
If you run `make serve` on macOS and receive the following error:
132+
133+
-->
134+
### 对 macOs 上打开太多文件的故障排除
135+
136+
如果在 macOS 上运行 `make serve` 收到以下错误:
137+
138+
```
139+
ERROR 2020/08/01 19:09:18 Error: listen tcp 127.0.0.1:1313: socket: too many open files
140+
make: *** [serve] Error 1
141+
```
142+
143+
试着查看一下当前打开文件数的限制:
144+
145+
`launchctl limit maxfiles`
146+
147+
然后运行以下命令(参考https://gist.github.com/tombigel/d503800a282fcadbee14b537735d202c):
148+
149+
```
150+
#!/bin/sh
151+
152+
# These are the original gist links, linking to my gists now.
153+
# curl -O https://gist.githubusercontent.com/a2ikm/761c2ab02b7b3935679e55af5d81786a/raw/ab644cb92f216c019a2f032bbf25e258b01d87f9/limit.maxfiles.plist
154+
# curl -O https://gist.githubusercontent.com/a2ikm/761c2ab02b7b3935679e55af5d81786a/raw/ab644cb92f216c019a2f032bbf25e258b01d87f9/limit.maxproc.plist
155+
156+
curl -O https://gist.githubusercontent.com/tombigel/d503800a282fcadbee14b537735d202c/raw/ed73cacf82906fdde59976a0c8248cce8b44f906/limit.maxfiles.plist
157+
curl -O https://gist.githubusercontent.com/tombigel/d503800a282fcadbee14b537735d202c/raw/ed73cacf82906fdde59976a0c8248cce8b44f906/limit.maxproc.plist
158+
159+
sudo mv limit.maxfiles.plist /Library/LaunchDaemons
160+
sudo mv limit.maxproc.plist /Library/LaunchDaemons
161+
162+
sudo chown root:wheel /Library/LaunchDaemons/limit.maxfiles.plist
163+
sudo chown root:wheel /Library/LaunchDaemons/limit.maxproc.plist
164+
165+
sudo launchctl load -w /Library/LaunchDaemons/limit.maxfiles.plist
166+
```
167+
168+
这适用于 Catalina 和 Mojave macOS。
169+
71170
<!--
72171
## Get involved with SIG Docs
73172
@@ -78,7 +177,7 @@ You can also reach the maintainers of this project at:
78177
- [Slack](https://kubernetes.slack.com/messages/sig-docs)
79178
- [Mailing List](https://groups.google.com/forum/#!forum/kubernetes-sig-docs)
80179
-->
81-
## 参与 SIG Docs 工作
180+
# 参与 SIG Docs 工作
82181

83182
通过 [社区页面](https://github.com/kubernetes/community/tree/master/sig-docs#meetings)
84183
进一步了解 SIG Docs Kubernetes 社区和会议信息。
@@ -95,7 +194,7 @@ You can click the **Fork** button in the upper-right area of the screen to creat
95194
96195
Once your pull request is created, a Kubernetes reviewer will take responsibility for providing clear, actionable feedback. As the owner of the pull request, **it is your responsibility to modify your pull request to address the feedback that has been provided to you by the Kubernetes reviewer.**
97196
-->
98-
## 为文档做贡献
197+
# 为文档做贡献
99198

100199
你也可以点击屏幕右上方区域的 **Fork** 按钮,在你自己的 GitHub
101200
账号下创建本仓库的拷贝。此拷贝被称作 *fork*
@@ -133,7 +232,7 @@ For more information about contributing to the Kubernetes documentation, see:
133232
* [文档风格指南](http://kubernetes.io/docs/contribute/style/style-guide/)
134233
* [本地化 Kubernetes 文档](https://kubernetes.io/docs/contribute/localization/)
135234

136-
## 中文本地化
235+
# 中文本地化
137236

138237
可以通过以下方式联系中文本地化的维护人员:
139238

@@ -146,15 +245,15 @@ For more information about contributing to the Kubernetes documentation, see:
146245
147246
Participation in the Kubernetes community is governed by the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md).
148247
-->
149-
### 行为准则
248+
# 行为准则
150249

151-
参与 Kubernetes 社区受 [CNCF 行为准则](https://github.com/cncf/foundation/blob/master/code-of-conduct.md)约束。
250+
参与 Kubernetes 社区受 [CNCF 行为准则](https://github.com/cncf/foundation/blob/master/code-of-conduct.md) 约束。
152251

153252
<!--
154253
## Thank you!
155254
156255
Kubernetes thrives on community participation, and we appreciate your contributions to our website and our documentation!
157256
-->
158-
## 感谢!
257+
# 感谢!
159258

160259
Kubernetes 因为社区的参与而蓬勃发展,感谢您对我们网站和文档的贡献!

assets/scss/_base.scss

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,20 @@ footer {
8888
}
8989
}
9090

91+
main {
92+
.button {
93+
display: inline-block;
94+
border-radius: 6px;
95+
padding: 6px 20px;
96+
line-height: 1.3rem;
97+
color: white;
98+
background-color: $blue;
99+
text-decoration: none;
100+
font-size: 1rem;
101+
border: 0px;
102+
}
103+
}
104+
91105
// HEADER
92106

93107
#hamburger {

config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ github_repo = "https://github.com/kubernetes/website"
157157
# param for displaying an announcement block on every page.
158158
# See /i18n/en.toml for message text and title.
159159
announcement = true
160-
announcement_bg = "#3d4cb7" # choose a dark color – text is white
160+
announcement_bg = "#000000" #choose a dark color – text is white
161161

162162
#Searching
163163
k8s_search = true

content/en/blog/_posts/2019-04-16-pod-priority-and-preemption-in-kubernetes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Kubernetes is well-known for running scalable workloads. It scales your workload
1212

1313
## Guaranteed scheduling with controlled cost
1414

15-
[Kubernetes Cluster Autoscaler](https://kubernetes.io/docs/tasks/administer-cluster/cluster-management/#cluster-autoscaling) is an excellent tool in the ecosystem which adds more nodes to your cluster when your applications need them. However, cluster autoscaler has some limitations and may not work for all users:
15+
[Kubernetes Cluster Autoscaler](https://github.com/kubernetes/autoscaler/) is an excellent tool in the ecosystem which adds more nodes to your cluster when your applications need them. However, cluster autoscaler has some limitations and may not work for all users:
1616

1717
- It does not work in physical clusters.
1818
- Adding more nodes to the cluster costs more.

content/en/docs/concepts/architecture/controller.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,8 @@ Controllers that interact with external state find their desired state from
9292
the API server, then communicate directly with an external system to bring
9393
the current state closer in line.
9494

95-
(There actually is a controller that horizontally scales the
96-
nodes in your cluster. See
97-
[Cluster autoscaling](/docs/tasks/administer-cluster/cluster-management/#cluster-autoscaling)).
95+
(There actually is a [controller](https://github.com/kubernetes/autoscaler/)
96+
that horizontally scales the nodes in your cluster.)
9897

9998
The important point here is that the controller makes some change to bring about
10099
your desired state, and then reports current state back to your cluster's API server.

content/en/docs/concepts/architecture/nodes.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,5 +358,4 @@ For example, if `ShutdownGracePeriod=30s`, and `ShutdownGracePeriodCriticalPods=
358358
* Read the [Node](https://git.k8s.io/community/contributors/design-proposals/architecture/architecture.md#the-kubernetes-node)
359359
section of the architecture design document.
360360
* Read about [taints and tolerations](/docs/concepts/scheduling-eviction/taint-and-toleration/).
361-
* Read about [cluster autoscaling](/docs/tasks/administer-cluster/cluster-management/#cluster-autoscaling).
362361

content/en/docs/concepts/cluster-administration/_index.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ Before choosing a guide, here are some considerations:
3939

4040
## Managing a cluster
4141

42-
* [Managing a cluster](/docs/tasks/administer-cluster/cluster-management/) describes several topics related to the lifecycle of a cluster: creating a new cluster, upgrading your cluster's master and worker nodes, performing node maintenance (e.g. kernel upgrades), and upgrading the Kubernetes API version of a running cluster.
43-
4442
* Learn how to [manage nodes](/docs/concepts/architecture/nodes/).
4543

4644
* Learn how to set up and manage the [resource quota](/docs/concepts/policy/resource-quotas/) for shared clusters.

content/en/docs/concepts/cluster-administration/flow-control.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ poorly-behaved workloads that may be harming system health.
440440
{{< /note >}}
441441

442442
* `apiserver_flowcontrol_request_concurrency_limit` is a gauge vector
443-
hoding the computed concurrency limit (based on the API server's
443+
holding the computed concurrency limit (based on the API server's
444444
total concurrency limit and PriorityLevelConfigurations' concurrency
445445
shares), broken down by the label `priority_level`.
446446

content/en/docs/concepts/configuration/pod-priority-preemption.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,9 +321,7 @@ Pod may be created that fits on the same Node. In this case, the scheduler will
321321
schedule the higher priority Pod instead of the preemptor.
322322

323323
This is expected behavior: the Pod with the higher priority should take the place
324-
of a Pod with a lower priority. Other controller actions, such as
325-
[cluster autoscaling](/docs/tasks/administer-cluster/cluster-management/#cluster-autoscaling),
326-
may eventually provide capacity to schedule the pending Pods.
324+
of a Pod with a lower priority.
327325

328326
### Higher priority Pods are preempted before lower priority pods
329327

0 commit comments

Comments
 (0)