diff --git a/OWNERS_ALIASES b/OWNERS_ALIASES
index 01894721d1..2c90bb82a4 100644
--- a/OWNERS_ALIASES
+++ b/OWNERS_ALIASES
@@ -10,6 +10,7 @@ aliases:
- kbarnard10
- mrbobbytables
- onlydole
+ - sftim
sig-docs-de-owners: # Admins for German content
- bene2k1
- mkorbi
diff --git a/content/en/blog/_posts/2020-12-02-dockershim-faq.md b/content/en/blog/_posts/2020-12-02-dockershim-faq.md
index f8dbe7f7c7..918a969e51 100644
--- a/content/en/blog/_posts/2020-12-02-dockershim-faq.md
+++ b/content/en/blog/_posts/2020-12-02-dockershim-faq.md
@@ -114,7 +114,7 @@ will have strictly better performance and less overhead. However, we encourage y
to explore all the options from the [CNCF landscape] in case another would be an
even better fit for your environment.
-[CNCF landscape]: https://landscape.cncf.io/category=container-runtime&format=card-mode&grouping=category
+[CNCF landscape]: https://landscape.cncf.io/card-mode?category=container-runtime&grouping=category
### What should I look out for when changing CRI implementations?
diff --git a/content/en/docs/concepts/cluster-administration/_index.md b/content/en/docs/concepts/cluster-administration/_index.md
index cac156b53b..7d5aec5078 100644
--- a/content/en/docs/concepts/cluster-administration/_index.md
+++ b/content/en/docs/concepts/cluster-administration/_index.md
@@ -45,7 +45,7 @@ Before choosing a guide, here are some considerations:
## Securing a cluster
-* [Certificates](/docs/concepts/cluster-administration/certificates/) describes the steps to generate certificates using different tool chains.
+* [Generate Certificates](/docs/tasks/administer-cluster/certificates/) describes the steps to generate certificates using different tool chains.
* [Kubernetes Container Environment](/docs/concepts/containers/container-environment/) describes the environment for Kubelet managed containers on a Kubernetes node.
diff --git a/content/en/docs/concepts/cluster-administration/certificates.md b/content/en/docs/concepts/cluster-administration/certificates.md
index 6314420c01..6cce47f13c 100644
--- a/content/en/docs/concepts/cluster-administration/certificates.md
+++ b/content/en/docs/concepts/cluster-administration/certificates.md
@@ -4,249 +4,6 @@ content_type: concept
weight: 20
---
-
-When using client certificate authentication, you can generate certificates
-manually through `easyrsa`, `openssl` or `cfssl`.
-
-
-
-
-
-
-### easyrsa
-
-**easyrsa** can manually generate certificates for your cluster.
-
-1. Download, unpack, and initialize the patched version of easyrsa3.
-
- curl -LO https://storage.googleapis.com/kubernetes-release/easy-rsa/easy-rsa.tar.gz
- tar xzf easy-rsa.tar.gz
- cd easy-rsa-master/easyrsa3
- ./easyrsa init-pki
-1. Generate a new certificate authority (CA). `--batch` sets automatic mode;
- `--req-cn` specifies the Common Name (CN) for the CA's new root certificate.
-
- ./easyrsa --batch "--req-cn=${MASTER_IP}@`date +%s`" build-ca nopass
-1. Generate server certificate and key.
- The argument `--subject-alt-name` sets the possible IPs and DNS names the API server will
- be accessed with. The `MASTER_CLUSTER_IP` is usually the first IP from the service CIDR
- that is specified as the `--service-cluster-ip-range` argument for both the API server and
- the controller manager component. The argument `--days` is used to set the number of days
- after which the certificate expires.
- The sample below also assumes that you are using `cluster.local` as the default
- DNS domain name.
-
- ./easyrsa --subject-alt-name="IP:${MASTER_IP},"\
- "IP:${MASTER_CLUSTER_IP},"\
- "DNS:kubernetes,"\
- "DNS:kubernetes.default,"\
- "DNS:kubernetes.default.svc,"\
- "DNS:kubernetes.default.svc.cluster,"\
- "DNS:kubernetes.default.svc.cluster.local" \
- --days=10000 \
- build-server-full server nopass
-1. Copy `pki/ca.crt`, `pki/issued/server.crt`, and `pki/private/server.key` to your directory.
-1. Fill in and add the following parameters into the API server start parameters:
-
- --client-ca-file=/yourdirectory/ca.crt
- --tls-cert-file=/yourdirectory/server.crt
- --tls-private-key-file=/yourdirectory/server.key
-
-### openssl
-
-**openssl** can manually generate certificates for your cluster.
-
-1. Generate a ca.key with 2048bit:
-
- openssl genrsa -out ca.key 2048
-1. According to the ca.key generate a ca.crt (use -days to set the certificate effective time):
-
- openssl req -x509 -new -nodes -key ca.key -subj "/CN=${MASTER_IP}" -days 10000 -out ca.crt
-1. Generate a server.key with 2048bit:
-
- openssl genrsa -out server.key 2048
-1. Create a config file for generating a Certificate Signing Request (CSR).
- Be sure to substitute the values marked with angle brackets (e.g. ``)
- with real values before saving this to a file (e.g. `csr.conf`).
- Note that the value for `MASTER_CLUSTER_IP` is the service cluster IP for the
- API server as described in previous subsection.
- The sample below also assumes that you are using `cluster.local` as the default
- DNS domain name.
-
- [ req ]
- default_bits = 2048
- prompt = no
- default_md = sha256
- req_extensions = req_ext
- distinguished_name = dn
-
- [ dn ]
- C =
- ST =
- L =
- O =
- OU =
- CN =
-
- [ req_ext ]
- subjectAltName = @alt_names
-
- [ alt_names ]
- DNS.1 = kubernetes
- DNS.2 = kubernetes.default
- DNS.3 = kubernetes.default.svc
- DNS.4 = kubernetes.default.svc.cluster
- DNS.5 = kubernetes.default.svc.cluster.local
- IP.1 =
- IP.2 =
-
- [ v3_ext ]
- authorityKeyIdentifier=keyid,issuer:always
- basicConstraints=CA:FALSE
- keyUsage=keyEncipherment,dataEncipherment
- extendedKeyUsage=serverAuth,clientAuth
- subjectAltName=@alt_names
-1. Generate the certificate signing request based on the config file:
-
- openssl req -new -key server.key -out server.csr -config csr.conf
-1. Generate the server certificate using the ca.key, ca.crt and server.csr:
-
- openssl x509 -req -in server.csr -CA ca.crt -CAkey ca.key \
- -CAcreateserial -out server.crt -days 10000 \
- -extensions v3_ext -extfile csr.conf
-1. View the certificate:
-
- openssl x509 -noout -text -in ./server.crt
-
-Finally, add the same parameters into the API server start parameters.
-
-### cfssl
-
-**cfssl** is another tool for certificate generation.
-
-1. Download, unpack and prepare the command line tools as shown below.
- Note that you may need to adapt the sample commands based on the hardware
- architecture and cfssl version you are using.
-
- curl -L https://github.com/cloudflare/cfssl/releases/download/v1.5.0/cfssl_1.5.0_linux_amd64 -o cfssl
- chmod +x cfssl
- curl -L https://github.com/cloudflare/cfssl/releases/download/v1.5.0/cfssljson_1.5.0_linux_amd64 -o cfssljson
- chmod +x cfssljson
- curl -L https://github.com/cloudflare/cfssl/releases/download/v1.5.0/cfssl-certinfo_1.5.0_linux_amd64 -o cfssl-certinfo
- chmod +x cfssl-certinfo
-1. Create a directory to hold the artifacts and initialize cfssl:
-
- mkdir cert
- cd cert
- ../cfssl print-defaults config > config.json
- ../cfssl print-defaults csr > csr.json
-1. Create a JSON config file for generating the CA file, for example, `ca-config.json`:
-
- {
- "signing": {
- "default": {
- "expiry": "8760h"
- },
- "profiles": {
- "kubernetes": {
- "usages": [
- "signing",
- "key encipherment",
- "server auth",
- "client auth"
- ],
- "expiry": "8760h"
- }
- }
- }
- }
-1. Create a JSON config file for CA certificate signing request (CSR), for example,
- `ca-csr.json`. Be sure to replace the values marked with angle brackets with
- real values you want to use.
-
- {
- "CN": "kubernetes",
- "key": {
- "algo": "rsa",
- "size": 2048
- },
- "names":[{
- "C": "",
- "ST": "",
- "L": "",
- "O": "",
- "OU": ""
- }]
- }
-1. Generate CA key (`ca-key.pem`) and certificate (`ca.pem`):
-
- ../cfssl gencert -initca ca-csr.json | ../cfssljson -bare ca
-1. Create a JSON config file for generating keys and certificates for the API
- server, for example, `server-csr.json`. Be sure to replace the values in angle brackets with
- real values you want to use. The `MASTER_CLUSTER_IP` is the service cluster
- IP for the API server as described in previous subsection.
- The sample below also assumes that you are using `cluster.local` as the default
- DNS domain name.
-
- {
- "CN": "kubernetes",
- "hosts": [
- "127.0.0.1",
- "",
- "",
- "kubernetes",
- "kubernetes.default",
- "kubernetes.default.svc",
- "kubernetes.default.svc.cluster",
- "kubernetes.default.svc.cluster.local"
- ],
- "key": {
- "algo": "rsa",
- "size": 2048
- },
- "names": [{
- "C": "",
- "ST": "",
- "L": "",
- "O": "",
- "OU": ""
- }]
- }
-1. Generate the key and certificate for the API server, which are by default
- saved into file `server-key.pem` and `server.pem` respectively:
-
- ../cfssl gencert -ca=ca.pem -ca-key=ca-key.pem \
- --config=ca-config.json -profile=kubernetes \
- server-csr.json | ../cfssljson -bare server
-
-
-## Distributing Self-Signed CA Certificate
-
-A client node may refuse to recognize a self-signed CA certificate as valid.
-For a non-production deployment, or for a deployment that runs behind a company
-firewall, you can distribute a self-signed CA certificate to all clients and
-refresh the local list for valid certificates.
-
-On each client, perform the following operations:
-
-```bash
-sudo cp ca.crt /usr/local/share/ca-certificates/kubernetes.crt
-sudo update-ca-certificates
-```
-
-```
-Updating certificates in /etc/ssl/certs...
-1 added, 0 removed; done.
-Running hooks in /etc/ca-certificates/update.d....
-done.
-```
-
-## Certificates API
-
-You can use the `certificates.k8s.io` API to provision
-x509 certificates to use for authentication as documented
-[here](/docs/tasks/tls/managing-tls-in-a-cluster).
-
-
+To learn how to generate certificates for your cluster, see [Certificates](/docs/tasks/administer-cluster/certificates/).
diff --git a/content/en/docs/concepts/configuration/secret.md b/content/en/docs/concepts/configuration/secret.md
index 45cf9297ca..0a3688df71 100644
--- a/content/en/docs/concepts/configuration/secret.md
+++ b/content/en/docs/concepts/configuration/secret.md
@@ -718,7 +718,7 @@ spec:
#### Consuming Secret Values from environment variables
-Inside a container that consumes a secret in an environment variables, the secret keys appear as
+Inside a container that consumes a secret in the environment variables, the secret keys appear as
normal environment variables containing the base64 decoded values of the secret data.
This is the result of commands executed inside the container from the example above:
diff --git a/content/en/docs/concepts/containers/container-environment.md b/content/en/docs/concepts/containers/container-environment.md
index 7ec28e97b4..a1eba4d96d 100644
--- a/content/en/docs/concepts/containers/container-environment.md
+++ b/content/en/docs/concepts/containers/container-environment.md
@@ -40,6 +40,7 @@ as are any environment variables specified statically in the Docker image.
### Cluster information
A list of all services that were running when a Container was created is available to that Container as environment variables.
+This list is limited to services within the same namespace as the new Container's Pod and Kubernetes control plane services.
Those environment variables match the syntax of Docker links.
For a service named *foo* that maps to a Container named *bar*,
diff --git a/content/en/docs/concepts/overview/components.md b/content/en/docs/concepts/overview/components.md
index eb17e2dd7e..763308887d 100644
--- a/content/en/docs/concepts/overview/components.md
+++ b/content/en/docs/concepts/overview/components.md
@@ -51,11 +51,11 @@ the same machine, and do not run user containers on this machine. See
{{< glossary_definition term_id="kube-controller-manager" length="all" >}}
-These controllers include:
+Some types of these controllers are:
* Node controller: Responsible for noticing and responding when nodes go down.
- * Replication controller: Responsible for maintaining the correct number of pods for every replication
- controller object in the system.
+ * Job controller: Watches for Job objects that represent one-off tasks, then creates
+ Pods to run those tasks to completion.
* Endpoints controller: Populates the Endpoints object (that is, joins Services & Pods).
* Service Account & Token controllers: Create default accounts and API access tokens for new namespaces.
diff --git a/content/en/docs/concepts/overview/working-with-objects/labels.md b/content/en/docs/concepts/overview/working-with-objects/labels.md
index 7ff6f267a0..811d9fb3f7 100644
--- a/content/en/docs/concepts/overview/working-with-objects/labels.md
+++ b/content/en/docs/concepts/overview/working-with-objects/labels.md
@@ -52,7 +52,10 @@ If the prefix is omitted, the label Key is presumed to be private to the user. A
The `kubernetes.io/` and `k8s.io/` prefixes are reserved for Kubernetes core components.
-Valid label values must be 63 characters or less and must be empty or begin and end with an alphanumeric character (`[a-z0-9A-Z]`) with dashes (`-`), underscores (`_`), dots (`.`), and alphanumerics between.
+Valid label value:
+* must be 63 characters or less (cannot be empty),
+* must begin and end with an alphanumeric character (`[a-z0-9A-Z]`),
+* could contain dashes (`-`), underscores (`_`), dots (`.`), and alphanumerics between.
For example, here's the configuration file for a Pod that has two labels `environment: production` and `app: nginx` :
diff --git a/content/en/docs/concepts/services-networking/service.md b/content/en/docs/concepts/services-networking/service.md
index bcbf7d7f75..b7a7edcd38 100644
--- a/content/en/docs/concepts/services-networking/service.md
+++ b/content/en/docs/concepts/services-networking/service.md
@@ -74,8 +74,8 @@ a new instance.
The name of a Service object must be a valid
[DNS label name](/docs/concepts/overview/working-with-objects/names#dns-label-names).
-For example, suppose you have a set of Pods that each listen on TCP port 9376
-and carry a label `app=MyApp`:
+For example, suppose you have a set of Pods where each listens on TCP port 9376
+and contains a label `app=MyApp`:
```yaml
apiVersion: v1
diff --git a/content/en/docs/concepts/workloads/pods/disruptions.md b/content/en/docs/concepts/workloads/pods/disruptions.md
index 3d4248443d..d0a8bbf5a9 100644
--- a/content/en/docs/concepts/workloads/pods/disruptions.md
+++ b/content/en/docs/concepts/workloads/pods/disruptions.md
@@ -75,7 +75,7 @@ Here are some ways to mitigate involuntary disruptions:
and [stateful](/docs/tasks/run-application/run-replicated-stateful-application/) applications.)
- For even higher availability when running replicated applications,
spread applications across racks (using
- [anti-affinity](/docs/user-guide/node-selection/#inter-pod-affinity-and-anti-affinity-beta-feature))
+ [anti-affinity](/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity))
or across zones (if using a
[multi-zone cluster](/docs/setup/multiple-zones).)
@@ -104,7 +104,7 @@ ensure that the number of replicas serving load never falls below a certain
percentage of the total.
Cluster managers and hosting providers should use tools which
-respect PodDisruptionBudgets by calling the [Eviction API](/docs/tasks/administer-cluster/safely-drain-node/#the-eviction-api)
+respect PodDisruptionBudgets by calling the [Eviction API](/docs/tasks/administer-cluster/safely-drain-node/#eviction-api)
instead of directly deleting pods or deployments.
For example, the `kubectl drain` subcommand lets you mark a node as going out of
diff --git a/content/en/docs/concepts/workloads/pods/pod-lifecycle.md b/content/en/docs/concepts/workloads/pods/pod-lifecycle.md
index df83f7c5f3..832785923a 100644
--- a/content/en/docs/concepts/workloads/pods/pod-lifecycle.md
+++ b/content/en/docs/concepts/workloads/pods/pod-lifecycle.md
@@ -38,8 +38,7 @@ If a {{< glossary_tooltip term_id="node" >}} dies, the Pods scheduled to that no
are [scheduled for deletion](#pod-garbage-collection) after a timeout period.
Pods do not, by themselves, self-heal. If a Pod is scheduled to a
-{{< glossary_tooltip text="node" term_id="node" >}} that then fails,
-or if the scheduling operation itself fails, the Pod is deleted; likewise, a Pod won't
+{{< glossary_tooltip text="node" term_id="node" >}} that then fails, the Pod is deleted; likewise, a Pod won't
survive an eviction due to a lack of resources or Node maintenance. Kubernetes uses a
higher-level abstraction, called a
{{< glossary_tooltip term_id="controller" text="controller" >}}, that handles the work of
diff --git a/content/en/docs/contribute/localization.md b/content/en/docs/contribute/localization.md
index 2d89ee7e74..ad0b9420c5 100644
--- a/content/en/docs/contribute/localization.md
+++ b/content/en/docs/contribute/localization.md
@@ -61,7 +61,7 @@ Members of `@kubernetes/sig-docs-**-owners` can approve PRs that change content
For each localization, The `@kubernetes/sig-docs-**-reviews` team automates review assignment for new PRs.
-Members of `@kubernetes/website-maintainers` can create new development branches to coordinate translation efforts.
+Members of `@kubernetes/website-maintainers` can create new localization branches to coordinate translation efforts.
Members of `@kubernetes/website-milestone-maintainers` can use the `/milestone` [Prow command](https://prow.k8s.io/command-help) to assign a milestone to issues or PRs.
@@ -205,14 +205,20 @@ To ensure accuracy in grammar and meaning, members of your localization team sho
### Source files
-Localizations must be based on the English files from the most recent release, {{< latest-version >}}.
+Localizations must be based on the English files from a specific release targeted by the localization team.
+Each localization team can decide which release to target which is referred to as the _target version_ below.
-To find source files for the most recent release:
+To find source files for your target version:
1. Navigate to the Kubernetes website repository at https://github.com/kubernetes/website.
-2. Select the `release-1.X` branch for the most recent version.
+2. Select a branch for your target version from the following table:
+ Target version | Branch
+ -----|-----
+ Next version | [`dev-{{< skew nextMinorVersion >}}`](https://github.com/kubernetes/website/tree/dev-{{< skew nextMinorVersion >}})
+ Latest version | [`master`](https://github.com/kubernetes/website/tree/master)
+ Previous version | `release-*.**`
-The latest version is {{< latest-version >}}, so the most recent release branch is [`{{< release-branch >}}`](https://github.com/kubernetes/website/tree/{{< release-branch >}}).
+The `master` branch holds content for the current release `{{< latest-version >}}`. The release team will create `{{< release-branch >}}` branch shortly before the next release: v{{< skew nextMinorVersion >}}.
### Site strings in i18n
@@ -239,11 +245,11 @@ Some language teams have their own language-specific style guide and glossary. F
## Branching strategy
-Because localization projects are highly collaborative efforts, we encourage teams to work in shared development branches.
+Because localization projects are highly collaborative efforts, we encourage teams to work in shared localization branches.
-To collaborate on a development branch:
+To collaborate on a localization branch:
-1. A team member of [@kubernetes/website-maintainers](https://github.com/orgs/kubernetes/teams/website-maintainers) opens a development branch from a source branch on https://github.com/kubernetes/website.
+1. A team member of [@kubernetes/website-maintainers](https://github.com/orgs/kubernetes/teams/website-maintainers) opens a localization branch from a source branch on https://github.com/kubernetes/website.
Your team approvers joined the `@kubernetes/website-maintainers` team when you [added your localization team](#add-your-localization-team-in-github) to the [`kubernetes/org`](https://github.com/kubernetes/org) repository.
@@ -251,25 +257,31 @@ To collaborate on a development branch:
`dev--.`
- For example, an approver on a German localization team opens the development branch `dev-1.12-de.1` directly against the k/website repository, based on the source branch for Kubernetes v1.12.
+ For example, an approver on a German localization team opens the localization branch `dev-1.12-de.1` directly against the k/website repository, based on the source branch for Kubernetes v1.12.
-2. Individual contributors open feature branches based on the development branch.
+2. Individual contributors open feature branches based on the localization branch.
For example, a German contributor opens a pull request with changes to `kubernetes:dev-1.12-de.1` from `username:local-branch-name`.
-3. Approvers review and merge feature branches into the development branch.
+3. Approvers review and merge feature branches into the localization branch.
-4. Periodically, an approver merges the development branch to its source branch by opening and approving a new pull request. Be sure to squash the commits before approving the pull request.
+4. Periodically, an approver merges the localization branch to its source branch by opening and approving a new pull request. Be sure to squash the commits before approving the pull request.
-Repeat steps 1-4 as needed until the localization is complete. For example, subsequent German development branches would be: `dev-1.12-de.2`, `dev-1.12-de.3`, etc.
+Repeat steps 1-4 as needed until the localization is complete. For example, subsequent German localization branches would be: `dev-1.12-de.2`, `dev-1.12-de.3`, etc.
-Teams must merge localized content into the same release branch from which the content was sourced. For example, a development branch sourced from {{< release-branch >}} must be based on {{< release-branch >}}.
+Teams must merge localized content into the same branch from which the content was sourced.
-An approver must maintain a development branch by keeping it current with its source branch and resolving merge conflicts. The longer a development branch stays open, the more maintenance it typically requires. Consider periodically merging development branches and opening new ones, rather than maintaining one extremely long-running development branch.
+For example:
+- a localization branch sourced from `master` must be merged into `master`.
+- a localization branch sourced from `release-1.19` must be merged into `release-1.19`.
-At the beginning of every team milestone, it's helpful to open an issue comparing upstream changes between the previous development branch and the current development branch. There are two scripts for comparing upstream changes. [`upstream_changes.py`](https://github.com/kubernetes/website/tree/master/scripts#upstream_changespy) is useful for checking the changes made to a specific file. And [`diff_l10n_branches.py`](https://github.com/kubernetes/website/tree/master/scripts#diff_l10n_branchespy) is useful for creating a list of outdated files for a specific localization branch.
+{{< note >}}
+If your localization branch was created from `master` branch but it is not merged into `master` before new release branch `{{< release-branch >}}` created, merge it into both `master` and new release branch `{{< release-branch >}}`. To merge your localization branch into new release branch `{{< release-branch >}}`, you need to switch upstream branch of your localization branch to `{{< release-branch >}}`.
+{{< /note >}}
- While only approvers can open a new development branch and merge pull requests, anyone can open a pull request for a new development branch. No special permissions are required.
+At the beginning of every team milestone, it's helpful to open an issue comparing upstream changes between the previous localization branch and the current localization branch. There are two scripts for comparing upstream changes. [`upstream_changes.py`](https://github.com/kubernetes/website/tree/master/scripts#upstream_changespy) is useful for checking the changes made to a specific file. And [`diff_l10n_branches.py`](https://github.com/kubernetes/website/tree/master/scripts#diff_l10n_branchespy) is useful for creating a list of outdated files for a specific localization branch.
+
+While only approvers can open a new localization branch and merge pull requests, anyone can open a pull request for a new localization branch. No special permissions are required.
For more information about working from forks or directly from the repository, see ["fork and clone the repo"](#fork-and-clone-the-repo).
@@ -290,5 +302,3 @@ Once a localization meets requirements for workflow and minimum output, SIG docs
- Enable language selection on the website
- Publicize the localization's availability through [Cloud Native Computing Foundation](https://www.cncf.io/about/) (CNCF) channels, including the [Kubernetes blog](https://kubernetes.io/blog/).
-
-
diff --git a/content/en/docs/contribute/style/style-guide.md b/content/en/docs/contribute/style/style-guide.md
index 2f0c39168c..5931422e95 100644
--- a/content/en/docs/contribute/style/style-guide.md
+++ b/content/en/docs/contribute/style/style-guide.md
@@ -17,8 +17,6 @@ Changes to the style guide are made by SIG Docs as a group. To propose a change
or addition, [add it to the agenda](https://docs.google.com/document/d/1ddHwLK3kUMX1wVFIwlksjTk0MsqitBnWPe1LRa1Rx5A/edit) for an upcoming SIG Docs meeting, and attend the meeting to participate in the
discussion.
-
-
{{< note >}}
@@ -48,12 +46,11 @@ When you refer specifically to interacting with an API object, use [UpperCamelCa
When you are generally discussing an API object, use [sentence-style capitalization](https://docs.microsoft.com/en-us/style-guide/text-formatting/using-type/use-sentence-style-capitalization).
-You may use the word "resource", "API", or "object" to clarify a Kubernetes resource type in a sentence.
+You may use the word "resource", "API", or "object" to clarify a Kubernetes resource type in a sentence.
-Don't split the API object name into separate words. For example, use
-PodTemplateList, not Pod Template List.
+Don't split an API object name into separate words. For example, use PodTemplateList, not Pod Template List.
-The following examples focus on capitalization. Review the related guidance on [Code Style](#code-style-inline-code) for more information on formatting API objects.
+The following examples focus on capitalization. For more information about formatting API object names, review the related guidance on [Code Style](#code-style-inline-code).
{{< table caption = "Do and Don't - Use Pascal case for API objects" >}}
Do | Don't
@@ -65,17 +62,18 @@ Every ConfigMap object is part of a namespace. | Every configMap object is part
For managing confidential data, consider using the Secret API. | For managing confidential data, consider using the secret API.
{{< /table >}}
-
### Use angle brackets for placeholders
Use angle brackets for placeholders. Tell the reader what a placeholder
-represents.
+represents, for example:
-1. Display information about a pod:
+Display information about a pod:
- kubectl describe pod -n
+```shell
+kubectl describe pod -n
+```
- If the namespace of the pod is `default`, you can omit the '-n' parameter.
+If the namespace of the pod is `default`, you can omit the '-n' parameter.
### Use bold for user interface elements
@@ -189,7 +187,6 @@ Set the value of `image` to nginx:1.16. | Set the value of `image` to `nginx:1.1
Set the value of the `replicas` field to 2. | Set the value of the `replicas` field to `2`.
{{< /table >}}
-
## Code snippet formatting
### Don't include the command prompt
@@ -200,17 +197,20 @@ Do | Don't
kubectl get pods | $ kubectl get pods
{{< /table >}}
-
### Separate commands from output
Verify that the pod is running on your chosen node:
- kubectl get pods --output=wide
+```shell
+kubectl get pods --output=wide
+```
The output is similar to this:
- NAME READY STATUS RESTARTS AGE IP NODE
- nginx 1/1 Running 0 13s 10.200.0.4 worker0
+```console
+NAME READY STATUS RESTARTS AGE IP NODE
+nginx 1/1 Running 0 13s 10.200.0.4 worker0
+```
### Versioning Kubernetes examples
@@ -263,17 +263,17 @@ Hugo [Shortcodes](https://gohugo.io/content-management/shortcodes) help create d
2. Use the following syntax to apply a style:
- ```
- {{* note */>}}
- No need to include a prefix; the shortcode automatically provides one. (Note:, Caution:, etc.)
- {{* /note */>}}
- ```
+ ```none
+ {{* note */>}}
+ No need to include a prefix; the shortcode automatically provides one. (Note:, Caution:, etc.)
+ {{* /note */>}}
+ ```
-The output is:
+ The output is:
-{{< note >}}
-The prefix you choose is the same text for the tag.
-{{< /note >}}
+ {{< note >}}
+ The prefix you choose is the same text for the tag.
+ {{< /note >}}
### Note
@@ -403,7 +403,7 @@ The output is:
1. Prepare the batter, and pour into springform pan.
- {{< note >}}Grease the pan for best results.{{< /note >}}
+ {{< note >}}Grease the pan for best results.{{< /note >}}
1. Bake for 20-25 minutes or until set.
@@ -417,13 +417,14 @@ Shortcodes inside include statements will break the build. You must insert them
{{* /note */>}}
```
-
## Markdown elements
### Line breaks
+
Use a single newline to separate block-level content like headings, lists, images, code blocks, and others. The exception is second-level headings, where it should be two newlines. Second-level headings follow the first-level (or the title) without any preceding paragraphs or texts. A two line spacing helps visualize the overall structure of content in a code editor better.
### Headings
+
People accessing this documentation may use a screen reader or other assistive technology (AT). [Screen readers](https://en.wikipedia.org/wiki/Screen_reader) are linear output devices, they output items on a page one at a time. If there is a lot of content on a page, you can use headings to give the page an internal structure. A good page structure helps all readers to easily navigate the page or filter topics of interest.
{{< table caption = "Do and Don't - Headings" >}}
@@ -453,24 +454,24 @@ Write hyperlinks that give you context for the content they link to. For example
Write Markdown-style links: `[link text](URL)`. For example: `[Hugo shortcodes](/docs/contribute/style/hugo-shortcodes/#table-captions)` and the output is [Hugo shortcodes](/docs/contribute/style/hugo-shortcodes/#table-captions). | Write HTML-style links: `Visit our tutorial!`, or create links that open in new tabs or windows. For example: `[example website](https://example.com){target="_blank"}`
{{< /table >}}
-
### Lists
+
Group items in a list that are related to each other and need to appear in a specific order or to indicate a correlation between multiple items. When a screen reader comes across a list—whether it is an ordered or unordered list—it will be announced to the user that there is a group of list items. The user can then use the arrow keys to move up and down between the various items in the list.
Website navigation links can also be marked up as list items; after all they are nothing but a group of related links.
- - End each item in a list with a period if one or more items in the list are complete sentences. For the sake of consistency, normally either all items or none should be complete sentences.
+- End each item in a list with a period if one or more items in the list are complete sentences. For the sake of consistency, normally either all items or none should be complete sentences.
- {{< note >}} Ordered lists that are part of an incomplete introductory sentence can be in lowercase and punctuated as if each item was a part of the introductory sentence.{{< /note >}}
+ {{< note >}} Ordered lists that are part of an incomplete introductory sentence can be in lowercase and punctuated as if each item was a part of the introductory sentence.{{< /note >}}
- - Use the number one (`1.`) for ordered lists.
+- Use the number one (`1.`) for ordered lists.
- - Use (`+`), (`*`), or (`-`) for unordered lists.
+- Use (`+`), (`*`), or (`-`) for unordered lists.
- - Leave a blank line after each list.
+- Leave a blank line after each list.
- - Indent nested lists with four spaces (for example, ⋅⋅⋅⋅).
+- Indent nested lists with four spaces (for example, ⋅⋅⋅⋅).
- - List items may consist of multiple paragraphs. Each subsequent paragraph in a list item must be indented by either four spaces or one tab.
+- List items may consist of multiple paragraphs. Each subsequent paragraph in a list item must be indented by either four spaces or one tab.
### Tables
@@ -490,7 +491,6 @@ Do | Don't
This command starts a proxy. | This command will start a proxy.
{{< /table >}}
-
Exception: Use future or past tense if it is required to convey the correct
meaning.
@@ -503,7 +503,6 @@ You can explore the API using a browser. | The API can be explored using a brows
The YAML file specifies the replica count. | The replica count is specified in the YAML file.
{{< /table >}}
-
Exception: Use passive voice if active voice leads to an awkward construction.
### Use simple and direct language
@@ -527,7 +526,6 @@ You can create a Deployment by ... | We'll create a Deployment by ...
In the preceding output, you can see... | In the preceding output, we can see ...
{{< /table >}}
-
### Avoid Latin phrases
Prefer English terms over Latin abbreviations.
@@ -539,7 +537,6 @@ For example, ... | e.g., ...
That is, ...| i.e., ...
{{< /table >}}
-
Exception: Use "etc." for et cetera.
## Patterns to avoid
@@ -557,7 +554,6 @@ Kubernetes provides a new feature for ... | We provide a new feature ...
This page teaches you how to use pods. | In this page, we are going to learn about pods.
{{< /table >}}
-
### Avoid jargon and idioms
Some readers speak English as a second language. Avoid jargon and idioms to help them understand better.
@@ -569,7 +565,6 @@ Internally, ... | Under the hood, ...
Create a new cluster. | Turn up a new cluster.
{{< /table >}}
-
### Avoid statements about the future
Avoid making promises or giving hints about the future. If you need to talk about
@@ -592,6 +587,18 @@ In version 1.4, ... | In the current version, ...
The Federation feature provides ... | The new Federation feature provides ...
{{< /table >}}
+### Avoid words that assume a specific level of understanding
+
+Avoid words such as "just", "simply", "easy", "easily", or "simple". These words do not add value.
+
+{{< table caption = "Do and Don't - Avoid insensitive words" >}}
+Do | Don't
+:--| :-----
+Include one command in ... | Include just one command in ...
+Run the container ... | Simply run the container ...
+You can easily remove ... | You can remove ...
+These simple steps ... | These steps ...
+{{< /table >}}
## {{% heading "whatsnext" %}}
diff --git a/content/en/docs/reference/access-authn-authz/admission-controllers.md b/content/en/docs/reference/access-authn-authz/admission-controllers.md
index ef1d9a03a5..8841723344 100644
--- a/content/en/docs/reference/access-authn-authz/admission-controllers.md
+++ b/content/en/docs/reference/access-authn-authz/admission-controllers.md
@@ -565,6 +565,8 @@ Starting from 1.11, this admission controller is disabled by default.
### PodNodeSelector {#podnodeselector}
+{{< feature-state for_k8s_version="v1.5" state="alpha" >}}
+
This admission controller defaults and limits what node selectors may be used within a namespace by reading a namespace annotation and a global configuration.
#### Configuration File Format
@@ -675,6 +677,8 @@ for more information.
### PodTolerationRestriction {#podtolerationrestriction}
+{{< feature-state for_k8s_version="v1.7" state="alpha" >}}
+
The PodTolerationRestriction admission controller verifies any conflict between tolerations of a pod and the tolerations of its namespace.
It rejects the pod request if there is a conflict.
It then merges the tolerations annotated on the namespace into the tolerations of the pod.
diff --git a/content/en/docs/reference/access-authn-authz/authentication.md b/content/en/docs/reference/access-authn-authz/authentication.md
index fc76cbb2f4..17702520e4 100644
--- a/content/en/docs/reference/access-authn-authz/authentication.md
+++ b/content/en/docs/reference/access-authn-authz/authentication.md
@@ -99,7 +99,7 @@ openssl req -new -key jbeda.pem -out jbeda-csr.pem -subj "/CN=jbeda/O=app1/O=app
This would create a CSR for the username "jbeda", belonging to two groups, "app1" and "app2".
-See [Managing Certificates](/docs/concepts/cluster-administration/certificates/) for how to generate a client cert.
+See [Managing Certificates](/docs/tasks/administer-cluster/certificates/) for how to generate a client cert.
### Static Token File
@@ -328,7 +328,7 @@ Since all of the data needed to validate who you are is in the `id_token`, Kuber
1. Kubernetes has no "web interface" to trigger the authentication process. There is no browser or interface to collect credentials which is why you need to authenticate to your identity provider first.
2. The `id_token` can't be revoked, it's like a certificate so it should be short-lived (only a few minutes) so it can be very annoying to have to get a new token every few minutes.
-3. To authenticate to the Kubernetes dashboard, you must the `kubectl proxy` command or a reverse proxy that injects the `id_token`.
+3. To authenticate to the Kubernetes dashboard, you must use the `kubectl proxy` command or a reverse proxy that injects the `id_token`.
#### Configuring the API Server
diff --git a/content/en/docs/reference/using-api/client-libraries.md b/content/en/docs/reference/using-api/client-libraries.md
index 96589c6a55..6860008914 100644
--- a/content/en/docs/reference/using-api/client-libraries.md
+++ b/content/en/docs/reference/using-api/client-libraries.md
@@ -67,6 +67,7 @@ their authors, not the Kubernetes team.
| Python | [github.com/fiaas/k8s](https://github.com/fiaas/k8s) |
| Python | [github.com/mnubo/kubernetes-py](https://github.com/mnubo/kubernetes-py) |
| Python | [github.com/tomplus/kubernetes_asyncio](https://github.com/tomplus/kubernetes_asyncio) |
+| Python | [github.com/Frankkkkk/pykorm](https://github.com/Frankkkkk/pykorm) |
| Ruby | [github.com/abonas/kubeclient](https://github.com/abonas/kubeclient) |
| Ruby | [github.com/Ch00k/kuber](https://github.com/Ch00k/kuber) |
| Ruby | [github.com/kontena/k8s-client](https://github.com/kontena/k8s-client) |
diff --git a/content/en/docs/setup/production-environment/container-runtimes.md b/content/en/docs/setup/production-environment/container-runtimes.md
index 5aa4ac894e..e59b497302 100644
--- a/content/en/docs/setup/production-environment/container-runtimes.md
+++ b/content/en/docs/setup/production-environment/container-runtimes.md
@@ -219,30 +219,39 @@ sudo systemctl restart containerd
```
{{% /tab %}}
{{% tab name="Windows (PowerShell)" %}}
+
+
+Start a Powershell session, set `$Version` to the desired version (ex: `$Version=1.4.3`), and then run the following commands:
+
+
```powershell
# (Install containerd)
-# download containerd
-cmd /c curl -OL https://github.com/containerd/containerd/releases/download/v1.4.1/containerd-1.4.1-windows-amd64.tar.gz
-cmd /c tar xvf .\containerd-1.4.1-windows-amd64.tar.gz
+# Download containerd
+curl.exe -L https://github.com/containerd/containerd/releases/download/v$Version/containerd-$Version-windows-amd64.tar.gz -o containerd-windows-amd64.tar.gz
+tar.exe xvf .\containerd-windows-amd64.tar.gz
```
```powershell
-# extract and configure
+# Extract and configure
Copy-Item -Path ".\bin\" -Destination "$Env:ProgramFiles\containerd" -Recurse -Force
cd $Env:ProgramFiles\containerd\
.\containerd.exe config default | Out-File config.toml -Encoding ascii
-# review the configuration. depending on setup you may want to adjust:
-# - the sandbox_image (kubernetes pause image)
+# Review the configuration. Depending on setup you may want to adjust:
+# - the sandbox_image (Kubernetes pause image)
# - cni bin_dir and conf_dir locations
Get-Content config.toml
+
+# (Optional - but highly recommended) Exclude containerd form Windows Defender Scans
+Add-MpPreference -ExclusionProcess "$Env:ProgramFiles\containerd\containerd.exe"
```
```powershell
-# start containerd
+# Start containerd
.\containerd.exe --register-service
Start-Service containerd
```
+
{{% /tab %}}
{{< /tabs >}}
diff --git a/content/en/docs/setup/production-environment/tools/kubeadm/install-kubeadm.md b/content/en/docs/setup/production-environment/tools/kubeadm/install-kubeadm.md
index 394820324d..3f6e991eac 100644
--- a/content/en/docs/setup/production-environment/tools/kubeadm/install-kubeadm.md
+++ b/content/en/docs/setup/production-environment/tools/kubeadm/install-kubeadm.md
@@ -18,14 +18,7 @@ For information how to create a cluster with kubeadm once you have performed thi
## {{% heading "prerequisites" %}}
-* One or more machines running one of:
- - Ubuntu 16.04+
- - Debian 9+
- - CentOS 7+
- - Red Hat Enterprise Linux (RHEL) 7+
- - Fedora 25+
- - HypriotOS v1.0.1+
- - Flatcar Container Linux (tested with 2512.3.0)
+* A compatible Linux host. The Kubernetes project provides generic instructions for Linux distributions based on Debian and Red Hat, and those distributions without a package manager.
* 2 GB or more of RAM per machine (any less will leave little room for your apps).
* 2 CPUs or more.
* Full network connectivity between all machines in the cluster (public or private network is fine).
@@ -122,7 +115,7 @@ The following table lists container runtimes and their associated socket paths:
{{< table caption = "Container runtimes and their socket paths" >}}
| Runtime | Path to Unix domain socket |
|------------|-----------------------------------|
-| Docker | `/var/run/docker.sock` |
+| Docker | `/var/run/dockershim.sock` |
| containerd | `/run/containerd/containerd.sock` |
| CRI-O | `/var/run/crio/crio.sock` |
{{< /table >}}
@@ -181,7 +174,7 @@ For more information on version skews, see:
* Kubeadm-specific [version skew policy](/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/#version-skew-policy)
{{< tabs name="k8s_install" >}}
-{{% tab name="Ubuntu, Debian or HypriotOS" %}}
+{{% tab name="Debian-based distributions" %}}
```bash
sudo apt-get update && sudo apt-get install -y apt-transport-https curl
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
@@ -193,7 +186,7 @@ sudo apt-get install -y kubelet kubeadm kubectl
sudo apt-mark hold kubelet kubeadm kubectl
```
{{% /tab %}}
-{{% tab name="CentOS, RHEL or Fedora" %}}
+{{% tab name="Red Hat-based distributions" %}}
```bash
cat <
+
+When using client certificate authentication, you can generate certificates
+manually through `easyrsa`, `openssl` or `cfssl`.
+
+
+
+
+
+
+### easyrsa
+
+**easyrsa** can manually generate certificates for your cluster.
+
+1. Download, unpack, and initialize the patched version of easyrsa3.
+
+ curl -LO https://storage.googleapis.com/kubernetes-release/easy-rsa/easy-rsa.tar.gz
+ tar xzf easy-rsa.tar.gz
+ cd easy-rsa-master/easyrsa3
+ ./easyrsa init-pki
+1. Generate a new certificate authority (CA). `--batch` sets automatic mode;
+ `--req-cn` specifies the Common Name (CN) for the CA's new root certificate.
+
+ ./easyrsa --batch "--req-cn=${MASTER_IP}@`date +%s`" build-ca nopass
+1. Generate server certificate and key.
+ The argument `--subject-alt-name` sets the possible IPs and DNS names the API server will
+ be accessed with. The `MASTER_CLUSTER_IP` is usually the first IP from the service CIDR
+ that is specified as the `--service-cluster-ip-range` argument for both the API server and
+ the controller manager component. The argument `--days` is used to set the number of days
+ after which the certificate expires.
+ The sample below also assumes that you are using `cluster.local` as the default
+ DNS domain name.
+
+ ./easyrsa --subject-alt-name="IP:${MASTER_IP},"\
+ "IP:${MASTER_CLUSTER_IP},"\
+ "DNS:kubernetes,"\
+ "DNS:kubernetes.default,"\
+ "DNS:kubernetes.default.svc,"\
+ "DNS:kubernetes.default.svc.cluster,"\
+ "DNS:kubernetes.default.svc.cluster.local" \
+ --days=10000 \
+ build-server-full server nopass
+1. Copy `pki/ca.crt`, `pki/issued/server.crt`, and `pki/private/server.key` to your directory.
+1. Fill in and add the following parameters into the API server start parameters:
+
+ --client-ca-file=/yourdirectory/ca.crt
+ --tls-cert-file=/yourdirectory/server.crt
+ --tls-private-key-file=/yourdirectory/server.key
+
+### openssl
+
+**openssl** can manually generate certificates for your cluster.
+
+1. Generate a ca.key with 2048bit:
+
+ openssl genrsa -out ca.key 2048
+1. According to the ca.key generate a ca.crt (use -days to set the certificate effective time):
+
+ openssl req -x509 -new -nodes -key ca.key -subj "/CN=${MASTER_IP}" -days 10000 -out ca.crt
+1. Generate a server.key with 2048bit:
+
+ openssl genrsa -out server.key 2048
+1. Create a config file for generating a Certificate Signing Request (CSR).
+ Be sure to substitute the values marked with angle brackets (e.g. ``)
+ with real values before saving this to a file (e.g. `csr.conf`).
+ Note that the value for `MASTER_CLUSTER_IP` is the service cluster IP for the
+ API server as described in previous subsection.
+ The sample below also assumes that you are using `cluster.local` as the default
+ DNS domain name.
+
+ [ req ]
+ default_bits = 2048
+ prompt = no
+ default_md = sha256
+ req_extensions = req_ext
+ distinguished_name = dn
+
+ [ dn ]
+ C =
+ ST =
+ L =
+ O =
+ OU =
+ CN =
+
+ [ req_ext ]
+ subjectAltName = @alt_names
+
+ [ alt_names ]
+ DNS.1 = kubernetes
+ DNS.2 = kubernetes.default
+ DNS.3 = kubernetes.default.svc
+ DNS.4 = kubernetes.default.svc.cluster
+ DNS.5 = kubernetes.default.svc.cluster.local
+ IP.1 =
+ IP.2 =
+
+ [ v3_ext ]
+ authorityKeyIdentifier=keyid,issuer:always
+ basicConstraints=CA:FALSE
+ keyUsage=keyEncipherment,dataEncipherment
+ extendedKeyUsage=serverAuth,clientAuth
+ subjectAltName=@alt_names
+1. Generate the certificate signing request based on the config file:
+
+ openssl req -new -key server.key -out server.csr -config csr.conf
+1. Generate the server certificate using the ca.key, ca.crt and server.csr:
+
+ openssl x509 -req -in server.csr -CA ca.crt -CAkey ca.key \
+ -CAcreateserial -out server.crt -days 10000 \
+ -extensions v3_ext -extfile csr.conf
+1. View the certificate:
+
+ openssl x509 -noout -text -in ./server.crt
+
+Finally, add the same parameters into the API server start parameters.
+
+### cfssl
+
+**cfssl** is another tool for certificate generation.
+
+1. Download, unpack and prepare the command line tools as shown below.
+ Note that you may need to adapt the sample commands based on the hardware
+ architecture and cfssl version you are using.
+
+ curl -L https://github.com/cloudflare/cfssl/releases/download/v1.5.0/cfssl_1.5.0_linux_amd64 -o cfssl
+ chmod +x cfssl
+ curl -L https://github.com/cloudflare/cfssl/releases/download/v1.5.0/cfssljson_1.5.0_linux_amd64 -o cfssljson
+ chmod +x cfssljson
+ curl -L https://github.com/cloudflare/cfssl/releases/download/v1.5.0/cfssl-certinfo_1.5.0_linux_amd64 -o cfssl-certinfo
+ chmod +x cfssl-certinfo
+1. Create a directory to hold the artifacts and initialize cfssl:
+
+ mkdir cert
+ cd cert
+ ../cfssl print-defaults config > config.json
+ ../cfssl print-defaults csr > csr.json
+1. Create a JSON config file for generating the CA file, for example, `ca-config.json`:
+
+ {
+ "signing": {
+ "default": {
+ "expiry": "8760h"
+ },
+ "profiles": {
+ "kubernetes": {
+ "usages": [
+ "signing",
+ "key encipherment",
+ "server auth",
+ "client auth"
+ ],
+ "expiry": "8760h"
+ }
+ }
+ }
+ }
+1. Create a JSON config file for CA certificate signing request (CSR), for example,
+ `ca-csr.json`. Be sure to replace the values marked with angle brackets with
+ real values you want to use.
+
+ {
+ "CN": "kubernetes",
+ "key": {
+ "algo": "rsa",
+ "size": 2048
+ },
+ "names":[{
+ "C": "",
+ "ST": "",
+ "L": "",
+ "O": "",
+ "OU": ""
+ }]
+ }
+1. Generate CA key (`ca-key.pem`) and certificate (`ca.pem`):
+
+ ../cfssl gencert -initca ca-csr.json | ../cfssljson -bare ca
+1. Create a JSON config file for generating keys and certificates for the API
+ server, for example, `server-csr.json`. Be sure to replace the values in angle brackets with
+ real values you want to use. The `MASTER_CLUSTER_IP` is the service cluster
+ IP for the API server as described in previous subsection.
+ The sample below also assumes that you are using `cluster.local` as the default
+ DNS domain name.
+
+ {
+ "CN": "kubernetes",
+ "hosts": [
+ "127.0.0.1",
+ "",
+ "",
+ "kubernetes",
+ "kubernetes.default",
+ "kubernetes.default.svc",
+ "kubernetes.default.svc.cluster",
+ "kubernetes.default.svc.cluster.local"
+ ],
+ "key": {
+ "algo": "rsa",
+ "size": 2048
+ },
+ "names": [{
+ "C": "",
+ "ST": "",
+ "L": "",
+ "O": "",
+ "OU": ""
+ }]
+ }
+1. Generate the key and certificate for the API server, which are by default
+ saved into file `server-key.pem` and `server.pem` respectively:
+
+ ../cfssl gencert -ca=ca.pem -ca-key=ca-key.pem \
+ --config=ca-config.json -profile=kubernetes \
+ server-csr.json | ../cfssljson -bare server
+
+
+## Distributing Self-Signed CA Certificate
+
+A client node may refuse to recognize a self-signed CA certificate as valid.
+For a non-production deployment, or for a deployment that runs behind a company
+firewall, you can distribute a self-signed CA certificate to all clients and
+refresh the local list for valid certificates.
+
+On each client, perform the following operations:
+
+```bash
+sudo cp ca.crt /usr/local/share/ca-certificates/kubernetes.crt
+sudo update-ca-certificates
+```
+
+```
+Updating certificates in /etc/ssl/certs...
+1 added, 0 removed; done.
+Running hooks in /etc/ca-certificates/update.d....
+done.
+```
+
+## Certificates API
+
+You can use the `certificates.k8s.io` API to provision
+x509 certificates to use for authentication as documented
+[here](/docs/tasks/tls/managing-tls-in-a-cluster).
+
+
diff --git a/content/en/docs/tasks/configmap-secret/managing-secret-using-kustomize.md b/content/en/docs/tasks/configmap-secret/managing-secret-using-kustomize.md
index d7b1f48a4a..5cbb30b99b 100644
--- a/content/en/docs/tasks/configmap-secret/managing-secret-using-kustomize.md
+++ b/content/en/docs/tasks/configmap-secret/managing-secret-using-kustomize.md
@@ -92,7 +92,7 @@ kubectl describe secrets/db-user-pass-96mffmfh4k
The output is similar to:
```
-Name: db-user-pass
+Name: db-user-pass-96mffmfh4k
Namespace: default
Labels:
Annotations:
diff --git a/content/en/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md b/content/en/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md
index 45d56531f2..0cdfd28258 100644
--- a/content/en/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md
+++ b/content/en/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md
@@ -293,6 +293,10 @@ Services.
Readiness probes runs on the container during its whole lifecycle.
{{< /note >}}
+{{< caution >}}
+Liveness probes *do not* wait for readiness probes to succeed. If you want to wait before executing a liveness probe you should use initialDelaySeconds or a startupProbe.
+{{< /caution >}}
+
Readiness probes are configured similarly to liveness probes. The only difference
is that you use the `readinessProbe` field instead of the `livenessProbe` field.
diff --git a/content/en/docs/tasks/debug-application-cluster/debug-running-pod.md b/content/en/docs/tasks/debug-application-cluster/debug-running-pod.md
index 54e474429c..59a83e87c7 100644
--- a/content/en/docs/tasks/debug-application-cluster/debug-running-pod.md
+++ b/content/en/docs/tasks/debug-application-cluster/debug-running-pod.md
@@ -99,7 +99,7 @@ kubectl run ephemeral-demo --image=k8s.gcr.io/pause:3.1 --restart=Never
```
The examples in this section use the `pause` container image because it does not
-contain userland debugging utilities, but this method works with all container
+contain debugging utilities, but this method works with all container
images.
If you attempt to use `kubectl exec` to create a shell you will see an error
diff --git a/content/en/docs/tasks/inject-data-application/define-environment-variable-container.md b/content/en/docs/tasks/inject-data-application/define-environment-variable-container.md
index 9cefdca03d..02677d6204 100644
--- a/content/en/docs/tasks/inject-data-application/define-environment-variable-container.md
+++ b/content/en/docs/tasks/inject-data-application/define-environment-variable-container.md
@@ -70,8 +70,9 @@ override any environment variables specified in the container image.
{{< /note >}}
{{< note >}}
-The environment variables can reference each other, and cycles are possible,
-pay attention to the order before using
+Environment variables may reference each other, however ordering is important.
+Variables making use of others defined in the same context must come later in
+the list. Similarly, avoid circular references.
{{< /note >}}
## Using environment variables inside of your config
diff --git a/content/en/docs/tasks/tls/certificate-rotation.md b/content/en/docs/tasks/tls/certificate-rotation.md
index ea3602fbb0..5dd9b85714 100644
--- a/content/en/docs/tasks/tls/certificate-rotation.md
+++ b/content/en/docs/tasks/tls/certificate-rotation.md
@@ -69,8 +69,9 @@ write that to disk, in the location specified by `--cert-dir`. Then the kubelet
will use the new certificate to connect to the Kubernetes API.
As the expiration of the signed certificate approaches, the kubelet will
-automatically issue a new certificate signing request, using the Kubernetes
-API. Again, the controller manager will automatically approve the certificate
+automatically issue a new certificate signing request, using the Kubernetes API.
+This can happen at any point between 30% and 10% of the time remaining on the
+certificate. Again, the controller manager will automatically approve the certificate
request and attach a signed certificate to the certificate signing request. The
kubelet will retrieve the new signed certificate from the Kubernetes API and
write that to disk. Then it will update the connections it has to the
diff --git a/content/en/docs/tasks/tls/manual-rotation-of-ca-certificates.md b/content/en/docs/tasks/tls/manual-rotation-of-ca-certificates.md
index 1720ab34a2..e56322cbec 100644
--- a/content/en/docs/tasks/tls/manual-rotation-of-ca-certificates.md
+++ b/content/en/docs/tasks/tls/manual-rotation-of-ca-certificates.md
@@ -105,8 +105,8 @@ Configurations with a single API server will experience unavailability while the
* Make sure control plane components logs no TLS errors.
{{< note >}}
- To generate certificates and private keys for your cluster using the `openssl` command line tool, see [Certificates (`openssl`)](/docs/concepts/cluster-administration/certificates/#openssl).
- You can also use [`cfssl`](/docs/concepts/cluster-administration/certificates/#cfssl).
+ To generate certificates and private keys for your cluster using the `openssl` command line tool, see [Certificates (`openssl`)](/docs/tasks/administer-cluster/certificates/#openssl).
+ You can also use [`cfssl`](/docs/tasks/administer-cluster/certificates/#cfssl).
{{< /note >}}
1. Annotate any Daemonsets and Deployments to trigger pod replacement in a safer rolling fashion.
diff --git a/content/en/docs/tutorials/kubernetes-basics/create-cluster/cluster-intro.html b/content/en/docs/tutorials/kubernetes-basics/create-cluster/cluster-intro.html
index 5ac682d7af..47a2629feb 100644
--- a/content/en/docs/tutorials/kubernetes-basics/create-cluster/cluster-intro.html
+++ b/content/en/docs/tutorials/kubernetes-basics/create-cluster/cluster-intro.html
@@ -33,7 +33,7 @@ weight: 10
A Kubernetes cluster consists of two types of resources:
-
The Master coordinates the cluster
+
The Control Plane coordinates the cluster
Nodes are the workers that run applications
@@ -71,22 +71,22 @@ weight: 10
-
The Master is responsible for managing the cluster. The master coordinates all activities in your cluster, such as scheduling applications, maintaining applications' desired state, scaling applications, and rolling out new updates.
-
A node is a VM or a physical computer that serves as a worker machine in a Kubernetes cluster. Each node has a Kubelet, which is an agent for managing the node and communicating with the Kubernetes master. The node should also have tools for handling container operations, such as containerd or Docker. A Kubernetes cluster that handles production traffic should have a minimum of three nodes.
+
The Control Plane is responsible for managing the cluster. The Control Plane coordinates all activities in your cluster, such as scheduling applications, maintaining applications' desired state, scaling applications, and rolling out new updates.
+
A node is a VM or a physical computer that serves as a worker machine in a Kubernetes cluster. Each node has a Kubelet, which is an agent for managing the node and communicating with the Kubernetes control plane. The node should also have tools for handling container operations, such as containerd or Docker. A Kubernetes cluster that handles production traffic should have a minimum of three nodes.
-
Masters manage the cluster and the nodes that are used to host the running applications.
+
Control Planes manage the cluster and the nodes that are used to host the running applications.
-
When you deploy applications on Kubernetes, you tell the master to start the application containers. The master schedules the containers to run on the cluster's nodes. The nodes communicate with the master using the Kubernetes API, which the master exposes. End users can also use the Kubernetes API directly to interact with the cluster.
+
When you deploy applications on Kubernetes, you tell the control plane to start the application containers. The control plane schedules the containers to run on the cluster's nodes. The nodes communicate with the control plane using the Kubernetes API, which the control plane exposes. End users can also use the Kubernetes API directly to interact with the cluster.
-
A Kubernetes cluster can be deployed on either physical or virtual machines. To get started with Kubernetes development, you can use Minikube. Minikube is a lightweight Kubernetes implementation that creates a VM on your local machine and deploys a simple cluster containing only one node. Minikube is available for Linux, macOS, and Windows systems. The Minikube CLI provides basic bootstrapping operations for working with your cluster, including start, stop, status, and delete. For this tutorial, however, you'll use a provided online terminal with Minikube pre-installed.
+
A Kubernetes cluster can be deployed on either physical or virtual machines. To get started with Kubernetes development, you can use Minikube. Minikube is a lightweight Kubernetes implementation that creates a VM on your local machine and deploys a simple cluster containing only one node. Minikube is available for Linux, macOS, and Windows systems. The Minikube CLI provides basic bootstrapping operations for working with your cluster, including start, stop, status, and delete. For this tutorial, however, you'll use a provided online terminal with Minikube pre-installed.
Now that you know what Kubernetes is, let's go to the online tutorial and start our first cluster!
diff --git a/content/en/docs/tutorials/kubernetes-basics/deploy-app/deploy-intro.html b/content/en/docs/tutorials/kubernetes-basics/deploy-app/deploy-intro.html
index 2ee67382fd..15b6d00a6c 100644
--- a/content/en/docs/tutorials/kubernetes-basics/deploy-app/deploy-intro.html
+++ b/content/en/docs/tutorials/kubernetes-basics/deploy-app/deploy-intro.html
@@ -31,7 +31,7 @@ weight: 10
Once you have a running Kubernetes cluster, you can deploy your containerized applications on top of it.
To do so, you create a Kubernetes Deployment configuration. The Deployment instructs Kubernetes
how to create and update instances of your application. Once you've created a Deployment, the Kubernetes
- master schedules the application instances included in that Deployment to run on individual Nodes in the
+ control plane schedules the application instances included in that Deployment to run on individual Nodes in the
cluster.
diff --git a/content/en/docs/tutorials/kubernetes-basics/public/images/module_01_cluster.svg b/content/en/docs/tutorials/kubernetes-basics/public/images/module_01_cluster.svg
index e1f92dace0..b183377467 100644
--- a/content/en/docs/tutorials/kubernetes-basics/public/images/module_01_cluster.svg
+++ b/content/en/docs/tutorials/kubernetes-basics/public/images/module_01_cluster.svg
@@ -1,6 +1,32 @@
-
-
\ No newline at end of file
+ Control Plane
+ Node
+ Node Processes
+
diff --git a/content/en/docs/tutorials/kubernetes-basics/public/images/module_02_first_app.svg b/content/en/docs/tutorials/kubernetes-basics/public/images/module_02_first_app.svg
index e0ae8fa504..cf8c922916 100644
--- a/content/en/docs/tutorials/kubernetes-basics/public/images/module_02_first_app.svg
+++ b/content/en/docs/tutorials/kubernetes-basics/public/images/module_02_first_app.svg
@@ -1,5 +1,32 @@
-
diff --git a/content/en/docs/tutorials/services/source-ip.md b/content/en/docs/tutorials/services/source-ip.md
index 2d938f3031..4ed574e158 100644
--- a/content/en/docs/tutorials/services/source-ip.md
+++ b/content/en/docs/tutorials/services/source-ip.md
@@ -412,7 +412,7 @@ protocol between the loadbalancer and backend to communicate the true client IP
such as the HTTP [Forwarded](https://tools.ietf.org/html/rfc7239#section-5.2)
or [X-FORWARDED-FOR](https://en.wikipedia.org/wiki/X-Forwarded-For)
headers, or the
-[proxy protocol](https://www.haproxy.org/download/1.5/doc/proxy-protocol.txt).
+[proxy protocol](https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt).
Load balancers in the second category can leverage the feature described above
by creating an HTTP health check pointing at the port stored in
the `service.spec.healthCheckNodePort` field on the Service.
diff --git a/content/en/docs/tutorials/stateless-application/guestbook.md b/content/en/docs/tutorials/stateless-application/guestbook.md
index 27cc649edf..0a84483716 100644
--- a/content/en/docs/tutorials/stateless-application/guestbook.md
+++ b/content/en/docs/tutorials/stateless-application/guestbook.md
@@ -148,7 +148,7 @@ kubectl apply -f ./content/en/examples/application/guestbook/frontend-deployment
### Creating the Frontend Service
-The `mongo` Services you applied is only accessible within the Kubernetes cluster because the default type for a Service is [ClusterIP](/docs/concepts/services-networking/service/#publishing-services---service-types). `ClusterIP` provides a single IP address for the set of Pods the Service is pointing to. This IP address is accessible only within the cluster.
+The `mongo` Services you applied is only accessible within the Kubernetes cluster because the default type for a Service is [ClusterIP](/docs/concepts/services-networking/service/#publishing-services-service-types). `ClusterIP` provides a single IP address for the set of Pods the Service is pointing to. This IP address is accessible only within the cluster.
If you want guests to be able to access your guestbook, you must configure the frontend Service to be externally visible, so a client can request the Service from outside the Kubernetes cluster. However a Kubernetes user you can use `kubectl port-forward` to access the service even though it uses a `ClusterIP`.
diff --git a/content/id/docs/contribute/_index.md b/content/id/docs/contribute/_index.md
index 0105a29791..6762aa97d1 100644
--- a/content/id/docs/contribute/_index.md
+++ b/content/id/docs/contribute/_index.md
@@ -75,5 +75,5 @@ terhadap dokumentasi Kubernetes, tetapi daftar ini dapat membantumu memulainya.
- Untuk berkontribusi ke komunitas Kubernetes melalui forum-forum daring seperti Twitter atau Stack Overflow, atau mengetahui tentang pertemuan komunitas (_meetup_) lokal dan acara-acara Kubernetes, kunjungi [situs komunitas Kubernetes](/community/).
- Untuk mulai berkontribusi ke pengembangan fitur, baca [_cheatseet_ kontributor](https://github.com/kubernetes/community/tree/master/contributors/guide/contributor-cheatsheet).
-- Untuk kontribusi khusus ke halaman Bahansa Indonesia, baca [Dokumentasi Khusus Untuk Translasi Bahasa Indonesia](/docs/contribute/localization_id.md)
+- Untuk kontribusi khusus ke halaman Bahasa Indonesia, baca [Dokumentasi Khusus Untuk Translasi Bahasa Indonesia](/docs/contribute/localization_id.md)
diff --git a/content/it/docs/concepts/containers/container-lifecycle-hooks.md b/content/it/docs/concepts/containers/container-lifecycle-hooks.md
new file mode 100644
index 0000000000..59140ec333
--- /dev/null
+++ b/content/it/docs/concepts/containers/container-lifecycle-hooks.md
@@ -0,0 +1,128 @@
+---
+title: Container Lifecycle Hooks
+content_type: concept
+weight: 30
+---
+
+
+Questa pagina descrive come i Container gestiti con kubelet possono utilizzare il lifecycle
+hook framework dei Container per l'esecuzione di codice eseguito in corrispondenza di alcuni
+eventi durante il loro ciclo di vita.
+
+
+
+## Overview
+
+Analogamente a molti framework di linguaggi di programmazione che hanno degli hooks legati al ciclo di
+vita dei componenti, come ad esempio Angular, Kubernetes fornisce ai Container degli hook legati al loro ciclo di
+vita dei Container.
+Gli hook consentono ai Container di essere consapevoli degli eventi durante il loro ciclo di
+gestione ed eseguire del codice implementato in un handler quando il corrispondente hook viene
+eseguito.
+
+## Container hooks
+
+Esistono due tipi di hook che vengono esposti ai Container:
+
+`PostStart`
+
+Questo hook viene eseguito successivamente alla creazione del container.
+Tuttavia, non vi è garanzia che questo hook venga eseguito prima dell'ENTRYPOINT del container.
+Non vengono passati parametri all'handler.
+
+`PreStop`
+
+Questo hook viene eseguito prima della terminazione di un container a causa di una richiesta API o
+di un evento di gestione, come ad esempio un fallimento delle sonde di liveness/startup, preemption,
+risorse contese e altro. Una chiamata all'hook di `PreStop` fallisce se il container è in stato
+terminated o completed e l'hook deve finire prima che possa essere inviato il segnale di TERM per
+fermare il container. Il conto alla rovescia per la terminazione del Pod (grace period) inizia prima dell'esecuzione
+dell'hook `PreStop`, quindi indipendentemente dall'esito dell'handler, il container terminerà entro
+il grace period impostato. Non vengono passati parametri all'handler.
+
+Una descrizione più dettagliata riguardante al processo di terminazione dei Pod può essere trovata in
+[Terminazione dei Pod](/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination).
+
+### Implementazione degli hook handler
+
+I Container possono accedere a un hook implementando e registrando un handler per tale hook.
+Ci sono due tipi di handler che possono essere implementati per i Container:
+
+* Exec - Esegue un comando specifico, tipo `pre-stop.sh`, all'interno dei cgroup e namespace del Container.
+Le risorse consumate dal comando vengono contate sul Container.
+* HTTP - Esegue una richiesta HTTP verso un endpoint specifico del Container.
+
+### Esecuzione dell'hook handler
+
+Quando viene richiamato l'hook legato al lifecycle del Container, il sistema di gestione di Kubernetes
+esegue l'handler secondo l'azione dell'hook, `httpGet` e `tcpSocket` vengono eseguiti dal processo kubelet,
+mentre `exec` è eseguito nel Container.
+
+Le chiamate agli handler degli hook sono sincrone rispetto al contesto del Pod che contiene il Container.
+Questo significa che per un hook `PostStart`, l'ENTRYPOINT e l'hook si attivano in modo asincrono.
+Tuttavia, se l'hook impiega troppo tempo per essere eseguito o si blocca, il container non può raggiungere lo
+stato di `running`.
+
+Gli hook di `PreStop` non vengono eseguiti in modo asincrono dall'evento di stop del container; l'hook
+deve completare la sua esecuzione prima che l'evento TERM possa essere inviato. Se un hook di `PreStop`
+si blocca durante la sua esecuzione, la fase del Pod rimarrà `Terminating` finchè il Pod non sarà rimosso forzatamente
+dopo la scadenza del suo `terminationGracePeriodSeconds`. Questo grace period si applica al tempo totale
+necessario per effettuare sia l'esecuzione dell'hook di `PreStop` che per l'arresto normale del container.
+Se, per esempio, il `terminationGracePeriodSeconds` è di 60, e l'hook impiega 55 secondi per essere completato,
+e il container impiega 10 secondi per fermarsi normalmente dopo aver ricevuto il segnale, allora il container
+verrà terminato prima di poter completare il suo arresto, poiché `terminationGracePeriodSeconds` è inferiore al tempo
+totale (55+10) necessario perché queste due cose accadano.
+
+Se un hook `PostStart` o `PreStop` fallisce, allora il container viene terminato.
+
+Gli utenti dovrebbero mantenere i loro handler degli hook i più leggeri possibili.
+Ci sono casi, tuttavia, in cui i comandi di lunga durata hanno senso,
+come il salvataggio dello stato del container prima della sua fine.
+
+### Garanzia della chiamata dell'hook
+
+La chiamata degli hook avviene *almeno una volta*, il che significa
+che un hook può essere chiamato più volte da un dato evento, come per `PostStart`
+o `PreStop`.
+Sta all'implementazione dell'hook gestire correttamente questo aspetto.
+
+Generalmente, vengono effettuate singole chiamate agli hook.
+Se, per esempio, la destinazione di hook HTTP non è momentaneamente in grado di ricevere traffico,
+non c'è alcun tentativo di re invio.
+In alcuni rari casi, tuttavia, può verificarsi una doppia chiamata.
+Per esempio, se un kubelet si riavvia nel mentre dell'invio di un hook, questo potrebbe essere
+chiamato per una seconda volta dopo che il kubelet è tornato in funzione.
+
+### Debugging Hook handlers
+
+I log di un handler di hook non sono esposti negli eventi del Pod.
+Se un handler fallisce per qualche ragione, trasmette un evento.
+Per il `PostStart`, questo è l'evento di `FailedPostStartHook`,
+e per il `PreStop`, questo è l'evento di `FailedPreStopHook`.
+Puoi vedere questi eventi eseguendo `kubectl describe pod `.
+Ecco alcuni esempi di output di eventi dall'esecuzione di questo comando:
+
+```
+Events:
+ FirstSeen LastSeen Count From SubObjectPath Type Reason Message
+ --------- -------- ----- ---- ------------- -------- ------ -------
+ 1m 1m 1 {default-scheduler } Normal Scheduled Successfully assigned test-1730497541-cq1d2 to gke-test-cluster-default-pool-a07e5d30-siqd
+ 1m 1m 1 {kubelet gke-test-cluster-default-pool-a07e5d30-siqd} spec.containers{main} Normal Pulling pulling image "test:1.0"
+ 1m 1m 1 {kubelet gke-test-cluster-default-pool-a07e5d30-siqd} spec.containers{main} Normal Created Created container with docker id 5c6a256a2567; Security:[seccomp=unconfined]
+ 1m 1m 1 {kubelet gke-test-cluster-default-pool-a07e5d30-siqd} spec.containers{main} Normal Pulled Successfully pulled image "test:1.0"
+ 1m 1m 1 {kubelet gke-test-cluster-default-pool-a07e5d30-siqd} spec.containers{main} Normal Started Started container with docker id 5c6a256a2567
+ 38s 38s 1 {kubelet gke-test-cluster-default-pool-a07e5d30-siqd} spec.containers{main} Normal Killing Killing container with docker id 5c6a256a2567: PostStart handler: Error executing in Docker Container: 1
+ 37s 37s 1 {kubelet gke-test-cluster-default-pool-a07e5d30-siqd} spec.containers{main} Normal Killing Killing container with docker id 8df9fdfd7054: PostStart handler: Error executing in Docker Container: 1
+ 38s 37s 2 {kubelet gke-test-cluster-default-pool-a07e5d30-siqd} Warning FailedSync Error syncing pod, skipping: failed to "StartContainer" for "main" with RunContainerError: "PostStart handler: Error executing in Docker Container: 1"
+ 1m 22s 2 {kubelet gke-test-cluster-default-pool-a07e5d30-siqd} spec.containers{main} Warning FailedPostStartHook
+```
+
+
+
+## {{% heading "whatsnext" %}}
+
+
+* Approfondisci [Container environment](/docs/concepts/containers/container-environment/).
+* Esegui un tutorial su come
+ [definire degli handlers per i Container lifecycle events](/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/).
+
diff --git a/content/ja/docs/concepts/scheduling-eviction/assign-pod-node.md b/content/ja/docs/concepts/scheduling-eviction/assign-pod-node.md
index 0733690f0b..18b767cbb4 100644
--- a/content/ja/docs/concepts/scheduling-eviction/assign-pod-node.md
+++ b/content/ja/docs/concepts/scheduling-eviction/assign-pod-node.md
@@ -140,9 +140,9 @@ Nodeアフィニティでは、`In`、`NotIn`、`Exists`、`DoesNotExist`、`Gt`
`nodeSelector`と`nodeAffinity`の両方を指定した場合、Podは**両方の**条件を満たすNodeにスケジュールされます。
-`nodeAffinity`内で複数の`nodeSelectorTerms`を指定した場合、Podは**全ての**`nodeSelectorTerms`を満たしたNodeへスケジュールされます。
+`nodeAffinity`内で複数の`nodeSelectorTerms`を指定した場合、Podは**いずれかの**`nodeSelectorTerms`を満たしたNodeへスケジュールされます。
-`nodeSelectorTerms`内で複数の`matchExpressions`を指定した場合にはPodは**いずれかの**`matchExpressions`を満たしたNodeへスケジュールされます。
+`nodeSelectorTerms`内で複数の`matchExpressions`を指定した場合にはPodは**全ての**`matchExpressions`を満たしたNodeへスケジュールされます。
PodがスケジュールされたNodeのラベルを削除したり変更しても、Podは削除されません。
言い換えると、アフィニティはPodをスケジュールする際にのみ考慮されます。
diff --git a/content/ja/docs/reference/tools.md b/content/ja/docs/reference/tools.md
new file mode 100644
index 0000000000..0fedb1cf9d
--- /dev/null
+++ b/content/ja/docs/reference/tools.md
@@ -0,0 +1,46 @@
+---
+title: ツール
+content_type: concept
+---
+
+
+Kubernetesには、Kubernetesシステムの操作に役立ついくつかの組み込みツールが含まれています。
+
+
+## Kubectl
+[`kubectl`](/docs/tasks/tools/install-kubectl/)は、Kubernetesのためのコマンドラインツールです。このコマンドはKubernetes cluster managerを操作します。
+
+## Kubeadm
+[`kubeadm`](docs/setup/production-environment/tools/kubeadm/install-kubeadm/)は、物理サーバやクラウドサーバ、仮想マシン上にKubenetesクラスタを容易にプロビジョニングするためのコマンドラインツールです(現在はアルファ版です)。
+
+## Minikube
+[`minikube`](https://minikube.sigs.k8s.io/docs/)は、開発やテストのためにワークステーション上でシングルノードのKubernetesクラスタをローカルで実行するツールです。
+
+## Dashboard
+[`Dashboard`](/docs/tasks/access-application-cluster/web-ui-dashboard/)は、KubernetesのWebベースのユーザインタフェースで、コンテナ化されたアプリケーションをKubernetesクラスタにデプロイしたり、トラブルシューティングしたり、クラスタとそのリソース自体を管理したりすることが出来ます。
+
+## Helm
+[`Kubernetes Helm`](https://github.com/helm/helm)は、事前に設定されたKubernetesリソースのパッケージ、別名Kubernetes chartsを管理するためのツールです。
+
+Helmを用いて以下のことを行います。
+
+* Kubernetes chartsとしてパッケージ化された人気のあるソフトウェアの検索と利用
+
+* Kubernetes chartsとして所有するアプリケーションを共有すること
+
+* Kubernetesアプリケーションの再現性のあるビルドの作成
+
+* Kubernetesマニフェストファイルを知的な方法で管理
+
+* Helmパッケージのリリース管理
+
+## Kompose
+[`Kompose`](https://github.com/kubernetes/kompose)は、Docker ComposeユーザがKubernetesに移行する手助けをするツールです。
+
+Komposeを用いて以下のことを行います。
+
+* Docker ComposeファイルのKubernetesオブジェクトへの変換
+
+* ローカルのDocker開発からKubernetesを経由したアプリケーション管理への移行
+
+* v1またはv2のDocker Compose用 `yaml` ファイルならびに[分散されたアプリケーションバンドル](https://docs.docker.com/compose/bundles/)の変換
diff --git a/content/ko/docs/concepts/workloads/pods/ephemeral-containers.md b/content/ko/docs/concepts/workloads/pods/ephemeral-containers.md
index 27e48b192f..9e3b23ae5c 100644
--- a/content/ko/docs/concepts/workloads/pods/ephemeral-containers.md
+++ b/content/ko/docs/concepts/workloads/pods/ephemeral-containers.md
@@ -76,7 +76,7 @@ API에서 특별한 `ephemeralcontainers` 핸들러를 사용해서 만들어지
임시 컨테이너를 사용해서 문제를 해결하는 예시는
[임시 디버깅 컨테이너로 디버깅하기]
-(/docs/tasks/debug-application-cluster/debug-running-pod/#debugging-with-ephemeral-debug-container)를 참조한다.
+(/docs/tasks/debug-application-cluster/debug-running-pod/#ephemeral-container)를 참조한다.
## 임시 컨테이너 API
diff --git a/content/pt/blog/_posts/2020-09-02-scaling-kubernetes-networking-endpointslices.md b/content/pt/blog/_posts/2020-09-02-scaling-kubernetes-networking-endpointslices.md
new file mode 100644
index 0000000000..7440689d5f
--- /dev/null
+++ b/content/pt/blog/_posts/2020-09-02-scaling-kubernetes-networking-endpointslices.md
@@ -0,0 +1,47 @@
+---
+layout: blog
+title: 'Escalando a rede do Kubernetes com EndpointSlices'
+date: 2020-09-02
+slug: scaling-kubernetes-networking-with-endpointslices
+---
+
+**Autor:** Rob Scott (Google)
+
+EndpointSlices é um novo tipo de API que provê uma alternativa escalável e extensível à API de Endpoints. EndpointSlices mantém o rastreio dos endereços IP, portas, informações de topologia e prontidão de Pods que compõem um serviço.
+
+No Kubernetes 1.19 essa funcionalidade está habilitada por padrão, com o kube-proxy lendo os [EndpointSlices](/docs/concepts/services-networking/endpoint-slices/) ao invés de Endpoints. Apesar de isso ser uma mudança praticamente transparente, resulta numa melhoria notável de escalabilidade em grandes clusters. Também permite a adição de novas funcionalidades em releases futuras do Kubernetes, como o [Roteamento baseado em topologia.](/docs/concepts/services-networking/service-topology/).
+
+## Limitações de escalabilidade da API de Endpoints
+Na API de Endpoints, existia apenas um recurso de Endpoint por serviço (Service). Isso significa que
+era necessário ser possível armazenar endereços IPs e portas para cada Pod que compunha o serviço correspondente. Isso resultava em recursos imensos de API. Para piorar, o kube-proxy rodava em cada um dos nós e observava qualquer alteração nos recursos de Endpoint. Mesmo que fosse uma simples mudança em um Endpoint, todo o objeto precisava ser enviado para cada uma das instâncias do kube-proxy.
+
+Outra limitação da API de Endpoints era que ela limitava o número de objetos que podiam ser associados a um _Service_. O tamanho padrão de um objeto armazenado no etcd é 1.5MB. Em alguns casos, isso poderia limitar um Endpoint a 5,000 IPs de Pod. Isso não chega a ser um problema para a maioria dos usuários, mas torna-se um problema significativo para serviços que se aproximem desse tamanho.
+
+Para demonstrar o quão significante se torna esse problema em grande escala, vamos usar de um simples exemplo: Imagine um _Service_ que possua 5,000 Pods, e que possa causar o Endpoint a ter 1.5Mb . Se apenas um Endpoint nessa lista sofra uma alteração, todo o objeto de Endpoint precisará ser redistribuído para cada um dos nós do cluster. Em um cluster com 3.000 nós, essa atualização causará o envio de 4.5Gb de dados (1.5Mb de Endpoints * 3,000 nós) para todo o cluster. Isso é quase que o suficiente para encher um DVD, e acontecerá para cada mudança de Endpoint. Agora imagine uma atualização gradual em um _Deployment_ que resulte nos 5,000 Pods serem substituídos - isso é mais que 22Tb (ou 5,000 DVDs) de dados transferidos.
+
+## Dividindo os endpoints com a API de EndpointSlice
+A API de EndpointSlice foi desenhada para resolver esse problema com um modelo similar de _sharding_. Ao invés de rastrar todos os IPs dos Pods para um _Service_, com um único recurso de Endpoint, nós dividimos eles em múltiplos EndpointSlices menores.
+
+Usemos por exemplo um serviço com 15 pods. Nós teríamos um único recurso de Endpoints referente a todos eles. Se o EndpointSlices for configurado para armazenar 5 _endpoints_ cada, nós teríamos 3 EndpointSlices diferentes:
+
+
+Por padrão, o EndpointSlices armazena um máximo de 100 _endpoints_ cada, podendo isso ser configurado com a flag `--max-endpoints-per-slice` no kube-controller-manager.
+
+## EndpointSlices provê uma melhoria de escalabilidade em 10x
+Essa API melhora dramaticamente a escalabilidade da rede. Agora quando um Pod é adicionado ou removido, apenas 1 pequeno EndpointSlice necessita ser atualizado. Essa diferença começa a ser notada quando centenas ou milhares de Pods compõem um único _Service_.
+
+Mais significativo, agora que todos os IPs de Pods para um _Service_ não precisam ser armazenados em um único recurso, nós não precisamos nos preocupar com o limite de tamanho para objetos armazendos no etcd. EndpointSlices já foram utilizados para escalar um serviço além de 100,000 endpoints de rede.
+
+Tudo isso é possível com uma melhoria significativa de performance feita no kube-proxy. Quando o EndpointSlices é usado em grande escala, muito menos dados serão transferidos para as atualizações de endpoints e o kube-proxy torna-se mais rápido para atualizar regras do iptables ou do ipvs. Além disso, os _Services_ podem escalar agora para pelo menos 10x mais além dos limites anteriores.
+
+## EndpointSlices permitem novas funcionalidades
+Introduzido como uma funcionalidade alpha no Kubernetes v1.16, os EndpointSlices foram construídos para permitir algumas novas funcionalidades arrebatadoras em futuras versões do Kubernetes. Isso inclui serviços dual-stack, roteamento baseado em topologia e subconjuntos de _endpoints_.
+
+Serviços Dual-stack são uma nova funcionalidade que foi desenvolvida juntamente com o EndpointSlices. Eles irão utilizar simultâneamente endereços IPv4 e IPv6 para serviços, e dependem do campo addressType do Endpointslices para conter esses novos tipos de endereço por família de IP.
+
+O roteamento baseado por topologia irá atualizar o kube-proxy para dar preferência no roteamento de requisições para a mesma região ou zona, utilizando-se de campos de topologia armazenados em cada endpoint dentro de um EndpointSlice. Como uma melhoria futura disso, estamos explorando o potencial de subconjuntos de endpoint. Isso irá permitir o kube-proxy apenas observar um subconjunto de EndpointSlices. Por exemplo, isso pode ser combinado com o roteamento baseado em topologia e assim, o kube-proxy precisará observar apenas EndpointSlices contendo _endpoints_ na mesma zona. Isso irá permitir uma outra melhoria significativa de escalabilidade.
+
+## O que isso significa para a API de Endpoints?
+Apesar da API de EndpointSlice prover uma alternativa nova e escalável à API de Endpoints, a API de Endpoints continuará a ser considerada uma funcionalidade estável. A mudança mais significativa para a API de Endpoints envolve começar a truncar Endpoints que podem causar problemas de escalabilidade.
+
+A API de Endpoints não será removida, mas muitas novas funcionalidades irão depender da nova API EndpointSlice. Para obter vantágem da funcionalidade e escalabilidade que os EndpointSlices provém, aplicações que hoje consomem a API de Endpoints devem considerar suportar EndpointSlices no futuro.
diff --git a/content/pt/docs/concepts/configuration/organize-cluster-access-kubeconfig.md b/content/pt/docs/concepts/configuration/organize-cluster-access-kubeconfig.md
new file mode 100644
index 0000000000..4b431b486f
--- /dev/null
+++ b/content/pt/docs/concepts/configuration/organize-cluster-access-kubeconfig.md
@@ -0,0 +1,131 @@
+---
+title: Organizando o acesso ao cluster usando arquivos kubeconfig
+content_type: concept
+weight: 60
+---
+
+
+
+Utilize arquivos kubeconfig para organizar informações sobre clusters, usuários, namespaces e mecanismos de autenticação. A ferramenta de linha de comando `kubectl` faz uso dos arquivos kubeconfig para encontrar as informações necessárias para escolher e se comunicar com o serviço de API de um cluster.
+
+
+{{< note >}}
+Um arquivo que é utilizado para configurar o acesso aos clusters é chamado de *kubeconfig*. Esta á uma forma genérica de referenciamento para um arquivo de configuração desta natureza. Isso não significa que existe um arquivo com o nome `kubeconfig`.
+{{< /note >}}
+
+Por padrão, o `kubectl` procura por um arquivo de nome `config` no diretório `$HOME/.kube`
+
+Você pode especificar outros arquivos kubeconfig através da variável de ambiente `KUBECONFIG` ou adicionando a opção [`--kubeconfig`](/docs/reference/generated/kubectl/kubectl/).
+
+Para maiores detalhes na criação e especificação de um kubeconfig, veja o passo a passo em [Configurar Acesso para Múltiplos Clusters](/docs/tasks/access-application-cluster/configure-access-multiple-clusters).
+
+
+
+
+## Suportando múltiplos clusters, usuários e mecanismos de autenticação
+
+Imagine que você possua inúmeros clusters, e seus usuários e componentes se autenticam de várias formas. Por exemplo:
+
+- Um kubelet ativo pode se autenticar utilizando certificados
+- Um usuário pode se autenticar através de tokens
+- Administradores podem possuir conjuntos de certificados os quais provém acesso aos usuários de forma individual.
+
+Através de arquivos kubeconfig, você pode organizar os seus clusters, usuários, e namespaces. Você também pode definir contextos para uma fácil troca entre clusters e namespaces.
+
+
+## Contexto
+
+Um elemento de *contexto* em um kubeconfig é utilizado para agrupar parâmetros de acesso em um nome conveniente. Cada contexto possui três parâmetros: cluster, namespace, e usuário.
+
+Por padrão, a ferramenta de linha de comando `kubectl` utiliza os parâmetros do _contexto atual_ para se comunicar com o cluster.
+
+Para escolher o contexto atual:
+
+```shell
+kubectl config use-context
+```
+
+## A variável de ambiente KUBECONFIG
+
+A variável de ambiente `KUBECONFIG` possui uma lista dos arquivos kubeconfig. Para Linux e Mac, esta lista é delimitada por vírgula. No Windows, a lista é delimitada por ponto e vírgula. A variável de ambiente `KUBECONFIG` não é um requisito obrigatório - caso ela não exista o `kubectl` utilizará o arquivo kubeconfig padrão localizado no caminho `$HOME/.kube/config`.
+
+Se a variável de ambiente `KUBECONFIG` existir, o `kubectl` utilizará uma configuração que é o resultado da combinação dos arquivos listados na variável de ambiente `KUBECONFIG`.
+
+## Combinando arquivos kubeconfig
+
+Para inspecionar a sua configuração atual, execute o seguinte comando:
+
+```shell
+kubectl config view
+```
+
+Como descrito anteriormente, a saída poderá ser resultado de um único arquivo kubeconfig, ou poderá ser o resultado da junção de vários arquivos kubeconfig.
+
+Aqui estão as regras que o `kubectl` utiliza quando realiza a combinação de arquivos kubeconfig:
+
+1. Se o argumento `--kubeconfig` está definido, apenas o arquivo especificado será utilizado. Apenas uma instância desta flag é permitida.
+
+ Caso contrário, se a variável de ambiente `KUBECONFIG` estiver definida, esta deverá ser utilizada como uma lista de arquivos a serem combinados, seguindo o fluxo a seguir:
+
+ * Ignorar arquivos vazios.
+ * Produzir erros para aquivos cujo conteúdo não for possível desserializar.
+ * O primeiro arquivo que definir um valor ou mapear uma chave determinada, será o escolhido.
+ * Nunca modificar um valor ou mapear uma chave.
+ Exemplo: Preservar o contexto do primeiro arquivo que definir `current-context`.
+ Exemplo: Se dois arquivos especificarem um `red-user`, use apenas os valores do primeiro `red-user`. Mesmo se um segundo arquivo possuir entradas não conflitantes sobre a mesma entrada `red-user`, estas deverão ser descartadas.
+
+ Para um exemplo de definição da variável de ambiente `KUBECONFIG` veja [Definido a variável de ambiente KUBECONFIG](/docs/tasks/access-application-cluster/configure-access-multiple-clusters/#set-the-kubeconfig-environment-variable).
+
+ Caso contrário, utilize o arquivo kubeconfig padrão encontrado no diretório `$HOME/.kube/config`, sem qualquer tipo de combinação.
+
+1. Determine o contexto a ser utilizado baseado no primeiro padrão encontrado, nesta ordem:
+
+ 1. Usar o conteúdo da flag `--context` caso ela existir.
+ 1. Usar o `current-context` a partir da combinação dos arquivos kubeconfig.
+
+
+ Um contexto vazio é permitido neste momento.
+
+
+1. Determinar o cluster e o usuário. Neste ponto, poderá ou não existir um contexto.
+ Determinar o cluster e o usuário no primeiro padrão encontrado de acordo com a ordem à seguir. Este procedimento deverá executado duas vezes: uma para definir o usuário a outra para definir o cluster.
+
+ 1. Utilizar a flag caso ela existir: `--user` ou `--cluster`.
+ 1. Se o contexto não estiver vazio, utilizar o cluster ou usuário deste contexto.
+
+ O usuário e o cluster poderão estar vazios neste ponto.
+
+1. Determinar as informações do cluster atual a serem utilizadas. Neste ponto, poderá ou não existir informações de um cluster.
+
+ Construir cada peça de informação do cluster baseado nas opções à seguir; a primeira ocorrência encontrada será a opção vencedora:
+
+ 1. Usar as flags de linha de comando caso existirem: `--server`, `--certificate-authority`, `--insecure-skip-tls-verify`.
+ 1. Se algum atributo do cluster existir a partir da combinação de kubeconfigs, estes deverão ser utilizados.
+ 1. Se não existir informação de localização do servidor falhar.
+
+1. Determinar a informação atual de usuário a ser utilizada. Construir a informação de usuário utilizando as mesmas regras utilizadas para o caso de informações de cluster, exceto para a regra de técnica de autenticação que deverá ser única por usuário:
+
+ 1. Usar as flags, caso existirem: `--client-certificate`, `--client-key`, `--username`, `--password`, `--token`.
+ 1. Usar os campos `user` resultado da combinação de arquivos kubeconfig.
+ 1. Se existirem duas técnicas conflitantes, falhar.
+
+1. Para qualquer informação que ainda estiver ausente, utilizar os valores padrão e potencialmente solicitar informações de autenticação a partir do prompt de comando.
+
+
+## Referências de arquivos
+
+Arquivos e caminhos referenciados em um arquivo kubeconfig são relativos à localização do arquivo kubeconfig.
+
+Referências de arquivos na linha de comando são relativas ao diretório de trabalho vigente.
+
+No arquivo `$HOME/.kube/config`, caminhos relativos são armazenados de forma relativa, e caminhos absolutos são armazenados de forma absoluta.
+
+## {{% heading "whatsnext" %}}
+
+
+* [Configurar Accesso para Multiplos Clusters](/docs/tasks/access-application-cluster/configure-access-multiple-clusters/)
+* [`kubectl config`](/docs/reference/generated/kubectl/kubectl-commands#config)
+
+
+
+
diff --git a/content/zh/blog/_posts/2020-12-02-dockershim-faq.md b/content/zh/blog/_posts/2020-12-02-dockershim-faq.md
index b169eea610..8552f9fd48 100644
--- a/content/zh/blog/_posts/2020-12-02-dockershim-faq.md
+++ b/content/zh/blog/_posts/2020-12-02-dockershim-faq.md
@@ -3,7 +3,6 @@ layout: blog
title: "弃用 Dockershim 的常见问题"
date: 2020-12-02
slug: dockershim-faq
-aliases: [ '/dockershim' ]
---
这是一个复杂的问题,依赖于许多因素。
在 Docker 工作良好的情况下,迁移到 containerd 是一个相对容易的转换,并将获得更好的性能和更少的开销。
-然而,我们建议你先探索 [CNCF 全景图](https://landscape.cncf.io/category=container-runtime&format=card-mode&grouping=category)
+然而,我们建议你先探索 [CNCF 全景图](https://landscape.cncf.io/card-mode?category=container-runtime&grouping=category)
提供的所有选项,以做出更适合你的环境的选择。
Kubernetes 通过将容器放入在节点(Node)上运行的 Pod 中来执行你的工作负载。
-节点可以是一个虚拟机或者物理机器,取决于所在的集群配置。每个节点由
-{{< glossary_tooltip text="控制面" term_id="control-plane" >}} 负责管理,
-并包含运行 {{< glossary_tooltip text="Pods" term_id="pod" >}} 所需的服务。
+节点可以是一个虚拟机或者物理机器,取决于所在的集群配置。
+每个节点包含运行 {{< glossary_tooltip text="Pods" term_id="pod" >}} 所需的服务,
+这些 Pods 由 {{< glossary_tooltip text="控制面" term_id="control-plane" >}} 负责管理。
通常集群中会有若干个节点;而在一个学习用或者资源受限的环境中,你的集群中也可能
只有一个节点。
@@ -121,7 +120,7 @@ register itself with the API server. This is the preferred pattern, used by mos
For self-registration, the kubelet is started with the following options:
-->
-### 节点自注册
+### 节点自注册 {#self-registration-of-nodes}
当 kubelet 标志 `--register-node` 为 true(默认)时,它会尝试向 API 服务注册自己。
这是首选模式,被绝大多数发行版选用。
@@ -171,7 +170,7 @@ When you want to create Node objects manually, set the kubelet flag `--register-
You can modify Node objects regardless of the setting of `--register-node`.
For example, you can set labels on an existing Node, or mark it unschedulable.
-->
-### 手动节点管理
+### 手动节点管理 {#manual-node-administration}
你可以使用 {{< glossary_tooltip text="kubectl" term_id="kubectl" >}}
来创建和修改 Node 对象。
@@ -457,8 +456,7 @@ of the node heartbeats as the cluster scales.
#### 心跳机制 {#heartbeats}
Kubernetes 节点发送的心跳(Heartbeats)有助于确定节点的可用性。
-心跳有两种形式:`NodeStatus` 和 [`Lease` 对象]
-(/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#lease-v1-coordination-k8s-io)。
+心跳有两种形式:`NodeStatus` 和 [`Lease` 对象](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#lease-v1-coordination-k8s-io)。
每个节点在 `kube-node-lease`{{< glossary_tooltip term_id="namespace" text="名字空间">}}
中都有一个与之关联的 `Lease` 对象。
`Lease` 是一种轻量级的资源,可在集群规模扩大时提高节点心跳机制的性能。
diff --git a/content/zh/docs/concepts/cluster-administration/logging.md b/content/zh/docs/concepts/cluster-administration/logging.md
index 44689dcac3..62881a2415 100644
--- a/content/zh/docs/concepts/cluster-administration/logging.md
+++ b/content/zh/docs/concepts/cluster-administration/logging.md
@@ -39,7 +39,7 @@ integrate with Kubernetes. The following sections describe how to handle and sto
-->
集群级日志架构需要一个独立的后端用来存储、分析和查询日志。
Kubernetes 并不为日志数据提供原生的存储解决方案。
-相反,有很多现成的日志方案可以集成到 Kubernetes 中.
+相反,有很多现成的日志方案可以集成到 Kubernetes 中。
下面各节描述如何在节点上处理和存储日志。
-要进一步了解如何配置 fluentd,请参考 [fluentd 官方文档](https://docs.fluentd.org/).
+要进一步了解如何配置 fluentd,请参考 [fluentd 官方文档](https://docs.fluentd.org/)。
{{< /note >}}
@@ -82,9 +82,9 @@ Linux):
Kubernetes 对所有网络设施的实施,都需要满足以下的基本要求(除非有设置一些特定的网络分段策略):
* 节点上的 Pod 可以不通过 NAT 和其他任何节点上的 Pod 通信
-* 节点上的代理(比如:系统守护进程、kubelet) 可以和节点上的所有Pod通信
+* 节点上的代理(比如:系统守护进程、kubelet)可以和节点上的所有Pod通信
-备注:仅针对那些支持 `Pods` 在主机网络中运行的平台(比如:Linux) :
+备注:仅针对那些支持 `Pods` 在主机网络中运行的平台(比如:Linux):
* 那些运行在节点的主机网络里的 Pod 可以不通过 NAT 和所有节点上的 Pod 通信
@@ -107,7 +107,7 @@ usage, but this is no different from processes in a VM. This is called the
Kubernetes 的 IP 地址存在于 `Pod` 范围内 - 容器共享它们的网络命名空间 - 包括它们的 IP 地址和 MAC 地址。
这就意味着 `Pod` 内的容器都可以通过 `localhost` 到达各个端口。
这也意味着 `Pod` 内的容器都需要相互协调端口的使用,但是这和虚拟机中的进程似乎没有什么不同,
-这也被称为“一个 Pod 一个 IP” 模型。
+这也被称为“一个 Pod 一个 IP”模型。
如何实现这一点是正在使用的容器运行时的特定信息。
-也可以在 `node` 本身通过端口去请求你的 `Pod` (称之为主机端口),
+也可以在 `node` 本身通过端口去请求你的 `Pod`(称之为主机端口),
但这是一个很特殊的操作。转发方式如何实现也是容器运行时的细节。
`Pod` 自己并不知道这些主机端口是否存在。
@@ -196,7 +196,7 @@ AOS 具有一组丰富的 REST API 端点,这些端点使 Kubernetes 能够根
从而为私有云和公共云提供端到端管理系统。
AOS 支持使用包括 Cisco、Arista、Dell、Mellanox、HPE 在内的制造商提供的通用供应商设备,
-以及大量白盒系统和开放网络操作系统,例如 Microsoft SONiC、Dell OPX 和 Cumulus Linux 。
+以及大量白盒系统和开放网络操作系统,例如 Microsoft SONiC、Dell OPX 和 Cumulus Linux。
想要更详细地了解 AOS 系统是如何工作的可以点击这里:https://www.apstra.com/products/how-it-works/
@@ -218,10 +218,10 @@ AWS 虚拟私有云(VPC)网络。该 CNI 插件提供了高吞吐量和可
使用该 CNI 插件,可使 Kubernetes Pod 拥有与在 VPC 网络上相同的 IP 地址。
CNI 将 AWS 弹性网络接口(ENI)分配给每个 Kubernetes 节点,并将每个 ENI 的辅助 IP 范围用于该节点上的 Pod 。
-CNI 包含用于 ENI 和 IP 地址的预分配的控件,以便加快 Pod 的启动时间,并且能够支持多达2000个节点的大型集群。
+CNI 包含用于 ENI 和 IP 地址的预分配的控件,以便加快 Pod 的启动时间,并且能够支持多达 2000 个节点的大型集群。
此外,CNI 可以与
-[用于执行网络策略的 Calico](https://docs.aws.amazon.com/eks/latest/userguide/calico.html)一起运行。
+[用于执行网络策略的 Calico](https://docs.aws.amazon.com/eks/latest/userguide/calico.html) 一起运行。
AWS VPC CNI 项目是开源的,请查看 [GitHub 上的文档](https://github.com/aws/amazon-vpc-cni-k8s)。
kubeconfig 文件中的文件和路径引用是相对于 kubeconfig 文件的位置。
-命令行上的文件引用是相当对于当前工作目录的。
+命令行上的文件引用是相对于当前工作目录的。
在 `$HOME/.kube/config` 中,相对路径按相对路径存储,绝对路径按绝对路径存储。
## {{% heading "whatsnext" %}}
diff --git a/content/zh/docs/concepts/overview/components.md b/content/zh/docs/concepts/overview/components.md
index 1e42cdcbaa..090468282a 100644
--- a/content/zh/docs/concepts/overview/components.md
+++ b/content/zh/docs/concepts/overview/components.md
@@ -92,10 +92,10 @@ These controllers include:
-->
这些控制器包括:
-* 节点控制器(Node Controller): 负责在节点出现故障时进行通知和响应。
-* 副本控制器(Replication Controller): 负责为系统中的每个副本控制器对象维护正确数量的 Pod。
-* 端点控制器(Endpoints Controller): 填充端点(Endpoints)对象(即加入 Service 与 Pod)。
-* 服务帐户和令牌控制器(Service Account & Token Controllers): 为新的命名空间创建默认帐户和 API 访问令牌.
+* 节点控制器(Node Controller): 负责在节点出现故障时进行通知和响应
+* 副本控制器(Replication Controller): 负责为系统中的每个副本控制器对象维护正确数量的 Pod
+* 端点控制器(Endpoints Controller): 填充端点(Endpoints)对象(即加入 Service 与 Pod)
+* 服务帐户和令牌控制器(Service Account & Token Controllers): 为新的命名空间创建默认帐户和 API 访问令牌
支持以下两种方式配置调度器的过滤和打分行为:
-
-1. [调度策略](/zh/docs/reference/scheduling/policies) 允许你配置过滤的 _谓词(Predicates)_
+1. [调度策略](/zh/docs/reference/scheduling/policies) 允许你配置过滤的 _断言(Predicates)_
和打分的 _优先级(Priorities)_ 。
2. [调度配置](/zh/docs/reference/scheduling/config/#profiles) 允许你配置实现不同调度阶段的插件,
包括:`QueueSort`, `Filter`, `Score`, `Bind`, `Reserve`, `Permit` 等等。
你也可以配置 kube-scheduler 运行不同的配置文件。
## {{% heading "whatsnext" %}}
-
节点亲和性(详见[这里](/zh/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity))
@@ -140,7 +140,7 @@ This is a "preference" or "soft" version of `NoSchedule` - the system will *try*
pod that does not tolerate the taint on the node, but it is not required. The third kind of `effect` is
`NoExecute`, described later.
-->
-上述例子使用到的 `effect` 的一个值 `NoSchedule`,您也可以使用另外一个值 `PreferNoSchedule`。
+上述例子中 `effect` 使用的值为 `NoSchedule`,您也可以使用另外一个值 `PreferNoSchedule`。
这是“优化”或“软”版本的 `NoSchedule` —— 系统会 *尽量* 避免将 Pod 调度到存在其不能容忍污点的节点上,
但这不是强制的。`effect` 的值还可以设置为 `NoExecute`,下文会详细描述这个值。
@@ -438,7 +438,7 @@ by the user already has a toleration for `node.kubernetes.io/unreachable`.
{{< note >}}
Kubernetes 会自动给 Pod 添加一个 key 为 `node.kubernetes.io/not-ready` 的容忍度
-并配置 `tolerationSeconds=300`,除非用户提供的 Pod 配置中已经已存在了 key 为
+并配置 `tolerationSeconds=300`,除非用户提供的 Pod 配置中已经已存在了 key 为
`node.kubernetes.io/not-ready` 的容忍度。
同样,Kubernetes 会给 Pod 添加一个 key 为 `node.kubernetes.io/unreachable` 的容忍度
@@ -517,5 +517,3 @@ arbitrary tolerations to DaemonSets.
-->
* 阅读[资源耗尽的处理](/zh/docs/tasks/administer-cluster/out-of-resource/),以及如何配置其行为
* 阅读 [Pod 优先级](/zh/docs/concepts/configuration/pod-priority-preemption/)
-
-
diff --git a/content/zh/docs/concepts/workloads/controllers/job.md b/content/zh/docs/concepts/workloads/controllers/job.md
index e79bf11dc1..06853f27b7 100644
--- a/content/zh/docs/concepts/workloads/controllers/job.md
+++ b/content/zh/docs/concepts/workloads/controllers/job.md
@@ -349,7 +349,7 @@ caused by previous runs.
`.spec.template.spec.restartPolicy = "Never"`。
当 Pod 失败时,Job 控制器会启动一个新的 Pod。
这意味着,你的应用需要处理在一个新 Pod 中被重启的情况。
-尤其是应用需要处理之前运行所触碰或产生的临时文件、锁、不完整的输出等问题。
+尤其是应用需要处理之前运行所产生的临时文件、锁、不完整的输出等问题。
{{< feature-state for_k8s_version="v1.19" state="beta" >}}
-
你可以通过编写配置文件,并将其路径传给 `kube-scheduler` 的命令行参数,定制 `kube-scheduler` 的行为。
@@ -82,14 +82,14 @@ extension points:
-->
1. `QueueSort`:这些插件对调度队列中的悬决的 Pod 排序。
一次只能启用一个队列排序插件。
-
2. `PreFilter`:这些插件用于在过滤之前预处理或检查 Pod 或集群的信息。
它们可以将 Pod 标记为不可调度。
-
@@ -127,13 +127,13 @@ extension points:
least one bind plugin is required.
-->
9. `Bind`:这个插件将 Pod 与节点绑定。绑定插件是按顺序调用的,只要有一个插件完成了绑定,其余插件都会跳过。绑定插件至少需要一个。
-
10. `PostBind`:这是一个信息扩展点,在 Pod 绑定了节点之后调用。
-
@@ -154,18 +154,18 @@ profiles:
weight: 1
```
-
你可以在 `disabled` 数组中使用 `*` 禁用该扩展点的所有默认插件。
如果需要,这个字段也可以用来对插件重新顺序。
-
+
### 调度插件 {#scheduling-plugin}
-
@@ -190,7 +190,7 @@ extension points:
- `SelectorSpread`:对于属于 {{< glossary_tooltip text="Services" term_id="service" >}}、
{{< glossary_tooltip text="ReplicaSets" term_id="replica-set" >}} 和
{{< glossary_tooltip text="StatefulSets" term_id="statefulset" >}} 的 Pod,偏好跨多个节点部署。
-
+
实现的扩展点:`PreScore`,`Score`。
- `ImageLocality`:选择已经存在 Pod 运行所需容器镜像的节点。
-
+
实现的扩展点:`Score`。
- `TaintToleration`:实现了[污点和容忍](/zh/docs/concepts/scheduling-eviction/taint-and-toleration/)。
-
+
实现的扩展点:`Filter`,`Prescore`,`Score`。
- `NodeName`:检查 Pod 指定的节点名称与当前节点是否匹配。
-
+
实现的扩展点:`Filter`。
- `NodePorts`:检查 Pod 请求的端口在节点上是否可用。
-
+
实现的扩展点:`PreFilter`,`Filter`。
-- `NodePreferAvoidPods`:基于节点的 {{< glossary_tooltip text="注解" term_id="annotation" >}}
+- `NodePreferAvoidPods`:基于节点的 {{< glossary_tooltip text="注解" term_id="annotation" >}}
`scheduler.alpha.kubernetes.io/preferAvoidPods` 打分。
-
+
实现的扩展点:`Score`。
- `NodeAffinity`:实现了[节点选择器](/zh/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector)
和[节点亲和性](/zh/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity)。
-
+
实现的扩展点:`Filter`,`Score`.
- `PodTopologySpread`:实现了 [Pod 拓扑分布](/zh/docs/concepts/workloads/pods/pod-topology-spread-constraints/)。
-
+
实现的扩展点:`PreFilter`,`Filter`,`PreScore`,`Score`。
- `NodeUnschedulable`:过滤 `.spec.unschedulable` 值为 true 的节点。
-
+
实现的扩展点:`Filter`。
- `NodeResourcesFit`:检查节点是否拥有 Pod 请求的所有资源。
-
+
实现的扩展点:`PreFilter`,`Filter`。
- `NodeResourcesBalancedAllocation`:调度 Pod 时,选择资源使用更为均衡的节点。
-
+
实现的扩展点:`Score`。
- `NodeResourcesLeastAllocated`:选择资源分配较少的节点。
-
+
实现的扩展点:`Score`。
- `VolumeBinding`:检查节点是否有请求的卷,或是否可以绑定请求的卷。
-
+
实现的扩展点: `PreFilter`,`Filter`,`Reserve`,`PreBind`。
-
- `VolumeRestrictions`:检查挂载到节点上的卷是否满足卷提供程序的限制。
-
+
实现的扩展点:`Filter`。
- `VolumeZone`:检查请求的卷是否在任何区域都满足。
-
+
实现的扩展点:`Filter`。
-
- `NodeVolumeLimits`:检查该节点是否满足 CSI 卷限制。
-
+
实现的扩展点:`Filter`。
- `EBSLimits`:检查节点是否满足 AWS EBS 卷限制。
-
+
实现的扩展点:`Filter`。
- `GCEPDLimits`:检查该节点是否满足 GCP-PD 卷限制。
-
+
实现的扩展点:`Filter`。
- `AzureDiskLimits`:检查该节点是否满足 Azure 卷限制。
-
+
实现的扩展点:`Filter`。
- `InterPodAffinity`:实现 [Pod 间亲和性与反亲和性](/zh/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity)。
-
+
实现的扩展点:`PreFilter`,`Filter`,`PreScore`,`Score`。
- `PrioritySort`:提供默认的基于优先级的排序。
-
+
实现的扩展点:`QueueSort`。
- `DefaultBinder`:提供默认的绑定机制。
-
+
实现的扩展点:`Bind`。
- `DefaultPreemption`:提供默认的抢占机制。
-
+
实现的扩展点:`PostFilter`。
- `NodeResourcesMostAllocated`:选择已分配资源多的节点。
-
+
实现的扩展点:`Score`。
- `RequestedToCapacityRatio`:根据已分配资源的某函数设置选择节点。
-
+
实现的扩展点:`Score`。
- `NodeResourceLimits`:选择满足 Pod 资源限制的节点。
-
+
实现的扩展点:`PreScore`,`Score`。
- `CinderVolume`:检查该节点是否满足 OpenStack Cinder 卷限制。
-
+
实现的扩展点:`Filter`。
-- `NodeLabel`:根据配置的 {{< glossary_tooltip text="标签" term_id="label" >}}
+- `NodeLabel`:根据配置的 {{< glossary_tooltip text="标签" term_id="label" >}}
过滤节点和/或给节点打分。
-
+
实现的扩展点:`Filter`,`Score`。
@@ -462,14 +462,14 @@ profiles:
Pods that want to be scheduled according to a specific profile can include
the corresponding scheduler name in its `.spec.schedulerName`.
-->
-希望根据特定配置文件调度的 Pod,可以在 `.spec.schedulerName` 字段指定相应的调度器名称。
+对于那些希望根据特定配置文件来进行调度的 Pod,可以在 `.spec.schedulerName` 字段指定相应的调度器名称。
-默认情况下,将创建一个名为 `default-scheduler` 的配置文件。
+默认情况下,将创建一个调度器名为 `default-scheduler` 的配置文件。
这个配置文件包括上面描述的所有默认插件。
声明多个配置文件时,每个配置文件中调度器名称必须唯一。
@@ -478,8 +478,8 @@ If a Pod doesn't specify a scheduler name, kube-apiserver will set it to
`default-scheduler`. Therefore, a profile with this scheduler name should exist
to get those pods scheduled.
-->
-如果 Pod 未指定调度器名称,kube-apiserver 将会把它设置为 `default-scheduler`。
-因此,应该存在一个名为 `default-scheduler` 的配置文件来调度这些 Pod。
+如果 Pod 未指定调度器名称,kube-apiserver 将会把调度器名设置为 `default-scheduler`。
+因此,应该存在一个调度器名为 `default-scheduler` 的配置文件来调度这些 Pod。
{{< note >}}
Pod 的调度事件把 `.spec.schedulerName` 字段值作为 ReportingController。
-领导者选择事件使用列表中第一个配置文件的调度器名称。
+领导者选举事件使用列表中第一个配置文件的调度器名称。
{{< /note >}}
{{< note >}}
@@ -498,7 +498,7 @@ the same configuration parameters (if applicable). This is because the scheduler
only has one pending pods queue.
-->
所有配置文件必须在 QueueSort 扩展点使用相同的插件,并具有相同的配置参数(如果适用)。
-这是因为调度器只有一个的队列保存悬决的 Pod。
+这是因为调度器只有一个保存 pending 状态 Pod 的队列。
{{< /note >}}
@@ -509,4 +509,4 @@ only has one pending pods queue.
* Learn about [scheduling](/docs/concepts/scheduling-eviction/kube-scheduler/)
-->
* 阅读 [kube-scheduler 参考](/zh/docs/reference/command-line-tools-reference/kube-scheduler/)
-* 了解[调度](/zh/docs/concepts/scheduling-eviction/kube-scheduler/)
\ No newline at end of file
+* 了解[调度](/zh/docs/concepts/scheduling-eviction/kube-scheduler/)
diff --git a/content/zh/docs/reference/using-api/client-libraries.md b/content/zh/docs/reference/using-api/client-libraries.md
index 599b1bf6df..8de0144169 100644
--- a/content/zh/docs/reference/using-api/client-libraries.md
+++ b/content/zh/docs/reference/using-api/client-libraries.md
@@ -111,6 +111,7 @@ their authors, not the Kubernetes team.
| Python | [github.com/fiaas/k8s](https://github.com/fiaas/k8s) |
| Python | [github.com/mnubo/kubernetes-py](https://github.com/mnubo/kubernetes-py) |
| Python | [github.com/tomplus/kubernetes_asyncio](https://github.com/tomplus/kubernetes_asyncio) |
+| Python | [github.com/Frankkkkk/pykorm](https://github.com/Frankkkkk/pykorm) |
| Ruby | [github.com/abonas/kubeclient](https://github.com/abonas/kubeclient) |
| Ruby | [github.com/Ch00k/kuber](https://github.com/Ch00k/kuber) |
| Ruby | [github.com/kontena/k8s-client](https://github.com/kontena/k8s-client) |
@@ -145,6 +146,7 @@ their authors, not the Kubernetes team.
| Python | [github.com/fiaas/k8s](https://github.com/fiaas/k8s) |
| Python | [github.com/mnubo/kubernetes-py](https://github.com/mnubo/kubernetes-py) |
| Python | [github.com/tomplus/kubernetes_asyncio](https://github.com/tomplus/kubernetes_asyncio) |
+| Python | [github.com/Frankkkkk/pykorm](https://github.com/Frankkkkk/pykorm) |
| Ruby | [github.com/abonas/kubeclient](https://github.com/abonas/kubeclient) |
| Ruby | [github.com/Ch00k/kuber](https://github.com/Ch00k/kuber) |
| Ruby | [github.com/kontena/k8s-client](https://github.com/kontena/k8s-client) |
diff --git a/content/zh/docs/tasks/service-catalog/install-service-catalog-using-helm.md b/content/zh/docs/tasks/service-catalog/install-service-catalog-using-helm.md
index ecc001e62d..66f0dd1e1e 100644
--- a/content/zh/docs/tasks/service-catalog/install-service-catalog-using-helm.md
+++ b/content/zh/docs/tasks/service-catalog/install-service-catalog-using-helm.md
@@ -39,7 +39,7 @@ Use [Helm](https://helm.sh/) to install Service Catalog on your Kubernetes clust
* 如果你正在使用 `hack/local-up-cluster.sh`,请确保设置了 `KUBE_ENABLE_CLUSTER_DNS` 环境变量,然后运行安装脚本。
* [安装和设置 v1.7 或更高版本的 kubectl](/zh/docs/tasks/tools/install-kubectl/),确保将其配置为连接到 Kubernetes 集群。
* 安装 v2.7.0 或更高版本的 [Helm](https://helm.sh/)。
- * 遵照 [Helm 安装说明](https://github.com/kubernetes/helm/blob/master/docs/install.md)。
+ * 遵照 [Helm 安装说明](https://helm.sh/docs/intro/install/)。
* 如果已经安装了适当版本的 Helm,请执行 `helm init` 来安装 Helm 的服务器端组件 Tiller。
diff --git a/content/zh/docs/tutorials/_index.md b/content/zh/docs/tutorials/_index.md
index f283d60ea6..42415cafe2 100644
--- a/content/zh/docs/tutorials/_index.md
+++ b/content/zh/docs/tutorials/_index.md
@@ -62,13 +62,13 @@ Kubernetes 文档的这一部分包含教程。每个教程展示了如何完成
* [Exposing an External IP Address to Access an Application in a Cluster](/docs/tutorials/stateless-application/expose-external-ip-address/)
-* [Example: Deploying PHP Guestbook application with Redis](/docs/tutorials/stateless-application/guestbook/)
+* [Example: Deploying PHP Guestbook application with MongoDB](/docs/tutorials/stateless-application/guestbook/)
-->
## 无状态应用程序
* [公开外部 IP 地址访问集群中的应用程序](/zh/docs/tutorials/stateless-application/expose-external-ip-address/)
-* [示例:使用 Redis 部署 PHP 留言板应用程序](/zh/docs/tutorials/stateless-application/guestbook/)
+* [示例:使用 MongoDB 部署 PHP 留言板应用程序](/zh/docs/tutorials/stateless-application/guestbook/)
为了完成本教程中的所有步骤,你必须安装 [kind](https://kind.sigs.k8s.io/docs/user/quick-start/)
-和 [kubectl](/zh/doc/tasks/tools/install-kubectl/)。本教程将显示同时具有 alpha(v1.19 之前的版本)
+和 [kubectl](/zh/docs/tasks/tools/install-kubectl/)。本教程将显示同时具有 alpha(v1.19 之前的版本)
和通常可用的 seccomp 功能的示例,因此请确保为所使用的版本[正确配置](https://kind.sigs.k8s.io/docs/user/quick-start/#setting-kubernetes-version)了集群。
diff --git a/content/zh/docs/tutorials/configuration/configure-java-microservice/configure-java-microservice.md b/content/zh/docs/tutorials/configuration/configure-java-microservice/configure-java-microservice.md
index b6357ed284..b7c99d0e8e 100644
--- a/content/zh/docs/tutorials/configuration/configure-java-microservice/configure-java-microservice.md
+++ b/content/zh/docs/tutorials/configuration/configure-java-microservice/configure-java-microservice.md
@@ -34,7 +34,7 @@ Dockerfile、kubernetes.yml、Kubernetes ConfigMaps、和 Kubernetes Secrets。
比如赋值给不同的容器中的不同环境变量。
@@ -90,4 +90,4 @@ CDI & MicroProfile 都会被用在互动教程中,
### [Start Interactive Tutorial](/docs/tutorials/configuration/configure-java-microservice/configure-java-microservice-interactive/)
-->
## 示例:使用 MicroProfile、ConfigMaps、Secrets 实现外部化应用配置
-### [启动互动教程](/docs/tutorials/configuration/configure-java-microservice/configure-java-microservice-interactive/)
+### [启动互动教程](/zh/docs/tutorials/configuration/configure-java-microservice/configure-java-microservice-interactive/)
diff --git a/content/zh/docs/tutorials/services/source-ip.md b/content/zh/docs/tutorials/services/source-ip.md
index bd0fdc9629..93c4711363 100644
--- a/content/zh/docs/tutorials/services/source-ip.md
+++ b/content/zh/docs/tutorials/services/source-ip.md
@@ -103,15 +103,23 @@ clusterip ClusterIP 10.0.170.92 80/TCP 51s
从相同集群中的一个 pod 访问这个 `ClusterIP`:
-```console
+```shell
kubectl run busybox -it --image=busybox --restart=Never --rm
```
输出结果与以下结果类似:
```
Waiting for pod default/busybox to be running, status is Pending, pod ready: false
If you don't see a command prompt, try pressing enter.
+```
-# ip addr
+然后你可以在 Pod 内运行命令:
+
+```shell
+# 在终端内使用"kubectl run"执行
+
+ip addr
+```
+```
1: lo: mtu 65536 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
@@ -124,8 +132,15 @@ If you don't see a command prompt, try pressing enter.
valid_lft forever preferred_lft forever
inet6 fe80::188a:84ff:feb0:26a5/64 scope link
valid_lft forever preferred_lft forever
+```
-# wget -qO - 10.0.170.92
+然后使用 `wget` 去请求本地 Web 服务器
+```shell
+# 用名为 "clusterip" 的服务的 IPv4 地址替换 "10.0.170.92"
+
+wget -qO - 10.0.170.92
+```
+```
CLIENT VALUES:
client_address=10.244.3.8
command=GET
@@ -178,17 +193,19 @@ client_address=10.240.0.3
用图表示:
-```
- client
- \ ^
- \ \
- v \
- node 1 <--- node 2
- | ^ SNAT
- | | --->
- v |
- endpoint
-```
+{{< mermaid >}}
+graph LR;
+ client(client)-->node2[节点 2];
+ node2-->client;
+ node2-. SNAT .->node1[节点 1];
+ node1-. SNAT .->node2;
+ node1-->endpoint(端点);
+
+ classDef plain fill:#ddd,stroke:#fff,stroke-width:4px,color:#000;
+ classDef k8s fill:#326ce5,stroke:#fff,stroke-width:4px,color:#fff;
+ class node1,node2,endpoint k8s;
+ class client plain;
+{{ mermaid >}}
为了防止这种情况发生,Kubernetes 提供了一个特性来保留客户端的源 IP 地址[(点击此处查看可用特性)](/zh/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip)。设置 `service.spec.externalTrafficPolicy` 的值为 `Local`,请求就只会被代理到本地 endpoints 而不会被转发到其它节点。这样就保留了最初的源 IP 地址。如果没有本地 endpoints,发送到这个节点的数据包将会被丢弃。这样在应用到数据包的任何包处理规则下,你都能依赖这个正确的 source-ip 使数据包通过并到达 endpoint。
@@ -229,17 +246,18 @@ client_address=104.132.1.79
用图表示:
-```
- client
- ^ / \
- / / \
- / v X
- node 1 node 2
- ^ |
- | |
- | v
- endpoint
-```
+{{< mermaid >}}
+graph TD;
+ client --> node1[节点 1];
+ client(client) --x node2[节点 2];
+ node1 --> endpoint(端点);
+ endpoint --> node1;
+
+ classDef plain fill:#ddd,stroke:#fff,stroke-width:4px,color:#000;
+ classDef k8s fill:#326ce5,stroke:#fff,stroke-width:4px,color:#fff;
+ class node1,node2,endpoint k8s;
+ class client plain;
+{{ mermaid >}}
@@ -285,17 +303,7 @@ client_address=10.240.0.5
用图表示:
-```
- client
- |
- lb VIP
- / ^
- v /
-health check ---> node 1 node 2 <--- health check
- 200 <--- ^ | ---> 500
- | V
- endpoint
-```
+
你可以设置 annotation 来进行测试:
@@ -367,7 +375,7 @@ __跨平台支持__
2. 使用一个包转发器,因此从客户端发送到负载均衡器 VIP 的请求在拥有客户端源 IP 地址的节点终止,而不被中间代理。
-第一类负载均衡器必须使用一种它和后端之间约定的协议来和真实的客户端 IP 通信,例如 HTTP [X-FORWARDED-FOR](https://en.wikipedia.org/wiki/X-Forwarded-For) 头,或者 [proxy 协议](http://www.haproxy.org/download/1.5/doc/proxy-protocol.txt)。
+第一类负载均衡器必须使用一种它和后端之间约定的协议来和真实的客户端 IP 通信,例如 HTTP [X-FORWARDED-FOR](https://en.wikipedia.org/wiki/X-Forwarded-For) 头,或者 [proxy 协议](https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt)。
第二类负载均衡器可以通过简单的在保存于 Service 的 `service.spec.healthCheckNodePort` 字段上创建一个 HTTP 健康检查点来使用上面描述的特性。
@@ -394,6 +402,4 @@ $ kubectl delete deployment source-ip-app
## {{% heading "whatsnext" %}}
-* 学习更多关于 [通过 services 连接应用](/zh/docs/concepts/services-networking/connect-applications-service/)
-* 学习更多关于 [负载均衡](/zh/docs/user-guide/load-balancer)
-
+* 进一步学习 [通过 services 连接应用](/zh/docs/concepts/services-networking/connect-applications-service/)
diff --git a/content/zh/docs/tutorials/stateless-application/guestbook-logs-metrics-with-elk.md b/content/zh/docs/tutorials/stateless-application/guestbook-logs-metrics-with-elk.md
deleted file mode 100644
index fb264dbeba..0000000000
--- a/content/zh/docs/tutorials/stateless-application/guestbook-logs-metrics-with-elk.md
+++ /dev/null
@@ -1,723 +0,0 @@
----
-title: "示例: 添加日志和指标到 PHP / Redis Guestbook 案例"
-content_type: tutorial
-weight: 21
-card:
- name: tutorials
- weight: 31
- title: "示例: 添加日志和指标到 PHP / Redis Guestbook 案例"
----
-
-
-
-
-本教程建立在
-[使用 Redis 部署 PHP Guestbook](/zh/docs/tutorials/stateless-application/guestbook) 教程之上。
-*Beats*,是 Elastic 出品的开源的轻量级日志、指标和网络数据采集器,
-将和 Guestbook 一同部署在 Kubernetes 集群中。
-Beats 收集、分析、索引数据到 Elasticsearch,使你可以用 Kibana 查看并分析得到的运营信息。
-本示例由以下内容组成:
-* [带 Redis 的 PHP Guestbook 教程](/zh/docs/tutorials/stateless-application/guestbook)
- 的一个实例部署
-* Elasticsearch 和 Kibana
-* Filebeat
-* Metricbeat
-* Packetbeat
-
-## {{% heading "objectives" %}}
-
-
-* 启动用 Redis 部署的 PHP Guestbook。
-* 安装 kube-state-metrics。
-* 创建 Kubernetes secret。
-* 部署 Beats。
-* 用仪表板查看日志和指标。
-
-## {{% heading "prerequisites" %}}
-
-
-{{< include "task-tutorial-prereqs.md" >}}
-{{< version-check >}}
-
-
-此外,你还需要:
-
-* 依照教程[使用 Redis 的 PHP Guestbook](/zh/docs/tutorials/stateless-application/guestbook)得到的一套运行中的部署环境。
-* 一套运行中的 Elasticsearch 和 Kibana 部署环境。你可以使用 [Elastic 云中的Elasticsearch 服务](https://cloud.elastic.co)、在工作站或者服务器上运行此[下载文件](https://www.elastic.co/guide/en/elastic-stack-get-started/current/get-started-elastic-stack.html)、或运行 [Elastic Helm Charts](https://github.com/elastic/helm-charts)。
-
-
-
-
-## 启动用 Redis 部署的 PHP Guestbook {#start-up-the-php-guestbook-with-redis}
-
-本教程建立在
-[使用 Redis 部署 PHP Guestbook](/zh/docs/tutorials/stateless-application/guestbook) 之上。
-如果你已经有一个运行的 Guestbook 应用程序,那就监控它。
-如果还没有,那就按照说明先部署 Guestbook ,但不要执行**清理**的步骤。
-当 Guestbook 运行起来后,再返回本页。
-
-
-## 添加一个集群角色绑定 {#add-a-cluster-role-binding}
-
-创建一个[集群范围的角色绑定](/zh/docs/reference/access-authn-authz/rbac/#rolebinding-和-clusterrolebinding),
-以便你可以在集群范围(在 kube-system 中)部署 kube-state-metrics 和 Beats。
-
-```shell
-kubectl create clusterrolebinding cluster-admin-binding \
- --clusterrole=cluster-admin --user=
-```
-
-
-### 安装 kube-state-metrics {#install-kube-state-metrics}
-
-Kubernetes [*kube-state-metrics*](https://github.com/kubernetes/kube-state-metrics)
-是一个简单的服务,它侦听 Kubernetes API 服务器并生成对象状态的指标。
-Metricbeat 报告这些指标。
-添加 kube-state-metrics 到运行 Guestbook 的 Kubernetes 集群。
-
-```shell
-git clone https://github.com/kubernetes/kube-state-metrics.git kube-state-metrics
-kubectl apply -f kube-state-metrics/examples/standard
-```
-
-
-### 检查 kube-state-metrics 是否正在运行 {#check-to-see-if-kube-state-metrics-is-running}
-
-```shell
-kubectl get pods --namespace=kube-system -l app.kubernetes.io/name=kube-state-metrics
-```
-
-
-输出:
-
-```
-NAME READY STATUS RESTARTS AGE
-kube-state-metrics-89d656bf8-vdthm 1/1 Running 0 21s
-```
-
-
-## 从 GitHub 克隆 Elastic examples 库 {#clone-the-elastic-examples-github-repo}
-
-```shell
-git clone https://github.com/elastic/examples.git
-```
-
-
-后续命令将引用目录 `examples/beats-k8s-send-anywhere` 中的文件,
-所以把目录切换过去。
-
-```shell
-cd examples/beats-k8s-send-anywhere
-```
-
-
-## 创建 Kubernetes Secret {#create-a-kubernetes-secret}
-
-Kubernetes {{< glossary_tooltip text="Secret" term_id="secret" >}}
-是包含少量敏感数据(类似密码、令牌、秘钥等)的对象。
-这类信息也可以放在 Pod 规格定义或者镜像中;
-但放在 Secret 对象中,能更好的控制它的使用方式,也能减少意外泄露的风险。
-
-{{< note >}}
-这里有两套步骤,一套用于*自管理*的 Elasticsearch 和 Kibana(运行在你的服务器上或使用 Helm Charts),
-另一套用于在 Elastic 云服务中 *Managed service* 的 Elasticsearch 服务。
-在本教程中,只需要为 Elasticsearch 和 Kibana 系统创建 secret。
-{{< /note >}}
-
-{{< tabs name="tab_with_md" >}}
-{{% tab name="自管理" %}}
-
-
-### 自管理系统 {#self-managed}
-
-如果你使用 Elastic 云中的 Elasticsearch 服务,切换到 **Managed service** 标签页。
-
-### 设置凭据 {#set-the-credentials}
-
-当你使用自管理的 Elasticsearch 和 Kibana (对比托管于 Elastic 云中的 Elasticsearch 服务,自管理更有效率),
-创建 k8s secret 需要准备四个文件。这些文件是:
-
-1. `ELASTICSEARCH_HOSTS`
-1. `ELASTICSEARCH_PASSWORD`
-1. `ELASTICSEARCH_USERNAME`
-1. `KIBANA_HOST`
-
-
-为你的 Elasticsearch 集群和 Kibana 主机设置这些信息。这里是一些例子
-(另见[*此配置*](https://stackoverflow.com/questions/59892896/how-to-connect-from-minikube-to-elasticsearch-installed-on-host-local-developme/59892897#59892897))
-
-#### `ELASTICSEARCH_HOSTS` {#elasticsearch-hosts}
-
-
-1. 来自于 Elastic Elasticsearch Helm Chart 的节点组:
-
- ```
- ["http://elasticsearch-master.default.svc.cluster.local:9200"]
- ```
-
-
-1. Mac 上的单节点的 Elasticsearch,Beats 运行在 Mac 的容器中:
-
- ```
- ["http://host.docker.internal:9200"]
- ```
-
-
-1. 运行在虚拟机或物理机上的两个 Elasticsearch 节点
-
- ```
- ["http://host1.example.com:9200", "http://host2.example.com:9200"]
- ```
-
-
-编辑 `ELASTICSEARCH_HOSTS`
-```shell
-vi ELASTICSEARCH_HOSTS
-```
-
-#### `ELASTICSEARCH_PASSWORD` {#elasticsearch-password}
-
-
-只有密码;没有空格、引号、< 和 >:
-
-```
-
-```
-
-
-编辑 `ELASTICSEARCH_PASSWORD`:
-
-```shell
-vi ELASTICSEARCH_PASSWORD
-```
-
-#### `ELASTICSEARCH_USERNAME` {#elasticsearch-username}
-
-
-只有用名;没有空格、引号、< 和 >:
-
-
-```
-<为 Elasticsearch 注入的用户名>
-```
-
-
-编辑 `ELASTICSEARCH_USERNAME`:
-
-```shell
-vi ELASTICSEARCH_USERNAME
-```
-
-#### `KIBANA_HOST` {#kibana-host}
-
-
-1. 从 Elastic Kibana Helm Chart 安装的 Kibana 实例。子域 `default` 指默认的命名空间。如果你把 Helm Chart 指定部署到不同的命名空间,那子域会不同:
-
- ```
- "kibana-kibana.default.svc.cluster.local:5601"
- ```
-
-
-1. Mac 上的 Kibana 实例,Beats 运行于 Mac 的容器:
-
- ```
- "host.docker.internal:5601"
- ```
-
-
-1. 运行于虚拟机或物理机上的两个 Elasticsearch 节点:
-
- ```
- "host1.example.com:5601"
- ```
-
-
-编辑 `KIBANA_HOST`:
-
-```shell
-vi KIBANA_HOST
-```
-
-
-### 创建 Kubernetes secret {#create-a-kubernetes-secret}
-
-在上面编辑完的文件的基础上,本命令在 Kubernetes 系统范围的命名空间(kube-system)创建一个 secret。
-
-```
- kubectl create secret generic dynamic-logging \
- --from-file=./ELASTICSEARCH_HOSTS \
- --from-file=./ELASTICSEARCH_PASSWORD \
- --from-file=./ELASTICSEARCH_USERNAME \
- --from-file=./KIBANA_HOST \
- --namespace=kube-system
-```
-
-{{% /tab %}}
-{{% tab name="Managed service" %}}
-
-
-## Managed service {#managed-service}
-
-本标签页只用于 Elastic 云 的 Elasticsearch 服务,如果你已经为自管理的 Elasticsearch 和 Kibana 创建了secret,请继续[部署 Beats](#deploy-the-beats)并继续。
-
-### 设置凭据 {#set-the-credentials}
-
-在 Elastic 云中的托管 Elasticsearch 服务中,为了创建 k8s secret,你需要先编辑两个文件。它们是:
-
-1. `ELASTIC_CLOUD_AUTH`
-1. `ELASTIC_CLOUD_ID`
-
-
-当你完成部署的时候,Elasticsearch 服务控制台会提供给你一些信息,用这些信息完成设置。
-这里是一些示例:
-
-#### ELASTIC_CLOUD_ID {#elastic-cloud-id}
-
-```
-devk8s:ABC123def456ghi789jkl123mno456pqr789stu123vwx456yza789bcd012efg345hijj678klm901nop345zEwOTJjMTc5YWQ0YzQ5OThlN2U5MjAwYTg4NTIzZQ==
-```
-
-#### ELASTIC_CLOUD_AUTH {#elastic-cloud-auth}
-
-
-只要用户名;没有空格、引号、< 和 >:
-
-```
-elastic:VFxJJf9Tjwer90wnfTghsn8w
-```
-
-
-### 编辑要求的文件 {#edit-the-required-files}
-```shell
-vi ELASTIC_CLOUD_ID
-vi ELASTIC_CLOUD_AUTH
-```
-
-
-### 创建 Kubernetes secret {#create-a-kubernetes-secret}
-
-基于上面刚编辑过的文件,在 Kubernetes 系统范围命名空间(kube-system)中,用下面命令创建一个的secret:
-
- kubectl create secret generic dynamic-logging \
- --from-file=./ELASTIC_CLOUD_ID \
- --from-file=./ELASTIC_CLOUD_AUTH \
- --namespace=kube-system
-
- {{% /tab %}}
-{{< /tabs >}}
-
-
-## 部署 Beats {#deploy-the-beats}
-
-为每一个 Beat 提供 清单文件。清单文件使用已创建的 secret 接入 Elasticsearch 和 Kibana 服务器。
-
-### 关于 Filebeat {#about-filebeat}
-
-Filebeat 收集日志,日志来源于 Kubernetes 节点以及这些节点上每一个 Pod 中的容器。Filebeat 部署为
-{{< glossary_tooltip text="DaemonSet" term_id="daemonset" >}}。
-Filebeat 支持自动发现 Kubernetes 集群中的应用。
-在启动时,Filebeat 扫描存量的容器,并为它们提供适当的配置,
-然后开始监听新的启动/中止信号。
-
-下面是一个自动发现的配置,它支持 Filebeat 定位并分析来自于 Guestbook 应用部署的 Redis 容器的日志文件。
-下面的配置片段来自文件 `filebeat-kubernetes.yaml`:
-
-```yaml
-- condition.contains:
- kubernetes.labels.app: redis
- config:
- - module: redis
- log:
- input:
- type: docker
- containers.ids:
- - ${data.kubernetes.container.id}
- slowlog:
- enabled: true
- var.hosts: ["${data.host}:${data.port}"]
-```
-
-
-
-这样配置 Filebeat,当探测到容器拥有 `app` 标签,且值为 `redis`,那就启用 Filebeat 的 `redis` 模块。
-`redis` 模块可以根据 docker 的输入类型(在 Kubernetes 节点上读取和 Redis 容器的标准输出流关联的文件) ,从容器收集 `log` 流。
-另外,此模块还可以使用容器元数据中提供的配置信息,连到 Pod 适当的主机和端口,收集 Redis 的 `slowlog` 。
-
-### 部署 Filebeat {#deploy-filebeat}
-
-```shell
-kubectl create -f filebeat-kubernetes.yaml
-```
-
-
-#### 验证 {#verify}
-
-```shell
-kubectl get pods -n kube-system -l k8s-app=filebeat-dynamic
-```
-
-
-### 关于 Metricbeat {#about-metricbeat}
-
-Metricbeat 自动发现的配置方式与 Filebeat 完全相同。
-这里是针对 Redis 容器的 Metricbeat 自动发现配置。
-此配置片段来自于文件 `metricbeat-kubernetes.yaml`:
-
-```yaml
-- condition.equals:
- kubernetes.labels.tier: backend
- config:
- - module: redis
- metricsets: ["info", "keyspace"]
- period: 10s
-
- # Redis hosts
- hosts: ["${data.host}:${data.port}"]
-```
-
-配置 Metricbeat,在探测到标签 `tier` 的值等于 `backend` 时,应用 Metricbeat 模块 `redis`。
-`redis` 模块可以获取容器元数据,连接到 Pod 适当的主机和端口,从 Pod 中收集指标 `info` 和 `keyspace`。
-
-### 部署 Metricbeat {#deploy-metricbeat}
-
-```shell
-kubectl create -f metricbeat-kubernetes.yaml
-```
-
-
-#### 验证 {#verify2}
-
-```shell
-kubectl get pods -n kube-system -l k8s-app=metricbeat
-```
-
-
-### 关于 Packetbeat {#about-packetbeat}
-
-Packetbeat 的配置方式不同于 Filebeat 和 Metricbeat。
-相比于匹配容器标签的模式,它的配置基于相关协议和端口号。
-下面展示的是端口号的一个子集:
-
-{{< note >}}
-如果你的服务运行在非标准的端口上,那就打开文件 `filebeat.yaml`,把这个端口号添加到合适的类型中,然后删除/启动 Packetbeat 的守护进程。
-{{< /note >}}
-
-```yaml
-packetbeat.interfaces.device: any
-
-packetbeat.protocols:
-- type: dns
- ports: [53]
- include_authorities: true
- include_additionals: true
-
-- type: http
- ports: [80, 8000, 8080, 9200]
-
-- type: mysql
- ports: [3306]
-
-- type: redis
- ports: [6379]
-
-packetbeat.flows:
- timeout: 30s
- period: 10s
-```
-
-
-### 部署 Packetbeat {#deploy-packetbeat}
-
-```shell
-kubectl create -f packetbeat-kubernetes.yaml
-```
-
-
-#### 验证 {#verify3}
-
-```shell
-kubectl get pods -n kube-system -l k8s-app=packetbeat-dynamic
-```
-
-
-## 在 kibana 中浏览 {#view-in-kibana}
-
-在浏览器中打开 kibana,再打开 **Dashboard**。
-在搜索栏中键入 Kubernetes,再点击 Metricbeat 的 Kubernetes Dashboard。
-此 Dashboard 展示节点状态、应用部署等。
-
-在 Dashboard 页面,搜索 Packetbeat,并浏览 Packetbeat 概览信息。
-
-同样地,浏览 Apache 和 Redis 的 Dashboard。
-可以看到日志和指标各自独立 Dashboard。
-Apache Metricbeat Dashboard 是空的。
-找到 Apache Filebeat Dashboard,拉到最下面,查看 Apache 的错误日志。
-日志会揭示出没有 Apache 指标的原因。
-
-要让 metricbeat 得到 Apache 的指标,需要添加一个包含模块状态配置文件的 ConfigMap,并重新部署 Guestbook。
-
-## 缩放部署规模,查看新 Pod 已被监控 {#scale-your-deployments-and-see-new-pods-being-monitored}
-
-列出现有的 deployments:
-
-```shell
-kubectl get deployments
-```
-
-
-输出:
-
-```
-NAME READY UP-TO-DATE AVAILABLE AGE
-frontend 3/3 3 3 3h27m
-redis-master 1/1 1 1 3h27m
-redis-slave 2/2 2 2 3h27m
-```
-
-
-缩放前端到两个 Pod:
-
-```shell
-kubectl scale --replicas=2 deployment/frontend
-```
-
-
-输出:
-
-```
-deployment.extensions/frontend scaled
-```
-
-
-将前端应用缩放回三个 Pod:
-
-```shell
-kubectl scale --replicas=3 deployment/frontend
-```
-
-
-## 在 Kibana 中查看变化 {#view-the-chagnes-in-kibana}
-
-参见屏幕截图,添加指定的过滤器,然后将列添加到视图。
-你可以看到,ScalingReplicaSet 被做了标记,从标记的点开始,到消息列表的顶部,展示了拉取的镜像、挂载的卷、启动的 Pod 等。
-
-
-## {{% heading "cleanup" %}}
-
-
-删除 Deployments 和 Services, 删除运行的 Pod。
-用标签功能在一个命令中删除多个资源。
-
-1. 执行下列命令,删除所有的 Pod、Deployment 和 Services。
-
- ```shell
- kubectl delete deployment -l app=redis
- kubectl delete service -l app=redis
- kubectl delete deployment -l app=guestbook
- kubectl delete service -l app=guestbook
- kubectl delete -f filebeat-kubernetes.yaml
- kubectl delete -f metricbeat-kubernetes.yaml
- kubectl delete -f packetbeat-kubernetes.yaml
- kubectl delete secret dynamic-logging -n kube-system
- ```
-
-2. 查询 Pod,以核实没有 Pod 还在运行:
-
- ```shell
- kubectl get pods
- ```
-
-
- 响应应该是这样:
-
- ```
- No resources found.
- ```
-
-
-## {{% heading "whatsnext" %}}
-
-
-* 了解[监控资源的工具](/zh/docs/tasks/debug-application-cluster/resource-usage-monitoring/)
-* 进一步阅读[日志体系架构](/zh/docs/concepts/cluster-administration/logging/)
-* 进一步阅读[应用内省和调试](/zh/docs/tasks/debug-application-cluster/)
-* 进一步阅读[应用程序的故障排除](/zh/docs/tasks/debug-application-cluster/resource-usage-monitoring/)
diff --git a/content/zh/docs/tutorials/stateless-application/guestbook.md b/content/zh/docs/tutorials/stateless-application/guestbook.md
index 0343c58f44..b7ef978490 100644
--- a/content/zh/docs/tutorials/stateless-application/guestbook.md
+++ b/content/zh/docs/tutorials/stateless-application/guestbook.md
@@ -1,15 +1,16 @@
---
-title: "示例:使用 Redis 部署 PHP 留言板应用程序"
+title: "示例:使用 MongoDB 部署 PHP 留言板应用程序"
content_type: tutorial
weight: 20
card:
name: tutorials
weight: 30
- title: "无状态应用示例:基于 Redis 的 PHP Guestbook"
+ title: "无状态应用示例:基于 MongoDB 的 PHP Guestbook"
+min-kubernetes-server-version: v1.14
---
本教程向您展示如何使用 Kubernetes 和 [Docker](https://www.docker.com/) 构建和部署
-一个简单的多层 web 应用程序。本例由以下组件组成:
+一个简单的_(非面向生产)的_多层 web 应用程序。本例由以下组件组成:
-* 单实例 [Redis](https://redis.io/) 主节点保存留言板条目
-* 多个[从 Redis](https://redis.io/topics/replication) 节点用来读取数据
+* 单实例 [MongoDB](https://www.mongodb.com/) 以保存留言板条目
* 多个 web 前端实例
@@ -45,15 +45,13 @@ This tutorial shows you how to build and deploy a simple, multi-tier web applica
-* 启动 Redis 主节点。
-* 启动 Redis 从节点。
+* 启动 Mongo 数据库。
* 启动留言板前端。
* 公开并查看前端服务。
* 清理。
@@ -72,44 +70,50 @@ This tutorial shows you how to build and deploy a simple, multi-tier web applica
-## 启动 Redis 主节点
+## 启动 Mongo 数据库
-留言板应用程序使用 Redis 存储数据。它将数据写入一个 Redis 主实例,并从多个 Redis 读取数据。
+留言板应用程序使用 MongoDB 存储数据。
-### 创建 Redis 主节点的 Deployment
+### 创建 Mongo 的 Deployment
-下面包含的清单文件指定了一个 Deployment 控制器,该控制器运行一个 Redis 主节点 Pod 副本。
+下面包含的清单文件指定了一个 Deployment 控制器,该控制器运行一个 MongoDB Pod 副本。
-{{< codenew file="application/guestbook/redis-master-deployment.yaml" >}}
+{{< codenew file="application/guestbook/mongo-deployment.yaml" >}}
1. 在下载清单文件的目录中启动终端窗口。
-2. 从 `redis-master-deployment.yaml` 文件中应用 Redis 主 Deployment:
+2. 从 `mongo-deployment.yaml` 文件中应用 MongoDB Deployment:
```shell
- kubectl apply -f https://k8s.io/examples/application/guestbook/redis-master-deployment.yaml
+ kubectl apply -f https://k8s.io/examples/application/guestbook/mongo-deployment.yaml
```
-
-3. 查询 Pod 列表以验证 Redis 主节点 Pod 是否正在运行:
+
+
+
+3. 查询 Pod 列表以验证 MongoDB Pod 是否正在运行:
```shell
kubectl get pods
@@ -122,53 +126,49 @@ The manifest file, included below, specifies a Deployment controller that runs a
```shell
NAME READY STATUS RESTARTS AGE
- redis-master-1068406935-3lswp 1/1 Running 0 28s
+ mongo-5cfd459dd4-lrcjb 1/1 Running 0 28s
```
-4. 运行以下命令查看 Redis 主节点 Pod 中的日志:
+4. 运行以下命令查看 MongoDB Deployment 中的日志:
```shell
- kubectl logs -f POD-NAME
+ kubectl logs -f deployment/mongo
```
-{{< note >}}
-
-将 POD-NAME 替换为您的 Pod 名称。
-
-{{< /note >}}
-
-
-### 创建 Redis 主节点的服务
+### 创建 MongoDB 服务
-留言板应用程序需要往 Redis 主节点中写数据。因此,需要创建 [Service](/zh/docs/concepts/services-networking/service/) 来代理 Redis 主节点 Pod 的流量。Service 定义了访问 Pod 的策略。
+留言板应用程序需要往 MongoDB 中写数据。因此,需要创建 [Service](/zh/docs/concepts/services-networking/service/) 来代理 MongoDB Pod 的流量。Service 定义了访问 Pod 的策略。
-{{< codenew file="application/guestbook/redis-master-service.yaml" >}}
+{{< codenew file="application/guestbook/mongo-service.yaml" >}}
-1. 使用下面的 `redis-master-service.yaml` 文件创建 Redis 主节点的服务:
+1. 使用下面的 `mongo-service.yaml` 文件创建 MongoDB 的服务:
```shell
- kubectl apply -f https://k8s.io/examples/application/guestbook/redis-master-service.yaml
+ kubectl apply -f https://k8s.io/examples/application/guestbook/mongo-service.yaml
```
-
-2. 查询服务列表验证 Redis 主节点服务是否正在运行:
+
+
+2. 查询服务列表验证 MongoDB 服务是否正在运行:
```shell
kubectl get service
@@ -182,134 +182,26 @@ The guestbook application needs to communicate to the Redis master to write its
```shell
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.0.0.1 443/TCP 1m
- redis-master ClusterIP 10.0.0.151 6379/TCP 8s
+ mongo ClusterIP 10.0.0.151 6379/TCP 8s
```
+
{{< note >}}
-
-
-这个清单文件创建了一个名为 `Redis-master` 的 Service,其中包含一组与前面定义的标签匹配的标签,因此服务将网络流量路由到 Redis 主节点 Pod 上。
-
+这个清单文件创建了一个名为 `mongo` 的 Service,其中包含一组与前面定义的标签匹配的标签,因此服务将网络流量路由到 MongoDB Pod 上。
{{< /note >}}
-
-
-## 启动 Redis 从节点
-
-
-尽管 Redis 主节点是一个单独的 pod,但是您可以通过添加 Redis 从节点的方式来使其高可用性,以满足流量需求。
-
-
-
-### 创建 Redis 从节点 Deployment
-
-
-Deployments 根据清单文件中设置的配置进行伸缩。在这种情况下,Deployment 对象指定两个副本。
-
-
-如果没有任何副本正在运行,则此 Deployment 将启动容器集群上的两个副本。相反,
-如果有两个以上的副本在运行,那么它的规模就会缩小,直到运行两个副本为止。
-
-{{< codenew file="application/guestbook/redis-slave-deployment.yaml" >}}
-
-
-1. 从 `redis-slave-deployment.yaml` 文件中应用 Redis Slave Deployment:
-
- ```shell
- kubectl apply -f https://k8s.io/examples/application/guestbook/redis-slave-deployment.yaml
- ```
-
-
-2. 查询 Pod 列表以验证 Redis Slave Pod 正在运行:
-
- ```shell
- kubectl get pods
- ```
-
-
- 响应应该与此类似:
-
- ```shell
- NAME READY STATUS RESTARTS AGE
- redis-master-1068406935-3lswp 1/1 Running 0 1m
- redis-slave-2005841000-fpvqc 0/1 ContainerCreating 0 6s
- redis-slave-2005841000-phfv9 0/1 ContainerCreating 0 6s
- ```
-
-
-
-### 创建 Redis 从节点的 Service
-
-
-留言板应用程序需要从 Redis 从节点中读取数据。
-为了便于 Redis 从节点可发现,
-您需要设置一个 Service。Service 为一组 Pod 提供负载均衡。
-
-{{< codenew file="application/guestbook/redis-slave-service.yaml" >}}
-
-
-1. 从以下 `redis-slave-service.yaml` 文件应用 Redis Slave 服务:
-
- ```shell
- kubectl apply -f https://k8s.io/examples/application/guestbook/redis-slave-service.yaml
- ```
-
-
-2. 查询服务列表以验证 Redis 在服务是否正在运行:
-
- ```shell
- kubectl get services
- ```
-
-
- 响应应该与此类似:
-
- ```
- NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
- kubernetes ClusterIP 10.0.0.1 443/TCP 2m
- redis-master ClusterIP 10.0.0.151 6379/TCP 1m
- redis-slave ClusterIP 10.0.0.223 6379/TCP 6s
- ```
-
-
## 设置并公开留言板前端
-
+
留言板应用程序有一个 web 前端,服务于用 PHP 编写的 HTTP 请求。
-它被配置为连接到写请求的 `redis-master` 服务和读请求的 `redis-slave` 服务。
+它被配置为连接到 `mongo` 服务以存储留言版条目。
+
2. 查询 Pod 列表,验证三个前端副本是否正在运行:
```shell
- kubectl get pods -l app=guestbook -l tier=frontend
+ kubectl get pods -l app.kubernetes.io/name=guestbook -l app.kubernetes.io/component=frontend
```
-应用的 `redis-slave` 和 `redis-master` 服务只能在容器集群中访问,因为服务的默认类型是
-[ClusterIP](/zh/docs/concepts/Services-networking/Service/#publishingservices-Service-types)。`ClusterIP` 为服务指向的 Pod 集提供一个 IP 地址。这个 IP 地址只能在集群中访问。
+应用的 `mongo` 服务只能在 Kubernetes 集群中访问,因为服务的默认类型是
+[ClusterIP](/zh/docs/concepts/services-networking/service/#publishing-services---service-types)。`ClusterIP` 为服务指向的 Pod 集提供一个 IP 地址。这个 IP 地址只能在集群中访问。
-如果您希望客人能够访问您的留言板,您必须将前端服务配置为外部可见的,以便客户机可以从容器集群之外请求服务。Minikube 只能通过 `NodePort` 公开服务。
+如果您希望访客能够访问您的留言板,您必须将前端服务配置为外部可见的,以便客户端可以从 Kubernetes 集群之外请求服务。然而即便使用了 `ClusterIP` Kubernets 用户仍可以通过 `kubectl port-forwart` 访问服务。
+
{{< note >}}
-
-
一些云提供商,如 Google Compute Engine 或 Google Kubernetes Engine,支持外部负载均衡器。如果您的云提供商支持负载均衡器,并且您希望使用它,
-只需删除或注释掉 `type: NodePort`,并取消注释 `type: LoadBalancer` 即可。
-
+只需取消注释 `type: LoadBalancer` 即可。
{{< /note >}}
{{< codenew file="application/guestbook/frontend-service.yaml" >}}
@@ -387,6 +282,11 @@ Some cloud providers, like Google Compute Engine or Google Kubernetes Engine, su
kubectl apply -f https://k8s.io/examples/application/guestbook/frontend-service.yaml
```
+
+
@@ -403,30 +303,24 @@ Some cloud providers, like Google Compute Engine or Google Kubernetes Engine, su
```
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
- frontend NodePort 10.0.0.112 80:31323/TCP 6s
+ frontend ClusterIP 10.0.0.112 80/TCP 6s
kubernetes ClusterIP 10.0.0.1 443/TCP 4m
- redis-master ClusterIP 10.0.0.151 6379/TCP 2m
- redis-slave ClusterIP 10.0.0.223 6379/TCP 1m
+ mongo ClusterIP 10.0.0.151 6379/TCP 2m
```
-### 通过 `NodePort` 查看前端服务
+### 通过 `kubectl port-forward` 查看前端服务
-如果您将此应用程序部署到 Minikube 或本地集群,您需要找到 IP 地址来查看您的留言板。
-
-
-1. 运行以下命令获取前端服务的 IP 地址。
+1. 运行以下命令将本机的 `8080` 端口转发到服务的 `80` 端口。
```shell
- minikube service frontend --url
+ kubectl port-forward svc/frontend 8080:80
```
-2. 复制 IP 地址,然后在浏览器中加载页面以查看留言板。
+2. 在浏览器中加载 [http://localhost:8080](http://localhost:8080) 页面以查看留言板。
-5. 运行以下命令以删除所有 Pod,Deployments 和 Services。
+1. 运行以下命令以删除所有 Pod,Deployments 和 Services。
```shell
- kubectl delete deployment -l app=redis
- kubectl delete service -l app=redis
- kubectl delete deployment -l app=guestbook
- kubectl delete service -l app=guestbook
+ kubectl delete deployment -l app.kubernetes.io/name=mongo
+ kubectl delete service -l app.kubernetes.io/name=mongo
+ kubectl delete deployment -l app.kubernetes.io/name=guestbook
+ kubectl delete service -l app.kubernetes.io/name=guestbook
```
-6. 查询 Pod 列表,确认没有 Pod 在运行:
+2. 查询 Pod 列表,确认没有 Pod 在运行:
```shell
kubectl get pods
@@ -616,15 +505,12 @@ Deleting the Deployments and Services also deletes any running Pods. Use labels
-* 为 Guestbook 应用添加
- [ELK 日志与监控](/zh/docs/tutorials/stateless-application/guestbook-logs-metrics-with-elk/)
* 完成 [Kubernetes Basics](/zh/docs/tutorials/kubernetes-basics/) 交互式教程
* 使用 Kubernetes 创建一个博客,使用 [MySQL 和 Wordpress 的持久卷](/zh/docs/tutorials/stateful-application/mysql-wordpress-persistent-volume/#visit-your-new-wordpress-blog)
* 阅读更多关于[连接应用程序](/zh/docs/concepts/services-networking/connect-applications-service/)
diff --git a/content/zh/examples/application/guestbook/frontend-deployment.yaml b/content/zh/examples/application/guestbook/frontend-deployment.yaml
index 23d64be644..613c654aa9 100644
--- a/content/zh/examples/application/guestbook/frontend-deployment.yaml
+++ b/content/zh/examples/application/guestbook/frontend-deployment.yaml
@@ -3,22 +3,24 @@ kind: Deployment
metadata:
name: frontend
labels:
- app: guestbook
+ app.kubernetes.io/name: guestbook
+ app.kubernetes.io/component: frontend
spec:
selector:
matchLabels:
- app: guestbook
- tier: frontend
+ app.kubernetes.io/name: guestbook
+ app.kubernetes.io/component: frontend
replicas: 3
template:
metadata:
labels:
- app: guestbook
- tier: frontend
+ app.kubernetes.io/name: guestbook
+ app.kubernetes.io/component: frontend
spec:
containers:
- - name: php-redis
- image: gcr.io/google-samples/gb-frontend:v4
+ - name: guestbook
+ image: paulczar/gb-frontend:v5
+ # image: gcr.io/google-samples/gb-frontend:v4
resources:
requests:
cpu: 100m
@@ -26,13 +28,5 @@ spec:
env:
- name: GET_HOSTS_FROM
value: dns
- # Using `GET_HOSTS_FROM=dns` requires your cluster to
- # provide a dns service. As of Kubernetes 1.3, DNS is a built-in
- # service launched automatically. However, if the cluster you are using
- # does not have a built-in DNS service, you can instead
- # access an environment variable to find the master
- # service's host. To do so, comment out the 'value: dns' line above, and
- # uncomment the line below:
- # value: env
ports:
- containerPort: 80
diff --git a/content/zh/examples/application/guestbook/frontend-service.yaml b/content/zh/examples/application/guestbook/frontend-service.yaml
index 6f283f347b..34ad3771d7 100644
--- a/content/zh/examples/application/guestbook/frontend-service.yaml
+++ b/content/zh/examples/application/guestbook/frontend-service.yaml
@@ -3,16 +3,14 @@ kind: Service
metadata:
name: frontend
labels:
- app: guestbook
- tier: frontend
+ app.kubernetes.io/name: guestbook
+ app.kubernetes.io/component: frontend
spec:
- # comment or delete the following line if you want to use a LoadBalancer
- type: NodePort
# if your cluster supports it, uncomment the following to automatically create
# an external load-balanced IP for the frontend service.
# type: LoadBalancer
ports:
- port: 80
selector:
- app: guestbook
- tier: frontend
+ app.kubernetes.io/name: guestbook
+ app.kubernetes.io/component: frontend
diff --git a/content/zh/examples/application/guestbook/mongo-deployment.yaml b/content/zh/examples/application/guestbook/mongo-deployment.yaml
new file mode 100644
index 0000000000..04908ce25b
--- /dev/null
+++ b/content/zh/examples/application/guestbook/mongo-deployment.yaml
@@ -0,0 +1,31 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: mongo
+ labels:
+ app.kubernetes.io/name: mongo
+ app.kubernetes.io/component: backend
+spec:
+ selector:
+ matchLabels:
+ app.kubernetes.io/name: mongo
+ app.kubernetes.io/component: backend
+ replicas: 1
+ template:
+ metadata:
+ labels:
+ app.kubernetes.io/name: mongo
+ app.kubernetes.io/component: backend
+ spec:
+ containers:
+ - name: mongo
+ image: mongo:4.2
+ args:
+ - --bind_ip
+ - 0.0.0.0
+ resources:
+ requests:
+ cpu: 100m
+ memory: 100Mi
+ ports:
+ - containerPort: 27017
diff --git a/content/zh/examples/application/guestbook/mongo-service.yaml b/content/zh/examples/application/guestbook/mongo-service.yaml
new file mode 100644
index 0000000000..b9cef607bc
--- /dev/null
+++ b/content/zh/examples/application/guestbook/mongo-service.yaml
@@ -0,0 +1,14 @@
+apiVersion: v1
+kind: Service
+metadata:
+ name: mongo
+ labels:
+ app.kubernetes.io/name: mongo
+ app.kubernetes.io/component: backend
+spec:
+ ports:
+ - port: 27017
+ targetPort: 27017
+ selector:
+ app.kubernetes.io/name: mongo
+ app.kubernetes.io/component: backend
diff --git a/content/zh/examples/application/guestbook/redis-master-deployment.yaml b/content/zh/examples/application/guestbook/redis-master-deployment.yaml
deleted file mode 100644
index 478216d1ac..0000000000
--- a/content/zh/examples/application/guestbook/redis-master-deployment.yaml
+++ /dev/null
@@ -1,29 +0,0 @@
-apiVersion: apps/v1
-kind: Deployment
-metadata:
- name: redis-master
- labels:
- app: redis
-spec:
- selector:
- matchLabels:
- app: redis
- role: master
- tier: backend
- replicas: 1
- template:
- metadata:
- labels:
- app: redis
- role: master
- tier: backend
- spec:
- containers:
- - name: master
- image: k8s.gcr.io/redis:e2e # or just image: redis
- resources:
- requests:
- cpu: 100m
- memory: 100Mi
- ports:
- - containerPort: 6379
diff --git a/content/zh/examples/application/guestbook/redis-master-service.yaml b/content/zh/examples/application/guestbook/redis-master-service.yaml
deleted file mode 100644
index a484014f1f..0000000000
--- a/content/zh/examples/application/guestbook/redis-master-service.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
-apiVersion: v1
-kind: Service
-metadata:
- name: redis-master
- labels:
- app: redis
- role: master
- tier: backend
-spec:
- ports:
- - port: 6379
- targetPort: 6379
- selector:
- app: redis
- role: master
- tier: backend
diff --git a/content/zh/examples/application/guestbook/redis-slave-deployment.yaml b/content/zh/examples/application/guestbook/redis-slave-deployment.yaml
deleted file mode 100644
index 1a7b04386a..0000000000
--- a/content/zh/examples/application/guestbook/redis-slave-deployment.yaml
+++ /dev/null
@@ -1,40 +0,0 @@
-apiVersion: apps/v1
-kind: Deployment
-metadata:
- name: redis-slave
- labels:
- app: redis
-spec:
- selector:
- matchLabels:
- app: redis
- role: slave
- tier: backend
- replicas: 2
- template:
- metadata:
- labels:
- app: redis
- role: slave
- tier: backend
- spec:
- containers:
- - name: slave
- image: gcr.io/google_samples/gb-redisslave:v3
- resources:
- requests:
- cpu: 100m
- memory: 100Mi
- env:
- - name: GET_HOSTS_FROM
- value: dns
- # Using `GET_HOSTS_FROM=dns` requires your cluster to
- # provide a dns service. As of Kubernetes 1.3, DNS is a built-in
- # service launched automatically. However, if the cluster you are using
- # does not have a built-in DNS service, you can instead
- # access an environment variable to find the master
- # service's host. To do so, comment out the 'value: dns' line above, and
- # uncomment the line below:
- # value: env
- ports:
- - containerPort: 6379
diff --git a/content/zh/examples/application/guestbook/redis-slave-service.yaml b/content/zh/examples/application/guestbook/redis-slave-service.yaml
deleted file mode 100644
index 238fd63fb6..0000000000
--- a/content/zh/examples/application/guestbook/redis-slave-service.yaml
+++ /dev/null
@@ -1,15 +0,0 @@
-apiVersion: v1
-kind: Service
-metadata:
- name: redis-slave
- labels:
- app: redis
- role: slave
- tier: backend
-spec:
- ports:
- - port: 6379
- selector:
- app: redis
- role: slave
- tier: backend
diff --git a/layouts/shortcodes/cncf-landscape.html b/layouts/shortcodes/cncf-landscape.html
index a97d4f9f8a..22b05d3ff0 100644
--- a/layouts/shortcodes/cncf-landscape.html
+++ b/layouts/shortcodes/cncf-landscape.html
@@ -15,7 +15,7 @@ function updateLandscapeSource(button,shouldUpdateFragment) {
} else {
var landscapeElements = document.querySelectorAll("#landscape");
let categories=button.dataset.landscapeTypes;
- let link = "https://landscape.cncf.io/category="+encodeURIComponent(categories)+"&format=card-mode&grouping=category&embed=yes";
+ let link = "https://landscape.cncf.io/card-mode?category="+encodeURIComponent(categories)+"&grouping=category&embed=yes";
landscapeElements[0].src = link;
}
}
@@ -58,9 +58,9 @@ document.addEventListener("DOMContentLoaded", function () {
{{- end -}}
{{ if ( .Get "category" ) }}
-
+
{{ else }}
-
+
{{ end }}