You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- It should for example _not_ favor any network provider, instead configuring a network is out-of-scope
40
-
-Should provide the possibility to use a config file for customizing various parameters
38
+
- It should _not_ favor any particular network provider. Configuring the cluster network is out-of-scope
39
+
-It should provide the possibility to use a config file for customizing various parameters
41
40
42
41
## Constants and well-known values and paths
43
42
44
-
In order to reduce complexity and to simplify development of an on-top-of-kubeadm-implemented deployment solution, kubeadm uses a
45
-
limited set of constants values for well know-known paths and file names.
43
+
In order to reduce complexity and to simplify development of higher level tools that build on top of kubeadm, it uses a
44
+
limited set of constant values for well-known paths and file names.
46
45
47
46
The Kubernetes directory `/etc/kubernetes` is a constant in the application, since it is clearly the given path
48
47
in a majority of cases, and the most intuitive location; other constants paths and file names are:
@@ -70,14 +69,14 @@ in a majority of cases, and the most intuitive location; other constants paths a
70
69
The `kubeadm init`[internal workflow](/docs/reference/setup-tools/kubeadm/kubeadm-init/#init-workflow) consists of a sequence of atomic work tasks to perform,
71
70
as described in `kubeadm init`.
72
71
73
-
The [`kubeadm init phase`](/docs/reference/setup-tools/kubeadm/kubeadm-init-phase/) command allows users to invoke individually each task, and ultimately offers a reusable and composable
74
-
API/toolbox that can be used by other Kubernetes bootstrap tools, by any IT automation tool or by advanced user
72
+
The [`kubeadm init phase`](/docs/reference/setup-tools/kubeadm/kubeadm-init-phase/) command allows users to invoke each task individually, and ultimately offers a reusable and composable
73
+
API/toolbox that can be used by other Kubernetes bootstrap tools, by any IT automation tool or by an advanced user
75
74
for creating custom clusters.
76
75
77
76
### Preflight checks
78
77
79
78
Kubeadm executes a set of preflight checks before starting the init, with the aim to verify preconditions and avoid common cluster startup problems.
80
-
In any case the user can skip specific preflight checks (or eventually all preflight checks) with the `--ignore-preflight-errors` option.
79
+
The user can skip specific preflight checks or all of them with the `--ignore-preflight-errors` option.
81
80
82
81
-[warning] If the Kubernetes version to use (specified with the `--kubernetes-version` flag) is at least one minor version higher than the kubeadm CLI version.
83
82
- Kubernetes system requirements:
@@ -161,9 +160,9 @@ Certificates are stored by default in `/etc/kubernetes/pki`, but this directory
161
160
162
161
### Generate kubeconfig files for control plane components
163
162
164
-
Kubeadm kubeconfig files with identities for control plane components:
163
+
Kubeadm generates kubeconfig files with identities for control plane components:
165
164
166
-
- A kubeconfig file for kubelet to use, `/etc/kubernetes/kubelet.conf`; inside this file is embedded a client certificate with kubelet identity.
165
+
- A kubeconfig file for the kubelet to use during TLS bootstrap - /etc/kubernetes/bootstrap-kubelet.conf. Inside this file there is a bootstrap-token or embedded client certificates for authenticating this node with the cluster.
167
166
This client cert should:
168
167
- Be in the `system:nodes` organization, as required by the [Node Authorization](/docs/reference/access-authn-authz/node/) module
169
168
- Have the Common Name (CN) `system:node:<hostname-lowercased>`
@@ -173,11 +172,11 @@ by default [RBAC core components roles](/docs/reference/access-authn-authz/rbac/
173
172
- A kubeconfig file for scheduler, `/etc/kubernetes/scheduler.conf`; inside this file is embedded a client certificate with scheduler identity.
174
173
This client cert should have the CN `system:kube-scheduler`, as defined by default [RBAC core components roles](/docs/reference/access-authn-authz/rbac/#core-component-roles)
175
174
176
-
Additionally, a kubeconfig file for kubeadm to use itself and the admin is generated and save into the `/etc/kubernetes/admin.conf` file.
177
-
The "admin" here is defined the actual person(s) that is administering the cluster and want to have full control (**root**) over the cluster.
178
-
The embedded client certificate for admin should:
179
-
- Be in the `system:masters` organization, as defined by default [RBAC user facing role bindings](/docs/reference/access-authn-authz/rbac/#user-facing-roles)
180
-
- Include a CN, but that can be anything. Kubeadm uses the `kubernetes-admin` CN
175
+
Additionally, a kubeconfig file for kubeadm itself and the admin is generated and saved into the `/etc/kubernetes/admin.conf` file.
176
+
The "admin" here is defined as the actual person(s) that is administering the cluster and wants to have full control (**root**) over the cluster.
177
+
The embedded client certificate for admin should be in the `system:masters` organization, as defined by default
178
+
[RBAC user facing role bindings](/docs/reference/access-authn-authz/rbac/#user-facing-roles). It should also include a
179
+
CN. Kubeadm uses the `kubernetes-admin` CN.
181
180
182
181
Please note that:
183
182
@@ -189,28 +188,24 @@ Please note that:
189
188
190
189
### Generate static Pod manifests for control plane components
191
190
192
-
Kubeadm writes static Pod manifest files for control plane components to `/etc/kubernetes/manifests`; the kubelet watches this directory for Pods to create on startup.
191
+
Kubeadm writes static Pod manifest files for control plane components to `/etc/kubernetes/manifests`. The kubelet watches this directory for Pods to create on startup.
193
192
194
193
Static Pod manifest share a set of common properties:
195
194
196
195
- All static Pods are deployed on `kube-system` namespace
197
-
- All static Pods gets `tier:control-plane` and `component:{component-name}` labels
198
-
- All static Pods gets `scheduler.alpha.kubernetes.io/critical-pod` annotation (this will be moved over to the proper solution
199
-
of using Pod Priority and Preemption when ready)
196
+
- All static Pods get `tier:control-plane` and `component:{component-name}` labels
197
+
- All static Pods use the `system-node-critical` priority class
200
198
-`hostNetwork: true` is set on all static Pods to allow control plane startup before a network is configured; as a consequence:
201
199
* The `address` that the controller-manager and the scheduler use to refer the API server is `127.0.0.1`
202
200
* If using a local etcd server, `etcd-servers` address will be set to `127.0.0.1:2379`
203
201
- Leader election is enabled for both the controller-manager and the scheduler
204
202
- Controller-manager and the scheduler will reference kubeconfig files with their respective, unique identities
205
-
- All static Pods gets any extra flags specified by the user as described in [passing custom arguments to control plane components](/docs/setup/production-environment/tools/kubeadm/control-plane-flags/)
206
-
- All static Pods gets any extra Volumes specified by the user (Host path)
203
+
- All static Pods get any extra flags specified by the user as described in [passing custom arguments to control plane components](/docs/setup/production-environment/tools/kubeadm/control-plane-flags/)
204
+
- All static Pods get any extra Volumes specified by the user (Host path)
207
205
208
206
Please note that:
209
207
210
-
1. All the images, for the `--kubernetes-version`/current architecture, will be pulled from `k8s.gcr.io`;
211
-
In case an alternative image repository or CI image repository is specified this one will be used; In case a specific container image
212
-
should be used for all control plane components, this one will be used. see [using custom images](/docs/reference/setup-tools/kubeadm/kubeadm-init/#custom-images)
213
-
for more details
208
+
1. All images will be pulled from k8s.gcr.io by default. See [using custom images](/docs/reference/setup-tools/kubeadm/kubeadm-init/#custom-images) for customizing the image repository
214
209
2. In case of kubeadm is executed in the `--dry-run` mode, static Pods files are written in a temporary folder
215
210
3. Static Pod manifest generation for master components can be invoked individually with the [`kubeadm init phase control-plane all`](/docs/reference/setup-tools/kubeadm/kubeadm-init-phase/#cmd-phase-control-plane) command
216
211
@@ -300,8 +295,7 @@ a local etcd instance running in a Pod with following attributes:
300
295
301
296
Please note that:
302
297
303
-
1. The etcd image will be pulled from `k8s.gcr.io`. In case an alternative image repository is specified this one will be used;
304
-
In case an alternative image name is specified, this one will be used. see [using custom images](/docs/reference/setup-tools/kubeadm/kubeadm-init/#custom-images) for more details
298
+
1. The etcd image will be pulled from `k8s.gcr.io` by default. See [using custom images](/docs/reference/setup-tools/kubeadm/kubeadm-init/#custom-images) for customizing the image repository
305
299
2. in case of kubeadm is executed in the `--dry-run` mode, the etcd static Pod manifest is written in a temporary folder
306
300
3. Static Pod manifest generation for local etcd can be invoked individually with the [`kubeadm init phase etcd local`](/docs/reference/setup-tools/kubeadm/kubeadm-init-phase/#cmd-phase-etcd) command
307
301
@@ -324,10 +318,9 @@ Please note that:
324
318
325
319
### Wait for the control plane to come up
326
320
327
-
This is a critical moment in time for kubeadm clusters.
328
-
kubeadm waits until `localhost:6443/healthz` returns `ok`, however in order to detect deadlock conditions, kubeadm fails fast
329
-
if `localhost:10255/healthz` (kubelet liveness) or `localhost:10255/healthz/syncloop` (kubelet readiness) don't return `ok`,
330
-
respectively after 40 and 60 second.
321
+
kubeadm waits (upto 4m0s) until `localhost:6443/healthz` (kube-apiserver liveness) returns `ok`. However in order to detect
322
+
deadlock conditions, kubeadm fails fast if `localhost:10255/healthz` (kubelet liveness) or
323
+
`localhost:10255/healthz/syncloop` (kubelet readiness) don't return `ok` within 40s and 60s respectively.
331
324
332
325
kubeadm relies on the kubelet to pull the control plane images and run them properly as static Pods.
333
326
After the control plane is up, kubeadm completes the tasks described in following paragraphs.
@@ -343,19 +336,15 @@ If kubeadm is invoked with `--feature-gates=DynamicKubeletConfig`:
343
336
344
337
### Save the kubeadm ClusterConfiguration in a ConfigMap for later reference
345
338
346
-
kubeadm saves the configuration passed to `kubeadm init`, either via flags or the config file, in a ConfigMap
347
-
named `kubeadm-config` under `kube-system` namespace.
339
+
kubeadm saves the configuration passed to `kubeadm init` in a ConfigMap named `kubeadm-config` under `kube-system` namespace.
348
340
349
341
This will ensure that kubeadm actions executed in future (e.g `kubeadm upgrade`) will be able to determine the actual/current cluster
350
342
state and make new decisions based on that data.
351
343
352
344
Please note that:
353
345
354
-
1. Before uploading, sensitive information like e.g. the token is stripped from the configuration
346
+
1. Before saving the ClusterConfiguration, sensitive information like the token is stripped from the configuration
355
347
2. Upload of master configuration can be invoked individually with the [`kubeadm init phase upload-config`](/docs/reference/setup-tools/kubeadm/kubeadm-init-phase/#cmd-phase-upload-config) command
356
-
3. If you initialized your cluster using kubeadm v1.7.x or lower, you must create manually the master configuration ConfigMap
357
-
before `kubeadm upgrade` to v1.8 . In order to facilitate this task, the [`kubeadm config upload (from-flags|from-file)`](/docs/reference/setup-tools/kubeadm/kubeadm-config/)
358
-
was implemented
359
348
360
349
### Mark master
361
350
@@ -421,8 +410,8 @@ and the default role `system:certificates.k8s.io:certificatesigningrequests:self
421
410
422
411
This phase creates the `cluster-info` ConfigMap in the `kube-public` namespace.
423
412
424
-
Additionally it is created a role and a RoleBinding granting access to the ConfigMap for unauthenticated users
425
-
(i.e. users in RBAC group `system:unauthenticated`)
413
+
Additionally it creates a Role and a RoleBinding granting access to the ConfigMap for unauthenticated users
414
+
(i.e. users in RBAC group `system:unauthenticated`).
0 commit comments