Skip to content

Commit

Permalink
Replace outdated instructions and add a tip in kubeadm-certs.md
Browse files Browse the repository at this point in the history
  • Loading branch information
JayBeale committed Jul 21, 2023
1 parent ce682af commit 1fb2c45
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 11 deletions.
4 changes: 2 additions & 2 deletions content/de/docs/tasks/tools/install-kubectl-linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Um kubectl auf Linux zu installieren, gibt es die folgenden Möglichkeiten:

Falls die Validierung fehlschlägt, beendet sich `sha256` mit einem "nonzero"-Status und gibt einen Fehler aus, welcher so aussehen könnte:

```bash
```console
kubectl: FAILED
sha256sum: WARNING: 1 computed checksum did NOT match
```
Expand Down Expand Up @@ -253,7 +253,7 @@ Untenstehend ist beschrieben, wie die Autovervollständigungen für Fish und Zsh

Falls die Validierung fehlschlägt, beendet sich `sha256` mit einem "nonzero"-Status und gibt einen Fehler aus, welcher so aussehen könnte:

```bash
```console
kubectl-convert: FAILED
sha256sum: WARNING: 1 computed checksum did NOT match
```
Expand Down
18 changes: 17 additions & 1 deletion content/en/docs/concepts/configuration/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,23 @@ to others, please don't hesitate to file an issue or submit a PR.

- Put object descriptions in annotations, to allow better introspection.

{{< note >}}
There is a breaking change introduced in the [YAML 1.2](https://yaml.org/spec/1.2.0/#id2602744)
boolean values specification with respect to [YAML 1.1](https://yaml.org/spec/1.1/#id864510).
This is a known [issue](https://github.com/kubernetes/kubernetes/issues/34146) in Kubernetes.
YAML 1.2 only recognizes **true** and **false** as valid booleans, while YAML 1.1 also accepts
**yes**, **no**, **on**, and **off** as booleans. However, Kubernetes uses YAML
[parsers](https://github.com/kubernetes/kubernetes/issues/34146#issuecomment-252692024) that are
mostly compatible with YAML 1.1, which means that using **yes** or **no** instead of **true** or
**false** in a YAML manifest may cause unexpected errors or behaviors. To avoid this issue, it is
recommended to always use **true** or **false** for boolean values in YAML manifests, and to quote
any strings that may be confused with booleans, such as **"yes"** or **"no"**.

Besides booleans, there are additional specifications changes between YAML versions. Please refer
to the [YAML Specification Changes](https://spec.yaml.io/main/spec/1.2.2/ext/changes) documentation
for a comprehensive list.
{{< /note >}}

## "Naked" Pods versus ReplicaSets, Deployments, and Jobs {#naked-pods-vs-replicasets-deployments-and-jobs}

- Don't use naked Pods (that is, Pods not bound to a [ReplicaSet](/docs/concepts/workloads/controllers/replicaset/) or
Expand Down Expand Up @@ -135,4 +152,3 @@ to others, please don't hesitate to file an issue or submit a PR.
Deployments and Services.
See [Use a Service to Access an Application in a Cluster](/docs/tasks/access-application-cluster/service-access-application-cluster/)
for an example.

Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ satisfy the StatefulSet specification.
Different kinds of object can also have different `.status`; again, the API reference pages
detail the structure of that `.status` field, and its content for each different type of object.

{{< note >}}
See [Configuration Best Practices](/docs/concepts/configuration/overview/) for additional
information on writing YAML configuration files.
{{< /note >}}

## Server side field validation

Starting with Kubernetes v1.25, the API server offers server side
Expand Down
19 changes: 12 additions & 7 deletions content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-certs.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ command. In that case, you should explicitly set `--certificate-renewal=true`.

## Manual certificate renewal

You can renew your certificates manually at any time with the `kubeadm certs renew` command.
You can renew your certificates manually at any time with the `kubeadm certs renew` command, with the appropriate command line options.

This command performs the renewal using CA (or front-proxy-CA) certificate and key stored in `/etc/kubernetes/pki`.

Expand All @@ -160,15 +160,20 @@ Name, Organization, SAN, etc.) instead of the `kubeadm-config` ConfigMap. It is
to keep them both in sync.
{{< /note >}}

`kubeadm certs renew` provides the following options:
`kubeadm certs renew` can renew any specific certificate or, with the subcommand `all`, it can renew all of them, as shown below:

- The Kubernetes certificates normally reach their expiration date after one year.
```shell
kubeadm certs renew all
```

- `--csr-only` can be used to renew certificates with an external CA by generating certificate
signing requests (without actually renewing certificates in place); see next paragraph for more
information.
{{< note >}}
Clusters built with kubeadm often copy the `admin.conf` certificate into `$HOME/.kube/config`, as instructed in [Creating a cluster with kubeadm](https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/). On such a system, to update the contents of `$HOME/.kube/config` after renewing the `admin.conf` you must run the following commands:

- It's also possible to renew a single certificate instead of all.
```shell
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
```
{{< /note >}}

## Renew certificates with the Kubernetes certificates API

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ You can override the default headers by defining `httpHeaders` for the probe.
For example
-->
针对 HTTP 探针,kubelet 除了必需的 `Host` 头部之外还发送两个请求头部字段:
- `User-Agent`:默认值是 `kube-probe/{{ skew currentVersion >}}`,其中 `{{< skew currentVersion >}}` 是 kubelet 的版本号。
- `User-Agent`:默认值是 `kube-probe/{{< skew currentVersion >}}`,其中 `{{< skew currentVersion >}}` 是 kubelet 的版本号。
- `Accept`:默认值 `*/*`

你可以通过为探测设置 `httpHeaders` 来重载默认的头部字段值。例如:
Expand Down

0 comments on commit 1fb2c45

Please sign in to comment.