edb233cac2
* [ja] add basic files for 1.13 (#11571) * [ja] add basic files for 1.13 * [ja] add some base files * Translate setup/independent/_index.md (#11573) * Translate content/ja/docs/home/_index.md in Japanese (#11569) * Translate content/ja/docs/setup/custom-cloud/_index.md in Japanese (#11572) * Translate content/en/docs/setup/on-premises-vm/_index.md in Japanese (#11574) * Translate content/ja/docs/setup/release/_index.md in Japanese (#11576) * ja-trans: Translate content/ja/docs/tutorials/kubernetes-basics/explore/_index.md (#11580) * Translate content/ja/docs/setup/turnkey/_index.md (#11582) * Translate content/ja/docs/tutorials/kubernetes-basics/update/_index.m… (#11579) * Translate content/ja/docs/tutorials/kubernetes-basics/update/_index.md in Japanese * Fix title * Translated Tutorials/Learn Kubenetes Basics/Deploy an App in Japanese. (#11583) * translate tutorials/kubernetes-basics/expose/_index.md (#11584) * Dev 1.13 ja.1 tutorials kubernetes basics scale (#11577) * Translate content/ja/docs/tutorials/kubernetes-basics/scale/_index.md in Japanese * Fix title * translate deprecated state description (#11578) * Fix the build doesn't pass at dev-1.13-ja.1 (#11609) * delete files not at minimum requirements to pass the build. * copy necessary file for pass build from content/en * translate content/ja/_index.html (#11585) * ja-trans: add docs/_index.md (#11721) * Remove copied docs/index.md by mistake. (#11735) * Translate stable state description (#11642) * translate stable state description * Update content/ja/docs/templates/feature-state-stable.txt Co-Authored-By: auifzysr <38824461+auifzysr@users.noreply.github.com> * apply the suggestion directly * Translate alpha state description (#11753) * [ja] add ja section (#11581) * [ja] translate case-studies (#12060) * [ja] translate case-studies * remove comment * fix /ja/docs/ content (#12062) * Translate content/ja/docs/tutorials/kubernetes-basics/create-cluster/_index.md in Japanese (#12059) * [ja] translate supported doc versions (#12068) * [ja] add ja.toml (#11595) * Remove reviewers block from front matter. (#12092) * Translate beta state description (#12023) * [ja] translate setup (#12070) * translate setup * add translation * Update _index.md * Update _index.md * 表記ゆれ * 表記ゆれ * [ja] translate what-is-kubernetes (#12065) * translate what-is-kubernetes * add more translation * finish basic translation * Update content/ja/docs/concepts/overview/what-is-kubernetes.md Co-Authored-By: d-kuro <34958495+d-kuro@users.noreply.github.com> * Update what-is-kubernetes.md * Update content/ja/docs/concepts/overview/what-is-kubernetes.md Co-Authored-By: inductor <kohei.ota@zozo.com> * Update content/ja/docs/concepts/overview/what-is-kubernetes.md Co-Authored-By: inductor <kohei.ota@zozo.com> * Update content/ja/docs/concepts/overview/what-is-kubernetes.md Co-Authored-By: inductor <kohei.ota@zozo.com> * fix new lines * fix review * Update content/ja/docs/concepts/overview/what-is-kubernetes.md Co-Authored-By: inductor <kohei.ota@zozo.com> * Update what-is-kubernetes.md * Update what-is-kubernetes.md * rephrase プラクティス to 知見 * Update content/ja/docs/concepts/overview/what-is-kubernetes.md Co-Authored-By: inductor <kohei.ota@zozo.com> * Update content/ja/docs/concepts/overview/what-is-kubernetes.md Co-Authored-By: inductor <kohei.ota@zozo.com> * italic * オーケストレーション * [ja] tutorials/index (#12071) * translate tutorial index * fix page link * add ja to path for kubernetes-basic because it's already in progress of translation * Update _index.md * review * remove typo * Update content/ja/docs/tutorials/_index.md Co-Authored-By: inductor <kohei.ota@zozo.com> * Update content/ja/docs/tutorials/_index.md Co-Authored-By: inductor <kohei.ota@zozo.com> * [ja] translate cri installation (#12095) * [ja] translate cri installation * Update content/ja/docs/setup/cri.md Co-Authored-By: auifzysr <38824461+auifzysr@users.noreply.github.com> * apply comments * apply comments * [ja]translate tutorials/kubernetes-basics (#12074) * start translation * translate index * wording * wording * cluster-interactive * cluster-intro * update interactive * update some data * fix link * deploy-intro * japanize * fix path for public data * wording * start translation of expose * expose intro * けーしょん * scale-intro * update-intro * fix wrong word * fix wording * translate missing string * Update content/ja/docs/tutorials/kubernetes-basics/_index.html Co-Authored-By: inductor <kohei.ota@zozo.com> * Update content/ja/docs/tutorials/kubernetes-basics/_index.html Co-Authored-By: inductor <kohei.ota@zozo.com> * Update content/ja/docs/tutorials/kubernetes-basics/scale/scale-intro.html Co-Authored-By: inductor <kohei.ota@zozo.com> * Update content/ja/docs/tutorials/kubernetes-basics/expose/expose-intro.html Co-Authored-By: inductor <kohei.ota@zozo.com> * Update content/ja/docs/tutorials/kubernetes-basics/expose/expose-interactive.html Co-Authored-By: inductor <kohei.ota@zozo.com> * Update content/ja/docs/tutorials/kubernetes-basics/_index.html Co-Authored-By: inductor <kohei.ota@zozo.com> * fix wording * Update content/ja/docs/tutorials/kubernetes-basics/create-cluster/cluster-intro.html Co-Authored-By: inductor <kohei.ota@zozo.com> * Update content/ja/docs/tutorials/kubernetes-basics/create-cluster/cluster-intro.html Co-Authored-By: inductor <kohei.ota@zozo.com> * Update content/ja/docs/tutorials/kubernetes-basics/create-cluster/cluster-intro.html Co-Authored-By: inductor <kohei.ota@zozo.com> * Update content/ja/docs/tutorials/kubernetes-basics/scale/scale-interactive.html Co-Authored-By: inductor <kohei.ota@zozo.com> * Update content/ja/docs/tutorials/kubernetes-basics/expose/expose-interactive.html Co-Authored-By: inductor <kohei.ota@zozo.com> * Update content/ja/docs/tutorials/kubernetes-basics/explore/explore-interactive.html Co-Authored-By: inductor <kohei.ota@zozo.com> * Update content/ja/docs/tutorials/kubernetes-basics/deploy-app/deploy-interactive.html Co-Authored-By: inductor <kohei.ota@zozo.com> * Update content/ja/docs/tutorials/kubernetes-basics/create-cluster/cluster-interactive.html Co-Authored-By: inductor <kohei.ota@zozo.com> * Update content/ja/docs/tutorials/kubernetes-basics/deploy-app/deploy-intro.html Co-Authored-By: inductor <kohei.ota@zozo.com> * Update content/ja/docs/tutorials/kubernetes-basics/deploy-app/deploy-intro.html Co-Authored-By: inductor <kohei.ota@zozo.com> * Update content/ja/docs/tutorials/kubernetes-basics/explore/explore-intro.html Co-Authored-By: inductor <kohei.ota@zozo.com> * Update content/ja/docs/tutorials/kubernetes-basics/scale/scale-intro.html Co-Authored-By: inductor <kohei.ota@zozo.com> * lowercase for kubectl * ja-trans: tutorials/hello-minikube.md (#11648) * trns-ja: tutorials/hello-minikube.md * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * Update hello-minikube.md 大変、大変遅くなりました。丁寧に見ていただいて感謝です。いただいたコメントを反映しました。 * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * Update hello-minikube.md <修正点> ・10行目の「本チュートリアルでは」を削除 ・クラスターをクラスタに統一 * Update hello-minikube.md 10行目の実践を手を動かすに修正 * Update hello-minikube.md 10行目を「手を動かす準備はできていますか?本チュートリアルでは、Node.jsを使った簡単な"Hello World"を実行するKubernetesクラスタをビルドします。」に差し替え。 * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * ja-trans: setup/custom-cloud/coreos/ (#12731) * ja-trans: setup/release/building-from-source/ (#12721) * translate building-from-source * improve translation * ja-trans: translate setup/certificates/ (#12722) * translate certificates.md * change translation about Paths * ja-trans: setup/custom-cloud/kubespray/ (#12733) * ja-trans: setup/node-conformance/ (#12728) * ja-trans: setup/node-conformance/ * Update content/ja/docs/setup/node-conformance.md LGTM Co-Authored-By: makocchi-git <makocchi@gmail.com> * Update content/ja/docs/setup/node-conformance.md LGTM Co-Authored-By: makocchi-git <makocchi@gmail.com> * Update content/ja/docs/setup/node-conformance.md LGTM Co-Authored-By: makocchi-git <makocchi@gmail.com> * ja-trans: setup/cluster-large/ (#12723) * ja-trans: setup/cluster-large/ * translate quota and addon * ja-trans: setup/pick-right-solution/ (#12729) * ja-trans: setup/pick-right-solution/ * revise translating solutions * ending with a noun * ja-trans: setup/custom-cloud/kops/ (#12732) * ja-trans: setup/custom-cloud/kops/ * improve translation * translate build * translate explore and add-ons * ja-trans: setup/independent/control-plane-flags/ (#12745) * ja-trans: setup/minikube/ (#12724) * ja-trans: setup/minikube/ * Update content/ja/docs/setup/minikube.md LGTM Co-Authored-By: makocchi-git <makocchi@gmail.com> * translate features and add-ons * improve translation * improve translation * fix translation style * ja-trans: setup/multiple-zones/ (#12725) * ja-trans: setup/multiple-zones/ * ja-trans: setup/multiple-zones/ (2) * ending with a noun * fix translation style * ja-trans: setup/scratch/ (#12730) * ja-trans: setup/scratch/ * revise translating connectivity * improve translation * Update content/ja/docs/setup/scratch.md LGTM Co-Authored-By: makocchi-git <makocchi@gmail.com> * Update content/ja/docs/setup/scratch.md LGTM Co-Authored-By: makocchi-git <makocchi@gmail.com> * Update content/ja/docs/setup/scratch.md LGTM Co-Authored-By: makocchi-git <makocchi@gmail.com> * Update content/ja/docs/setup/scratch.md LGTM Co-Authored-By: makocchi-git <makocchi@gmail.com> * revise translation * revert some words to English * fix translation style * fix title * ja-trans: setup/independent/create-cluster-kubeadm/ (#12750) * ja-trans: setup/independent/create-cluster-kubeadm/ * translate Instructions * fix translation style * ja-trans: setup/independent/kubelet-integration/ (#12754) * ja-trans: setup/independent/kubelet-integration/ * fix translation style * ja-trans: setup/independent/setup-ha-etcd-with-kubeadm/ (#12755) * ja-trans: setup/independent/setup-ha-etcd-with-kubeadm/ * fix translation style * ja-trans: setup/independent/troubleshooting-kubeadm/ (#12757) * ja-trans: setup/independent/troubleshooting-kubeadm/ * pod -> Pod * ja-trans: setup/on-premises-vm/cloudstack/ (#12772) * ja-trans: setup/independent/high-availability/ (#12753) * ja-trans: setup/independent/high-availability/ * fix translation style * translate Stacked and worker node * ja-trans: setup/on-premises-metal/krib/ (#12770) * ja-trans: setup/on-premises-metal/krib/ * Update content/ja/docs/setup/on-premises-metal/krib.md Co-Authored-By: makocchi-git <makocchi@gmail.com> * ja-trans: setup/on-premises-vm/ovirt/ (#12781) * ja-trans: setup/on-premises-vm/dcos/ (#12780) * ja-trans: setup/on-premises-vm/dcos/ * fix translation * Update content/ja/docs/setup/on-premises-vm/dcos.md Co-Authored-By: makocchi-git <makocchi@gmail.com> * ja-trans: setup/turnkey/alibaba-cloud/ (#12786) * ja-trans: setup/turnkey/alibaba-cloud/ * tiny fix * Update content/ja/docs/setup/turnkey/alibaba-cloud.md Co-Authored-By: makocchi-git <makocchi@gmail.com> * fix translation * ja-trans: setup/turnkey/aws/ (#12788) * ja-trans: setup/turnkey/aws/ * translate production grade * fix translation * ja-trans: setup/release/notes/ (#12791) * ja-trans: setup/independent/install-kubeadm.md (#12812) * ja-trans: setup/independent/install-kubeadm.md * ja-trans: fix internal links in setup/independent/install-kubeadm.md * ja-trans: setup/turnkey/clc/ (#12824) * ja-trans: setup/turnkey/clc/ * Update content/ja/docs/setup/turnkey/clc.md Co-Authored-By: makocchi-git <makocchi@gmail.com> * Update content/ja/docs/setup/turnkey/clc.md Co-Authored-By: makocchi-git <makocchi@gmail.com> * ja-trans: setup/turnkey/stackpoint/ (#12853) * ja-trans: concepts/ (#12820) * ja-trans: concepts/ * fix translation * ja: fix formatting in what is kubernetes (#12694) * fix formatting in what is kubernetes * Update content/ja/docs/concepts/overview/what-is-kubernetes.md Co-Authored-By: inductor <kohei.ota@zozo.com> * ? * format (#12866) * ja-trans: setup/turnkey/gce.md (#12813) * ja-trans: setup/turnkey/gce.md * Update content/ja/docs/setup/turnkey/gce.md Co-Authored-By: auifzysr <38824461+auifzysr@users.noreply.github.com> * Update content/ja/docs/setup/turnkey/gce.md Co-Authored-By: auifzysr <38824461+auifzysr@users.noreply.github.com> * ja-trans: modify a word in setup/turnkey/gce.md * Translated docs/setup/turnkey/azure.md. (#12951) * Translated docs/setup/turnkey/azure.md. * Update content/ja/docs/setup/turnkey/azure.md Applied a suggestion. Co-Authored-By: dzeyelid <dzeyelid@gmail.com> * Update content/ja/docs/setup/turnkey/azure.md Applied a suggestion. Co-Authored-By: dzeyelid <dzeyelid@gmail.com> * Update content/ja/docs/setup/turnkey/azure.md Applied suggestion. Co-Authored-By: dzeyelid <dzeyelid@gmail.com> * Applied review suggestions. * Applied review suggestions. * fix language setting order.
201 lines
10 KiB
Markdown
201 lines
10 KiB
Markdown
---
|
|
title: kubeadmを使用したクラスター内の各kubeletの設定
|
|
content_template: templates/concept
|
|
weight: 80
|
|
---
|
|
|
|
{{% capture overview %}}
|
|
|
|
{{< feature-state for_k8s_version="1.11" state="stable" >}}
|
|
|
|
The lifecycle of the kubeadm CLI tool is decoupled from the
|
|
[kubelet](/docs/reference/command-line-tools-reference/kubelet), which is a daemon that runs
|
|
on each node within the Kubernetes cluster. The kubeadm CLI tool is executed by the user when Kubernetes is
|
|
initialized or upgraded, whereas the kubelet is always running in the background.
|
|
|
|
Since the kubelet is a daemon, it needs to be maintained by some kind of a init
|
|
system or service manager. When the kubelet is installed using DEBs or RPMs,
|
|
systemd is configured to manage the kubelet. You can use a different service
|
|
manager instead, but you need to configure it manually.
|
|
|
|
Some kubelet configuration details need to be the same across all kubelets involved in the cluster, while
|
|
other configuration aspects need to be set on a per-kubelet basis, to accommodate the different
|
|
characteristics of a given machine, such as OS, storage, and networking. You can manage the configuration
|
|
of your kubelets manually, but [kubeadm now provides a `KubeletConfiguration` API type for managing your
|
|
kubelet configurations centrally](#configure-kubelets-using-kubeadm).
|
|
|
|
{{% /capture %}}
|
|
|
|
{{% capture body %}}
|
|
|
|
## Kubeletの設定パターン
|
|
|
|
The following sections describe patterns to kubelet configuration that are simplified by
|
|
using kubeadm, rather than managing the kubelet configuration for each Node manually.
|
|
|
|
### 各kubeletにクラスターレベルの設定を配布
|
|
|
|
You can provide the kubelet with default values to be used by `kubeadm init` and `kubeadm join`
|
|
commands. Interesting examples include using a different CRI runtime or setting the default subnet
|
|
used by services.
|
|
|
|
If you want your services to use the subnet `10.96.0.0/12` as the default for services, you can pass
|
|
the `--service-cidr` parameter to kubeadm:
|
|
|
|
```bash
|
|
kubeadm init --service-cidr 10.96.0.0/12
|
|
```
|
|
|
|
Virtual IPs for services are now allocated from this subnet. You also need to set the DNS address used
|
|
by the kubelet, using the `--cluster-dns` flag. This setting needs to be the same for every kubelet
|
|
on every manager and Node in the cluster. The kubelet provides a versioned, structured API object
|
|
that can configure most parameters in the kubelet and push out this configuration to each running
|
|
kubelet in the cluster. This object is called **the kubelet's ComponentConfig**.
|
|
The ComponentConfig allows the user to specify flags such as the cluster DNS IP addresses expressed as
|
|
a list of values to a camelCased key, illustrated by the following example:
|
|
|
|
```yaml
|
|
apiVersion: kubelet.config.k8s.io/v1beta1
|
|
kind: KubeletConfiguration
|
|
clusterDNS:
|
|
- 10.96.0.10
|
|
```
|
|
|
|
For more details on the ComponentConfig have a look at [this section](#configure-kubelets-using-kubeadm).
|
|
|
|
### インスタンス固有の設定内容を適用
|
|
|
|
Some hosts require specific kubelet configurations, due to differences in hardware, operating system,
|
|
networking, or other host-specific parameters. The following list provides a few examples.
|
|
|
|
- The path to the DNS resolution file, as specified by the `--resolv-conf` kubelet
|
|
configuration flag, may differ among operating systems, or depending on whether you are using
|
|
`systemd-resolved`. If this path is wrong, DNS resolution will fail on the Node whose kubelet
|
|
is configured incorrectly.
|
|
|
|
- The Node API object `.metadata.name` is set to the machine's hostname by default,
|
|
unless you are using a cloud provider. You can use the `--hostname-override` flag to override the
|
|
default behavior if you need to specify a Node name different from the machine's hostname.
|
|
|
|
- Currently, the kubelet cannot automatically detects the cgroup driver used by the CRI runtime,
|
|
but the value of `--cgroup-driver` must match the cgroup driver used by the CRI runtime to ensure
|
|
the health of the kubelet.
|
|
|
|
- Depending on the CRI runtime your cluster uses, you may need to specify different flags to the kubelet.
|
|
For instance, when using Docker, you need to specify flags such as `--network-plugin=cni`, but if you
|
|
are using an external runtime, you need to specify `--container-runtime=remote` and specify the CRI
|
|
endpoint using the `--container-runtime-path-endpoint=<path>`.
|
|
|
|
You can specify these flags by configuring an individual kubelet's configuration in your service manager,
|
|
such as systemd.
|
|
|
|
## kubeadmを使用したkubeletの設定
|
|
|
|
It is possible to configure the kubelet that kubeadm will start if a custom `KubeletConfiguration`
|
|
API object is passed with a configuration file like so `kubeadm ... --config some-config-file.yaml`.
|
|
|
|
By calling `kubeadm config print-default --api-objects KubeletConfiguration` you can
|
|
see all the default values for this structure.
|
|
|
|
Also have a look at the [API reference for the
|
|
kubelet ComponentConfig](https://godoc.org/k8s.io/kubernetes/pkg/kubelet/apis/config#KubeletConfiguration)
|
|
for more information on the individual fields.
|
|
|
|
### `kubeadm init`実行時の流れ
|
|
|
|
When you call `kubeadm init`, the kubelet configuration is marshalled to disk
|
|
at `/var/lib/kubelet/config.yaml`, and also uploaded to a ConfigMap in the cluster. The ConfigMap
|
|
is named `kubelet-config-1.X`, where `.X` is the minor version of the Kubernetes version you are
|
|
initializing. A kubelet configuration file is also written to `/etc/kubernetes/kubelet.conf` with the
|
|
baseline cluster-wide configuration for all kubelets in the cluster. This configuration file
|
|
points to the client certificates that allow the kubelet to communicate with the API server. This
|
|
addresses the need to
|
|
[propagate cluster-level configuration to each kubelet](#propagating-cluster-level-configuration-to-each-kubelet).
|
|
|
|
To address the second pattern of
|
|
[providing instance-specific configuration details](#providing-instance-specific-configuration-details),
|
|
kubeadm writes an environment file to `/var/lib/kubelet/kubeadm-flags.env`, which contains a list of
|
|
flags to pass to the kubelet when it starts. The flags are presented in the file like this:
|
|
|
|
```bash
|
|
KUBELET_KUBEADM_ARGS="--flag1=value1 --flag2=value2 ..."
|
|
```
|
|
|
|
In addition to the flags used when starting the kubelet, the file also contains dynamic
|
|
parameters such as the cgroup driver and whether to use a different CRI runtime socket
|
|
(`--cri-socket`).
|
|
|
|
After marshalling these two files to disk, kubeadm attempts to run the following two
|
|
commands, if you are using systemd:
|
|
|
|
```bash
|
|
systemctl daemon-reload && systemctl restart kubelet
|
|
```
|
|
|
|
If the reload and restart are successful, the normal `kubeadm init` workflow continues.
|
|
|
|
### `kubeadm join`実行時の流れ
|
|
|
|
When you run `kubeadm join`, kubeadm uses the Bootstrap Token credential perform
|
|
a TLS bootstrap, which fetches the credential needed to download the
|
|
`kubelet-config-1.X` ConfigMap and writes it to `/var/lib/kubelet/config.yaml`. The dynamic
|
|
environment file is generated in exactly the same way as `kubeadm init`.
|
|
|
|
Next, `kubeadm` runs the following two commands to load the new configuration into the kubelet:
|
|
|
|
```bash
|
|
systemctl daemon-reload && systemctl restart kubelet
|
|
```
|
|
|
|
After the kubelet loads the new configuration, kubeadm writes the
|
|
`/etc/kubernetes/bootstrap-kubelet.conf` KubeConfig file, which contains a CA certificate and Bootstrap
|
|
Token. These are used by the kubelet to perform the TLS Bootstrap and obtain a unique
|
|
credential, which is stored in `/etc/kubernetes/kubelet.conf`. When this file is written, the kubelet
|
|
has finished performing the TLS Bootstrap.
|
|
|
|
## kubelet用のsystemdファイル
|
|
|
|
The configuration file installed by the kubeadm DEB or RPM package is written to
|
|
`/etc/systemd/system/kubelet.service.d/10-kubeadm.conf` and is used by systemd.
|
|
|
|
```none
|
|
[Service]
|
|
Environment="KUBELET_KUBECONFIG_ARGS=--bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf
|
|
--kubeconfig=/etc/kubernetes/kubelet.conf"
|
|
Environment="KUBELET_CONFIG_ARGS=--config=/var/lib/kubelet/config.yaml"
|
|
# This is a file that "kubeadm init" and "kubeadm join" generates at runtime, populating
|
|
the KUBELET_KUBEADM_ARGS variable dynamically
|
|
EnvironmentFile=-/var/lib/kubelet/kubeadm-flags.env
|
|
# This is a file that the user can use for overrides of the kubelet args as a last resort. Preferably,
|
|
#the user should use the .NodeRegistration.KubeletExtraArgs object in the configuration files instead.
|
|
# KUBELET_EXTRA_ARGS should be sourced from this file.
|
|
EnvironmentFile=-/etc/default/kubelet
|
|
ExecStart=
|
|
ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_CONFIG_ARGS $KUBELET_KUBEADM_ARGS $KUBELET_EXTRA_ARGS
|
|
```
|
|
|
|
This file specifies the default locations for all of the files managed by kubeadm for the kubelet.
|
|
|
|
- The KubeConfig file to use for the TLS Bootstrap is `/etc/kubernetes/bootstrap-kubelet.conf`,
|
|
but it is only used if `/etc/kubernetes/kubelet.conf` does not exist.
|
|
- The KubeConfig file with the unique kubelet identity is `/etc/kubernetes/kubelet.conf`.
|
|
- The file containing the kubelet's ComponentConfig is `/var/lib/kubelet/config.yaml`.
|
|
- The dynamic environment file that contains `KUBELET_KUBEADM_ARGS` is sourced from `/var/lib/kubelet/kubeadm-flags.env`.
|
|
- The file that can contain user-specified flag overrides with `KUBELET_EXTRA_ARGS` is sourced from
|
|
`/etc/default/kubelet` (for DEBs), or `/etc/systconfig/kubelet` (for RPMs). `KUBELET_EXTRA_ARGS`
|
|
is last in the flag chain and has the highest priority in the event of conflicting settings.
|
|
|
|
## Kubernetesバイナリとパッケージの内容
|
|
|
|
The DEB and RPM packages shipped with the Kubernetes releases are:
|
|
|
|
| Package name | Description |
|
|
|--------------|-------------|
|
|
| `kubeadm` | Installs the `/usr/bin/kubeadm` CLI tool and [The kubelet drop-in file(#the-kubelet-drop-in-file-for-systemd) for the kubelet. |
|
|
| `kubelet` | Installs the `/usr/bin/kubelet` binary. |
|
|
| `kubectl` | Installs the `/usr/bin/kubectl` binary. |
|
|
| `kubernetes-cni` | Installs the official CNI binaries into the `/opt/cni/bin` directory. |
|
|
| `cri-tools` | Installs the `/usr/bin/crictl` binary from [https://github.com/kubernetes-incubator/cri-tools](https://github.com/kubernetes-incubator/cri-tools). |
|
|
|
|
{{% /capture %}}
|