@@ -66,7 +66,7 @@ in a majority of cases, and the most intuitive location; other constants paths a
66
66
- ` admin.conf ` for the cluster admin and kubeadm itself
67
67
- ` super-admin.conf ` for the cluster super-admin that can bypass RBAC
68
68
69
- - Names of certificates and key files :
69
+ - Names of certificates and key files:
70
70
71
71
- ` ca.crt ` , ` ca.key ` for the Kubernetes certificate authority
72
72
- ` apiserver.crt ` , ` apiserver.key ` for the API server certificate
@@ -93,29 +93,29 @@ Kubeadm executes a set of preflight checks before starting the init, with the ai
93
93
preconditions and avoid common cluster startup problems.
94
94
The user can skip specific preflight checks or all of them with the ` --ignore-preflight-errors ` option.
95
95
96
- - [ warning ] If the Kubernetes version to use (specified with the ` --kubernetes-version ` flag) is
96
+ - [ Warning ] if the Kubernetes version to use (specified with the ` --kubernetes-version ` flag) is
97
97
at least one minor version higher than the kubeadm CLI version.
98
98
- Kubernetes system requirements:
99
99
- if running on linux:
100
- - [ error ] if Kernel is older than the minimum required version
101
- - [ error ] if required cgroups subsystem aren't set up
102
- - [ error ] if the CRI endpoint does not answer
103
- - [ error ] if user is not root
104
- - [ error ] if the machine hostname is not a valid DNS subdomain
105
- - [ warning ] if the host name cannot be reached via network lookup
106
- - [ error ] if kubelet version is lower that the minimum kubelet version supported by kubeadm (current minor -1)
107
- - [ error ] if kubelet version is at least one minor higher than the required controlplane version (unsupported version skew)
108
- - [ warning ] if kubelet service does not exist or if it is disabled
109
- - [ warning ] if firewalld is active
110
- - [ error ] if API server bindPort or ports 10250/10251/10252 are used
100
+ - [ Error ] if Kernel is older than the minimum required version
101
+ - [ Error ] if required cgroups subsystem aren't set up
102
+ - [ Error ] if the CRI endpoint does not answer
103
+ - [ Error ] if user is not root
104
+ - [ Error ] if the machine hostname is not a valid DNS subdomain
105
+ - [ Warning ] if the host name cannot be reached via network lookup
106
+ - [ Error ] if kubelet version is lower that the minimum kubelet version supported by kubeadm (current minor -1)
107
+ - [ Error ] if kubelet version is at least one minor higher than the required controlplane version (unsupported version skew)
108
+ - [ Warning ] if kubelet service does not exist or if it is disabled
109
+ - [ Warning ] if firewalld is active
110
+ - [ Error ] if API server bindPort or ports 10250/10251/10252 are used
111
111
- [ Error] if ` /etc/kubernetes/manifest ` folder already exists and it is not empty
112
112
- [ Error] if swap is on
113
113
- [ Error] if ` conntrack ` , ` ip ` , ` iptables ` , ` mount ` , ` nsenter ` commands are not present in the command path
114
- - [ warning ] if ` ebtables ` , ` ethtool ` , ` socat ` , ` tc ` , ` touch ` , ` crictl ` commands are not present in the command path
115
- - [ warning ] if extra arg flags for API server, controller manager, scheduler contains some invalid options
116
- - [ warning ] if connection to https://API.AdvertiseAddress:API.BindPort goes through proxy
117
- - [ warning ] if connection to services subnet goes through proxy (only first address checked)
118
- - [ warning ] if connection to Pods subnet goes through proxy (only first address checked)
114
+ - [ Warning ] if ` ebtables ` , ` ethtool ` , ` socat ` , ` tc ` , ` touch ` , ` crictl ` commands are not present in the command path
115
+ - [ Warning ] if extra arg flags for API server, controller manager, scheduler contains some invalid options
116
+ - [ Warning ] if connection to https://API.AdvertiseAddress:API.BindPort goes through proxy
117
+ - [ Warning ] if connection to services subnet goes through proxy (only first address checked)
118
+ - [ Warning ] if connection to Pods subnet goes through proxy (only first address checked)
119
119
- If external etcd is provided:
120
120
- [ Error] if etcd version is older than the minimum required version
121
121
- [ Error] if etcd certificates or keys are specified, but not provided
@@ -127,11 +127,11 @@ The user can skip specific preflight checks or all of them with the `--ignore-pr
127
127
- If authorization mode is WebHook
128
128
- [ Error] if webhook_authz.conf does not exist
129
129
130
- Please note that:
131
-
132
- 1 . Preflight checks can be invoked individually with the
133
- [ ` kubeadm init phase preflight ` ] ( /docs/reference/setup-tools/kubeadm/kubeadm-init-phase/#cmd-phase-preflight )
134
- command
130
+ {{< note >}}
131
+ Preflight checks can be invoked individually with the
132
+ [ ` kubeadm init phase preflight ` ] ( /docs/reference/setup-tools/kubeadm/kubeadm-init-phase/#cmd-phase-preflight )
133
+ command.
134
+ {{< /note >}}
135
135
136
136
### Generate the necessary certificates
137
137
@@ -146,7 +146,7 @@ Kubeadm generates certificate and private key pairs for different purposes:
146
146
147
147
- The Kubernetes service's internal clusterIP (the first address in the services CIDR, e.g.
148
148
` 10.96.0.1 ` if service subnet is ` 10.96.0.0/12 ` )
149
- - Kubernetes DNS names, e.g. ` kubernetes.default.svc.cluster.local ` if ` --service-dns-domain `
149
+ - Kubernetes DNS names, e.g. ` kubernetes.default.svc.cluster.local ` if ` --service-dns-domain `
150
150
flag value is ` cluster.local ` , plus default DNS names ` kubernetes.default.svc ` ,
151
151
` kubernetes.default ` , ` kubernetes `
152
152
- The node-name
@@ -176,7 +176,7 @@ Please note that:
176
176
` /etc/kubernetes/pki/ca.{crt,key} ` , and then kubeadm will use those files for signing the rest of the certs.
177
177
See also [ using custom certificates] ( /docs/tasks/administer-cluster/kubeadm/kubeadm-certs#custom-certificates )
178
178
1 . Only for the CA, it is possible to provide the ` ca.crt ` file but not the ` ca.key ` file, if all other certificates and kubeconfig files
179
- already are in place kubeadm recognize this condition and activates the ExternalCA , which also implies the ` csrsigner ` controller in
179
+ already are in place kubeadm recognize this condition and activates the ExternalCA, which also implies the ` csrsigner ` controller in
180
180
controller-manager won't be started
181
181
1 . If kubeadm is running in [ external CA mode] ( /docs/tasks/administer-cluster/kubeadm/kubeadm-certs#external-ca-mode ) ;
182
182
all the certificates must be provided by the user, because kubeadm cannot generate them by itself
@@ -227,13 +227,13 @@ for additional information RBAC and built-in ClusterRoles and groups.
227
227
Please note that:
228
228
229
229
1 . ` ca.crt ` certificate is embedded in all the kubeconfig files.
230
- 2 . If a given kubeconfig file exists, and its content is evaluated compliant with the above specs,
230
+ 1 . If a given kubeconfig file exists, and its content is evaluated compliant with the above specs,
231
231
the existing file will be used and the generation phase for the given kubeconfig skipped
232
- 3 . If kubeadm is running in [ ExternalCA mode] ( /docs/reference/setup-tools/kubeadm/kubeadm-init/#external-ca-mode ) ,
232
+ 1 . If kubeadm is running in [ ExternalCA mode] ( /docs/reference/setup-tools/kubeadm/kubeadm-init/#external-ca-mode ) ,
233
233
all the required kubeconfig must be provided by the user as well, because kubeadm cannot
234
234
generate any of them by itself
235
- 4 . In case of kubeadm is executed in the ` --dry-run ` mode, kubeconfig files are written in a temporary folder
236
- 5 . Kubeconfig files generation can be invoked individually with the
235
+ 1 . In case of kubeadm is executed in the ` --dry-run ` mode, kubeconfig files are written in a temporary folder
236
+ 1 . Kubeconfig files generation can be invoked individually with the
237
237
[ ` kubeadm init phase kubeconfig all ` ] ( /docs/reference/setup-tools/kubeadm/kubeadm-init-phase/#cmd-phase-kubeconfig ) command
238
238
239
239
### Generate static Pod manifests for control plane components
@@ -279,7 +279,7 @@ The static Pod manifest for the API server is affected by following parameters p
279
279
(` etcd-cafile ` , ` etcd-certfile ` , ` etcd-keyfile ` );
280
280
if an external etcd server is not be provided, a local etcd will be used (via host network)
281
281
- If a cloud provider is specified, the corresponding ` --cloud-provider ` is configured, together
282
- with the ` --cloud-config ` path if such file exists (this is experimental, alpha and will be
282
+ with the ` --cloud-config ` path if such file exists (this is experimental, alpha and will be
283
283
removed in a future version)
284
284
285
285
Other API server flags that are set unconditionally are:
@@ -321,7 +321,7 @@ Other API server flags that are set unconditionally are:
321
321
- ` --kubelet-client-certificate ` to ` apiserver-kubelet-client.crt `
322
322
- ` --kubelet-client-key ` to ` apiserver-kubelet-client.key `
323
323
- ` --service-account-key-file ` to ` sa.pub `
324
- - ` --requestheader-client-ca-file ` to` front-proxy-ca.crt `
324
+ - ` --requestheader-client-ca-file ` to ` front-proxy-ca.crt `
325
325
- ` --proxy-client-cert-file ` to ` front-proxy-client.crt `
326
326
- ` --proxy-client-key-file ` to ` front-proxy-client.key `
327
327
@@ -346,14 +346,14 @@ the users:
346
346
- ` --cluster-cidr ` and ` --node-cidr-mask-size ` flags according to the given CIDR
347
347
348
348
- If a cloud provider is specified, the corresponding ` --cloud-provider ` is specified, together
349
- with the ` --cloud-config ` path if such configuration file exists (this is experimental, alpha
349
+ with the ` --cloud-config ` path if such configuration file exists (this is experimental, alpha
350
350
and will be removed in a future version)
351
351
352
352
Other flags that are set unconditionally are:
353
353
354
354
- ` --controllers ` enabling all the default controllers plus ` BootstrapSigner ` and ` TokenCleaner `
355
- controllers for TLS bootstrap. See [ TLS Bootstrapping] ( /docs/reference/access-authn-authz/kubelet-tls-bootstrapping/ )
356
- for more details
355
+ controllers for TLS bootstrap. See [ TLS Bootstrapping] ( /docs/reference/access-authn-authz/kubelet-tls-bootstrapping/ )
356
+ for more details.
357
357
358
358
- ` --use-service-account-credentials ` to ` true `
359
359
@@ -382,9 +382,9 @@ Please note that:
382
382
1 . The etcd container image will be pulled from ` registry.gcr.io ` by default. See
383
383
[ using custom images] ( /docs/reference/setup-tools/kubeadm/kubeadm-init/#custom-images )
384
384
for customizing the image repository.
385
- 2 . If you run kubeadm in ` --dry-run ` mode, the etcd static Pod manifest is written
385
+ 1 . If you run kubeadm in ` --dry-run ` mode, the etcd static Pod manifest is written
386
386
into a temporary folder.
387
- 3 . You can directly invoke static Pod manifest generation for local etcd, using the
387
+ 1 . You can directly invoke static Pod manifest generation for local etcd, using the
388
388
[ ` kubeadm init phase etcd local ` ] ( /docs/reference/setup-tools/kubeadm/kubeadm-init-phase/#cmd-phase-etcd )
389
389
command.
390
390
@@ -431,7 +431,6 @@ Please note that:
431
431
1 . Mark control-plane phase can be invoked individually with the command
432
432
[ ` kubeadm init phase mark-control-plane ` ] ( /docs/reference/setup-tools/kubeadm/kubeadm-init-phase/#cmd-phase-mark-control-plane )
433
433
434
-
435
434
### Configure TLS-Bootstrapping for node joining
436
435
437
436
Kubeadm uses [ Authenticating with Bootstrap Tokens] ( /docs/reference/access-authn-authz/bootstrap-tokens/ )
@@ -442,12 +441,12 @@ for joining new nodes to an existing cluster; for more details see also
442
441
following steps as well as setting API server and controller flags as already described in
443
442
previous paragraphs.
444
443
445
- Please note that:
446
-
447
- 1 . TLS bootstrapping for nodes can be configured with the command
448
- [ ` kubeadm init phase bootstrap-token ` ] ( /docs/reference/setup-tools/kubeadm/kubeadm-init-phase/#cmd-phase-bootstrap-token ) ,
449
- executing all the configuration steps described in following paragraphs;
450
- alternatively, each step can be invoked individually
444
+ {{< note >}}
445
+ TLS bootstrapping for nodes can be configured with the command
446
+ [ ` kubeadm init phase bootstrap-token ` ] ( /docs/reference/setup-tools/kubeadm/kubeadm-init-phase/#cmd-phase-bootstrap-token ) ,
447
+ executing all the configuration steps described in following paragraphs;
448
+ alternatively, each step can be invoked individually.
449
+ {{< /note >}}
451
450
452
451
#### Create a bootstrap token
453
452
@@ -460,13 +459,13 @@ Please note that:
460
459
1 . The default token created by ` kubeadm init ` will be used to validate temporary user during TLS
461
460
bootstrap process; those users will be member of
462
461
` system:bootstrappers:kubeadm:default-node-token ` group
463
- 2 . The token has a limited validity, default 24 hours (the interval may be changed with the ` —token-ttl ` flag)
464
- 3 . Additional tokens can be created with the [ ` kubeadm token ` ] ( /docs/reference/setup-tools/kubeadm/kubeadm-token/ )
462
+ 1 . The token has a limited validity, default 24 hours (the interval may be changed with the ` —token-ttl ` flag)
463
+ 1 . Additional tokens can be created with the [ ` kubeadm token ` ] ( /docs/reference/setup-tools/kubeadm/kubeadm-token/ )
465
464
command, that provide as well other useful functions for token management.
466
465
467
466
#### Allow joining nodes to call CSR API
468
467
469
- Kubeadm ensures that users in ` system:bootstrappers:kubeadm:default-node-token ` group are able to
468
+ Kubeadm ensures that users in ` system:bootstrappers:kubeadm:default-node-token ` group are able to
470
469
access the certificate signing API.
471
470
472
471
This is implemented by creating a ClusterRoleBinding named ` kubeadm:kubelet-bootstrap ` between the
@@ -478,7 +477,7 @@ Kubeadm ensures that the Bootstrap Token will get its CSR request automatically
478
477
csrapprover controller.
479
478
480
479
This is implemented by creating ClusterRoleBinding named ` kubeadm:node-autoapprove-bootstrap `
481
- between the ` system:bootstrappers:kubeadm:default-node-token ` group and the default role
480
+ between the ` system:bootstrappers:kubeadm:default-node-token ` group and the default role
482
481
` system:certificates.k8s.io:certificatesigningrequests:nodeclient ` .
483
482
484
483
The role ` system:certificates.k8s.io:certificatesigningrequests:nodeclient ` should be created as
@@ -491,7 +490,7 @@ Kubeadm ensures that certificate rotation is enabled for nodes, and that new cer
491
490
for nodes will get its CSR request automatically approved by the csrapprover controller.
492
491
493
492
This is implemented by creating ClusterRoleBinding named
494
- ` kubeadm:node-autoapprove-certificate-rotation ` between the ` system:nodes ` group and the default
493
+ ` kubeadm:node-autoapprove-certificate-rotation ` between the ` system:nodes ` group and the default
495
494
role ` system:certificates.k8s.io:certificatesigningrequests:selfnodeclient ` .
496
495
497
496
#### Create the public cluster-info ConfigMap
@@ -501,21 +500,21 @@ This phase creates the `cluster-info` ConfigMap in the `kube-public` namespace.
501
500
Additionally it creates a Role and a RoleBinding granting access to the ConfigMap for
502
501
unauthenticated users (i.e. users in RBAC group ` system:unauthenticated ` ).
503
502
504
- Please note that:
505
-
506
- 1 . The access to the ` cluster-info ` ConfigMap _ is not _ rate-limited. This may or may not be a
507
- problem if you expose your cluster's API server to the internet; worst-case scenario here is a
508
- DoS attack where an attacker uses all the in-flight requests the kube-apiserver can handle to
509
- serving the ` cluster-info ` ConfigMap.
503
+ {{< note >}}
504
+ The access to the ` cluster-info ` ConfigMap _ is not _ rate-limited. This may or may not be a
505
+ problem if you expose your cluster's API server to the internet; worst-case scenario here is a
506
+ DoS attack where an attacker uses all the in-flight requests the kube-apiserver can handle to
507
+ serving the ` cluster-info ` ConfigMap.
508
+ {{< /note >}}
510
509
511
510
### Install addons
512
511
513
512
Kubeadm installs the internal DNS server and the kube-proxy addon components via the API server.
514
513
515
- Please note that:
516
-
517
- 1 . This phase can be invoked individually with the command
518
- [ ` kubeadm init phase addon all ` ] ( /docs/reference/setup-tools/kubeadm/kubeadm-init-phase/#cmd-phase-addon ) .
514
+ {{< note >}}
515
+ This phase can be invoked individually with the command
516
+ [ ` kubeadm init phase addon all ` ] ( /docs/reference/setup-tools/kubeadm/kubeadm-init-phase/#cmd-phase-addon ) .
517
+ {{< /note >}}
519
518
520
519
#### proxy
521
520
@@ -573,13 +572,13 @@ The second is to provide a file (that is a subset of the standard kubeconfig fil
573
572
#### Shared token discovery
574
573
575
574
If ` kubeadm join ` is invoked with ` --discovery-token ` , token discovery is used; in this case the
576
- node basically retrieves the cluster CA certificates from the ` cluster-info ` ConfigMap in the
575
+ node basically retrieves the cluster CA certificates from the ` cluster-info ` ConfigMap in the
577
576
` kube-public ` namespace.
578
577
579
578
In order to prevent "man in the middle" attacks, several steps are taken:
580
579
581
580
- First, the CA certificate is retrieved via insecure connection (this is possible because
582
- ` kubeadm init ` granted access to ` cluster-info ` users for ` system:unauthenticated ` )
581
+ ` kubeadm init ` granted access to ` cluster-info ` users for ` system:unauthenticated ` )
583
582
584
583
- Then the CA certificate goes trough following validation steps:
585
584
@@ -591,10 +590,11 @@ In order to prevent "man in the middle" attacks, several steps are taken:
591
590
- As a additional validation, the CA certificate is retrieved via secure connection and then
592
591
compared with the CA retrieved initially
593
592
594
- Please note that:
593
+ {{< note >}}
595
594
596
- 1 . Pub key validation can be skipped passing ` --discovery-token-unsafe-skip-ca-verification ` flag;
597
- This weakens the kubeadm security model since others can potentially impersonate the Kubernetes Master.
595
+ Pub key validation can be skipped passing ` --discovery-token-unsafe-skip-ca-verification ` flag;
596
+ This weakens the kubeadm security model since others can potentially impersonate the Kubernetes Master.
597
+ {{< /note >}}
598
598
599
599
#### File/https discovery
600
600
@@ -620,13 +620,12 @@ The request is then automatically approved and the operation completes saving `c
620
620
` kubelet.conf ` file to be used by kubelet for joining the cluster, while` bootstrap-kubelet.conf `
621
621
is deleted.
622
622
623
- Please note that:
624
-
623
+ {{< note >}}
625
624
- The temporary authentication is validated against the token saved during the ` kubeadm init `
626
625
process (or with additional tokens created with ` kubeadm token ` )
627
626
- The temporary authentication resolve to a user member of
628
627
` system:bootstrappers:kubeadm:default-node-token ` group which was granted access to CSR api
629
628
during the ` kubeadm init ` process
630
629
- The automatic CSR approval is managed by the csrapprover controller, according with
631
630
configuration done the ` kubeadm init ` process
632
-
631
+ {{< /note >}}
0 commit comments