Commit Graph

3422 Commits

Author SHA1 Message Date
Lubomir I. Ivanov
fb7ddf88e9 kubeadm: mark the "master" label/taint as deprecated
- Mark the "node-role.kubernetes.io/master" key for labels
and taints as deprecated.
- During "kubeadm init/join" apply the label
"node-role.kubernetes.io/control-plane" to new control-plane nodes,
next to the existing "node-role.kubernetes.io/master" label.
- During "kubeadm upgrade apply", find all Nodes with the "master"
label and also apply the "control-plane" label to them
(if they don't have it).
- During upgrade health-checks collect Nodes labeled both "master"
and "control-plane".
- Rename the constants.ControlPlane{Taint|Toleraton} to
constants.OldControlPlane{Taint|Toleraton} to manage the transition.
- Mark constants.OldControlPlane{{Taint|Toleraton} as deprecated.
- Use constants.OldControlPlane{{Taint|Toleraton} instead of
constants.ControlPlane{Taint|Toleraton} everywhere.
- Introduce constants.ControlPlane{Taint|Toleraton}.
- Add constants.ControlPlaneToleraton to the kube-dns / CoreDNS
Deployments to make them anticipate the introduction
of the "node-role.kubernetes.io/control-plane:NoSchedule"
taint (constants.ControlPlaneTaint) on kubeadm control-plane Nodes.
2020-11-10 22:10:13 +02:00
SataQiu
50d0a40155 kubeadm: fix the lint failure where return value is not checked
Signed-off-by: SataQiu <1527062125@qq.com>
2020-11-06 20:53:58 +08:00
Kubernetes Prow Robot
acc3910964
Merge pull request #95991 from serathius/datapolicy-kubeadm
Add datapolicy tags to cmd/kubeadm directory
2020-11-03 22:50:17 -08:00
Marek Siarkowicz
8644f3ff83 Add datapolicy tags to cmd/kubeadm directory 2020-10-30 18:32:17 +01:00
Shihang Zhang
ff641f6eb2 mv TokenRequest and TokenRequestProjection to GA 2020-10-29 20:47:01 -07:00
Kubernetes Prow Robot
254f3e26ab
Merge pull request #95786 from Sh4d1/add_missing_kubeadm_patch
fix: add missing patch flag for kubeadm init phase control-plane
2020-10-23 02:27:45 -07:00
Antonio Ojea
4e14d1b9a3 kubeadm: validate node-cidr-mask are correct 2020-10-22 17:31:10 +02:00
Antonio Ojea
7fc6b4157b kubeadm validate maximum service subnet size
Validate that the maximum service subnet size doesn't exceed the
limits.

Co-authored-by: Arvinderpal Wander <awander@gmail.com>
2020-10-22 17:30:59 +02:00
Antonio Ojea
8b52995d32 kubeadm: validate podSubnet against node-cidr-mask
the controller manager should validate the podSubnet against the node-mask
because if they are incorrect can cause the controller-manager to fail.

We don't need to calculate the node-cidr-masks, because those should
be provided by the user, if they are wrong we fail in validation.
2020-10-22 16:24:13 +02:00
Patrik Cyvoct
5fc4b4ea8f
fix: add missing patch flag for kubeadm init phase control-plane
Signed-off-by: Patrik Cyvoct <patrik@ptrk.io>
2020-10-22 10:46:50 +02:00
Lubomir I. Ivanov
bae6b93d5c kubeadm: add some output to the generate-csr command
Currently the "generate-csr" command does not have any output.
Pass an io.Writer (bound to os.Stdout from /cmd) to the functions
responsible for generating the kubeconfig / certs keys and CSRs.

If nil is passed these functions don't output anything.
2020-10-12 19:05:45 +03:00
SataQiu
646f4e2b62 make new command functions to keep private when they are not required to be public 2020-10-10 12:03:02 +08:00
James Sturtevant
78ca71857b
Update Windows Pause version to 1.4.0 2020-10-08 15:39:31 -07:00
Kubernetes Prow Robot
902ed94bba
Merge pull request #95134 from zgfh/add_note_for_kubeadm_cert_renew
kubeadm: add note for kubeadm cert renew
2020-09-29 06:27:26 -07:00
Kubernetes Prow Robot
604569482f
Merge pull request #94504 from neolit123/1.20-warning-cert-bounds-client-side
kubeadm: print warnings on invalid cert period instead of erroring out
2020-09-29 02:49:25 -07:00
Alan Zhu
b9067e5a0c add note for kubeadm cert renew 2020-09-29 09:05:40 +08:00
Lubomir I. Ivanov
477c41f36d kubeadm: deprecate self-hosting support
Deprecate the experimental command "alpha self-hosting" and its
sub-command "pivot" that can be used to create a self-hosting
control-plane from static Pods.
2020-09-28 22:24:24 +03:00
Kubernetes Prow Robot
db9f1e91d9
Merge pull request #94988 from neolit123/1.20-tollerate-missing-ca-key-on-join
kubeadm: warn but do not error out on missing CA keys on CP join
2020-09-28 06:36:48 -07:00
Kubernetes Prow Robot
770eb2c4a0
Merge pull request #94871 from neolit123/1.20-kubeadm-remove-experimental-kustomize
kubeadm: remove the --experimental-kustomize feature
2020-09-24 08:16:06 -07:00
Lubomir I. Ivanov
7c783fa374 kubeadm: make the CP join handling of kubeconfig similar to "init"
The kubeconfig phase of "kubeadm init" detects external CA mode
and skips the generation of kubeconfig files. The kubeconfig
handling during control-plane join executes
CreateJoinControlPlaneKubeConfigFiles() which requires the presence
of ca.key when preparing the spec of a kubeconfig file and prevents
usage of external CA mode.

Modify CreateJoinControlPlaneKubeConfigFiles() to skip generating
the kubeconfig files if external CA mode is detected.
2020-09-24 18:12:00 +03:00
Lubomir I. Ivanov
05b77fe99f kubeadm: warn but do not error out on missing CA keys on CP join
- Modify validateCACertAndKey() to print warnings for missing keys
instead of erroring out.
- Update unit tests.

This allows doing a CP node join in a case where the user has:
- copied shared certificates to the new CP node, but not copied
ca.key files, treating the cluster CAs as external
- signed other required certificates in advance
2020-09-24 18:11:59 +03:00
Kubernetes Prow Robot
3aa546923c
Merge pull request #94586 from BedivereZero/master
Stop container before remove for Docker
2020-09-23 10:14:25 -07:00
Kubernetes Prow Robot
7a2812ca60
Merge pull request #94938 from yagonobre/certs-graduate
Graduate kubeadm alpha certs command
2020-09-23 08:36:10 -07:00
Yago Nobre
2f19cf7cbc Graduate kubeadm alpha certs command 2020-09-23 10:13:45 -03:00
Kubernetes Prow Robot
86a9087896
Merge pull request #89962 from wangrzneu/master
make kubectl/kubeadm completion script support busybox
2020-09-22 12:21:23 -07:00
knight42
36eb74a803
refactor(kubeadm): make alpha kubeconfig user command accpet --config
Signed-off-by: knight42 <anonymousknight96@gmail.com>
2020-09-22 23:10:41 +08:00
Kubernetes Prow Robot
4304f4bdbd
Merge pull request #94869 from neolit123/1.20-remove-upgrade-node-kubelet-flag
kubeadm: remove the --kubelet-version flag for "upgrade node"
2020-09-21 12:55:52 -07:00
Kubernetes Prow Robot
f682c4f142
Merge pull request #94816 from neolit123/1.20-relax-kubeconfig-server-validation
kubeadm: relax the validation of kubeconfig server URLs
2020-09-21 10:04:33 -07:00
fabriziopandini
66b8847dbf Remove kubeadm audit package 2020-09-19 17:20:39 +02:00
Lubomir I. Ivanov
8ece27bf4b kubeadm: remove the --experimental-kustomize feature
The feature was replaced by --experimental-patches and deprecated in
1.19.
2020-09-18 03:49:53 +03:00
Lubomir I. Ivanov
71856675a4 kubeadm: remove the --kubelet-version flag for "upgrade node"
The flag was deprecated as it is problematic since it allows
overrides of the kubelet configuration that is downloaded
from the cluster during upgrade.

Kubeadm node upgrades already download the KubeletConfiguration
and store it in the internal ClusterConfiguration type. It is then
only a matter of writing that KubeletConfiguration to disk.
2020-09-18 01:03:38 +03:00
Kubernetes Prow Robot
218a2b078b
Merge pull request #94765 from zhanw15/patch-1
kubeadm init phase upload-certs: add flag --kubeconfig
2020-09-16 19:20:44 -07:00
Kubernetes Prow Robot
3ba141173c
Merge pull request #94668 from neolit123/1.20-kubeadm-remove-dkc
kubeadm: remove the "alpha kubelet config enable-dynamic" command
2020-09-16 14:05:21 -07:00
Lubomir I. Ivanov
edaef35eac kubeadm: relax the validation of kubeconfig server URLs
For external CA users that have prepared the kubeconfig files
for components, they might wish to provide a custom API server URL.
When performing validation on these kubeconfig files, instead of
erroring out on such custom URLs, show a klog Warning.

This allows flexibility around topology setup, where users
wish to make the kubeconfigs point to the ControlPlaneEndpoint instead
of the LocalAPIEndpoint.

Fix validation in ValidateKubeconfigsForExternalCA expecting
all kubeconfig files to use the CPE. The kube-scheduler and
kube-controller-manager now use LAE.
2020-09-16 01:52:09 +03:00
Kubernetes Prow Robot
5dd2676bf6
Merge pull request #94555 from SataQiu/fix-crisocket-warning-20200905
Fix the bug that kubeadm tries to call 'docker info' even if the CRI socket was for another CR
2020-09-14 09:41:12 -07:00
Kubernetes Prow Robot
7ffc46924f
Merge pull request #94102 from neolit123/1.19-fix-etcd-700-perms
kubeadm: adjust the logic around etcd data directory creation
2020-09-14 09:40:59 -07:00
zhanwang
ae03350e30
kubeadm init phase upload-certs: add flag --kubeconfig 2020-09-14 17:48:20 +08:00
Michaël Lévesque-Dion
fbd62d55af avoid logging token in RunDeleteTokens 2020-09-11 13:28:52 -04:00
Lubomir I. Ivanov
daef96c3f2 kubeadm: remove stray "alpha phase" command
This command had a TODO to be removed once kubeadm init phases are
added. Remove the command as init phases are in place already.
2020-09-11 03:40:11 +03:00
Lubomir I. Ivanov
a5a29c54cc kubeadm: remove the "alpha kubelet config enable-dynamic" command
The command was deprecated in 1.19 and can be removed in 1.20.
2020-09-11 03:40:11 +03:00
SataQiu
c318973cec fix the bug that kubeadm tries to call 'docker info' even if the CRI socket was for another CR 2020-09-10 14:05:36 +08:00
Akhilesh2412
1a0f69bca3 kubeadm: Update versions for 1.20
This PR specifies minimum control plane version,
kubelet version and current K8s version for v1.20.

Signed-off-by: Kommireddy Akhilesh <akhileshkommireddy2412@gmail.com>
2020-09-10 02:51:13 +05:30
Lubomir I. Ivanov
b5b9698fbf kubeadm: print warnings on invalid cert period instead of erroring out
Client side period validation of certificates should not be
fatal, as local clock skews are not so uncommon. The validation
should be left to the running servers.

- Remove this validation from TryLoadCertFromDisk().
- Add a new function ValidateCertPeriod(), that can be used for this
purpose on demand.
- In phases/certs add a new function CheckCertificatePeriodValidity()
that will print warnings if a certificate does not pass period
validation, and caches certificates that were already checked.
- Use the function in a number of places where certificates
are loaded from disk.
2020-09-09 20:53:13 +03:00
BedivereZero
437c166199 Stop container before remove for Docker 2020-09-08 15:42:03 +08:00
Jordan Liggitt
c0ba2364b5 Run slow kubeadm upgrade tests in parallel 2020-09-04 13:36:45 -04:00
Jordan Liggitt
24481db023 Ensure kubeadm tests have unique names 2020-09-04 13:36:29 -04:00
Jordan Liggitt
7e01e38334 Avoid mutating global variables in kubeadm certs phases 2020-09-04 13:36:10 -04:00
Kubernetes Prow Robot
3cdfdfccc9
Merge pull request #94506 from neolit123/1.20-coredns-remove-supported-version-check
kubeadm: remove the CoreDNS check for supported image digests
2020-09-04 07:37:41 -07:00
Kubernetes Prow Robot
0edbf2554a
Merge pull request #94479 from knight42/feat/kubeadm-etcd-pod-resource-requests
kubeadm: apply resource requests in the etcd pod spec
2020-09-04 06:25:41 -07:00
knight42
2ebd293780
feat(kubeadm): specify resource requests in etcd pod spec
Signed-off-by: knight42 <anonymousknight96@gmail.com>
2020-09-04 11:54:21 +08:00