Commit Graph

12735 Commits

Author SHA1 Message Date
Darren Shepherd
83553035a9 Notify startup to grab a hold of handler and authenticator
Fix to the completed options config

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2026-06-12 11:47:21 -03:00
Darren Shepherd
4b9fcc8a33 Add stopCh to apiserver & context to kublet commands
Remove SetupSignalContext call from the apiserver

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2026-06-12 11:47:21 -03:00
Darren Shepherd
37309138d5 Hide deprecated warnings 2026-06-12 11:47:21 -03:00
Darren Shepherd
4f16e1aef5 Wait for kube-apiserver for 2 minutes for slow (ARM) systems 2026-06-12 11:47:21 -03:00
Darren Shepherd
d0b19888d0 If you can't set hashsize on nf_conntrack don't fail 2026-06-12 11:47:21 -03:00
Darren Shepherd
dd9e64daea Drop credential providers 2026-06-12 11:47:21 -03:00
Darren Shepherd
334cc04bd1 Drop storage plugins 2026-06-12 11:47:21 -03:00
Darren Shepherd
1da9575615 Drop client-go cloud auth 2026-06-12 11:47:21 -03:00
Kubernetes Prow Robot
e978e6e56d Merge pull request #138805 from neolit123/automated-cherry-pick-of-#138692-origin-release-1.33
Automated cherry pick of #138692: kubeadm: skip LocalAPIEndpoint defaulting on worker join
2026-05-11 21:51:57 +05:30
Kubernetes Prow Robot
121f890b6d Merge pull request #138686 from neolit123/automated-cherry-pick-of-#138449-origin-release-1.33
Automated cherry pick of #138449: kubeadm: use the localAPIEndpoint for all API calls in 'init'
2026-05-11 21:51:49 +05:30
Micah Hausler
5ea68035bb kubeadm: use dedicated ClusterRole for apiserver kubelet client
Signed-off-by: Micah Hausler <mhausler@amazon.com>
2026-05-11 14:34:27 +02:00
Seena Fallah
a051bd7fc8 kubeadm: skip LocalAPIEndpoint defaulting on worker join
FetchInitConfigurationFromCluster always called SetAPIEndpointDynamicDefaults,
which invokes ChooseAPIServerBindAddress and requires a default route on the
host. Worker nodes joining the cluster don't need a LocalAPIEndpoint and may
legitimately have no default route, causing kubeadm join to fail with:

```
unable to fetch the kubeadm-config ConfigMap: unable to select an IP from
default routes.
```

Add a skipAPIEndpoint parameter to SetInitDynamicDefaults and pass
`!getAPIEndpoint` from FetchInitConfigurationFromCluster, so the endpoint
defaulter is bypassed when the caller did not request the endpoint (worker
join, non-control-plane reset/certs/upgrade paths).

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2026-05-06 11:09:36 +02:00
Lubomir I. Ivanov
be0a49b221 kubeadm: use the localAPIEndpoint for all API calls in 'init'
Historicaly the kubeadm clients have used the 'admin.conf'
and 'super-admin.conf' directly, which makes all API calls
go trough the CPE (control plane endpoint). This can create
problems for scenarios when the LB is provisioned only after
'init' starts the kube-apiserver.

Instead of using the '.conf' as they are, modify them
in memory to point to the LAE (localAPIEndpoint).
This was already done by the WaitControlPlaneClient for
the WaitControlPlane phase, which required it. This separate
client is no longer needed.

However, do use a unmodified kubeconfig to the init phase
bootstrap-token since this is the phase that creates
the cluster-info CM and for that we need the original CPE
server address.
2026-04-29 17:48:03 +02:00
Benjamin Wang
f7077de307 Add a (*Client) addEndpoint method
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2026-04-23 09:16:24 +01:00
Benjamin Wang
cd70e54c56 Evaluate etcd cluster health using quorum
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2026-04-23 09:16:24 +01:00
Kubernetes Prow Robot
2a93544e66 Merge pull request #137571 from fuweid/cp-1374942-133
[release-1.33] cmd/kubeadm: ignore EINVAL error during unmount
2026-03-12 01:01:37 +05:30
Wei Fu
40cd0abf43 cmd/kubeadm: ignore EINVAL error during unmount
If /var/lib/kubelet is MS_SHARED mountpoint, all the mountpoints
under /var/lib/kubelet will have duplicate one. When `kubeadm reset -f`
is executed, it will try to umount one path twice. However, they are in
the peer group. Once we umount one path, the duplicate one will be
umounted as well. So, in this case, we should ignore EINVAL error.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
(cherry picked from commit 2634261c17)
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2026-03-09 10:26:36 -04:00
Paco Xu
67f0efebf1 kubeadm: do not add learner member to etcd client endpoints 2026-02-26 10:31:21 +00:00
SataQiu
7a092c63d9 kubeadm: waiting for etcd learner member to be started before promoting during 'kubeadm join' 2026-01-20 16:01:08 -08:00
Lubomir I. Ivanov
4e36355c5d kubeadm: always retry Patch() Node API calls
The PatchNodeOnce function has historically exited early
in scanarious when we Get a Node object, but the next Patch
API call on the same Node object fails. This can happen
in setups that are under a lot of resource pressure
or different network timeout scenarious.

Instead of exiting early and allow listing certain errors,
always retry on any Patch error. This aligns with the
general idea that kubeadm retries *all* API calls.
2026-01-07 14:27:10 +01:00
Lubomir I. Ivanov
249d35bf43 kubeadm: do not sort extraArgs alpha-numerically
If the user has provided extraArgs with an order that has
significance (e.g. --service-account-issuer for kube-apiserver),
kubeadm will correctly override any base args, but will end up
sorting the entire resulting list, which is not desired.

Instead, only sort the base arguments and preserve the order
of overrides provided by the user.
2025-12-19 17:43:22 +01:00
Andrey Borovets
f55ba2cdd1 [Manual bugfix]: unhide the etcd-join phase for v1.33
Signed-off-by: Andrey Borovets <andrey.borovets@flant.com>
2025-11-27 13:23:27 +03:00
Kubernetes Prow Robot
42a6f5f495 Merge pull request #134724 from neolit123/automated-cherry-pick-of-#134715-origin-release-1.33
Automated cherry pick of #134715: kubeadm: add missing cluster-info context validation
2025-11-07 19:30:58 -08:00
Ciprian Hacman
421be9ee90 Fix tests 2025-11-01 06:05:27 +02:00
joshjms
9820ef8637 etcd: bump etcd to v3.5.24 for k8s v1.31, v1.32, v1.33
Signed-off-by: joshjms <joshjms1607@gmail.com>
2025-10-31 22:42:13 +02:00
Lubomir I. Ivanov
7f6f426599 kubeadm: add missing cluster-info context validation
When retrieving the cluster-info CM, ensure the cluster pointed
out by the current context in the kubeconfig is validated.

Add unit test for the above.

Make the function GetClusterFromKubeConfig() to return various
errors. Handle the errors on call sites. Add unit tests
for the update.

The above changes prevent panics when the users has manually
edited and malformed the kubeconfig in the cluster-info CM.
2025-10-20 13:34:26 +02:00
Jordan Liggitt
6a47dd845d Remove invalid SAN certificate construction 2025-10-14 09:37:26 -04:00
Benjamin Elder
9fddfce038 kubeadm preflight checks: fix host URL construction 2025-10-14 09:37:25 -04:00
Lubomir I. Ivanov
909df3740d kubeadm: rework the FetchInitConfigurationFromCluster node flags
The newControlPlane flag has been historically problematic, since
it implies that the function FetchInitConfigurationFromCluster
cannot handle the cases where a node is worker node but
we still want to fetch its NodeRegistrationOptions conditionally,
in cases such as "upgrade node" for workers.

To fix this issue, replace the flag newControlPlaneNode with
two new flags getNodeRegistration and getAPIEndpoint.

If getNodeRegistration is true, we fetch the NRO, and if
getAPIEndpoint is true, we fetch the API endpoint for
that node.

Additionally, rename skipComponentConfigs to getComponentConfigs
for consistency and flip its value accordingly everywhere.
2025-10-01 22:04:56 +02:00
Lubomir I. Ivanov
223dd0ab82 kubeadm: use JoinHostPort in WaitControlPlaneClient
Using naive string concat with ":" does not work for IPv6.
Apply the fix to WaitForKubelet as well.
2025-09-25 21:29:39 +02:00
Lubomir I. Ivanov
9f99111f42 kubeadm: ensure waiting for apiserver uses a local client
When waiting for the kube-apiserver to report 'ok'
in the 'init' and 'join' phase 'wait-control-plane', a client
constructed from the 'admin.conf' is used. In the case of the
kube-apiserver, the discovery client is used so that
anonymous-auth works. But if 'admin.conf' is used as is,
it would point to the CPE and not the LAE.

Implement a new method WaitControlPlaneClient() for both
init.go and join.go that patches the 'Server' field in the
loaded v1.Config to point to the LAE, before constructing
a client set and using it in the kube-apiserver waiter.
2025-09-25 15:57:36 +02:00
tom1299
b246955af5 Fix missing control plane health check timeout 2025-08-28 22:57:01 +08:00
bconry
cb130042b1 Add check to see if promote worked within the retry loop 2025-06-13 10:04:18 +03:00
David Eads
660df229bf Stop exposing list-via-watch from the server
With StreamingCollectionEncodingToJSON and
StreamingCollectionEncodingToProtobuf, the WatchList must re-justify its
necessity.  To prevent an ecosystem from building around a feature that
may not be promoted, we will stop serving list-via-watch until
performance numbers can justify its inclusion.

This also stops the kube-controller-manager from using the
list-via-watch by default.  The fallback is a regular list, so during
the skew during an upgrade the "right" thing will happen and the new
StreamingCollectionEncoding will be used.
2025-04-18 09:21:23 -04:00
joshjms
24edc6e90f Update etcd to 3.5.21
Signed-off-by: joshjms <joshjms1607@gmail.com>
2025-04-02 02:16:38 +08:00
Kubernetes Prow Robot
070f0ad3bd Merge pull request #129970 from mortent/AddResourceV1beta2API
Add resource v1beta2 API
2025-03-26 09:10:47 -07:00
Morten Torkildsen
39507d911f Add resource v1beta2 API 2025-03-26 14:41:09 +00:00
Lubomir I. Ivanov
2037f39e20 kubeadm: use 'writer' everywhere in util/apiclient/wait.go 2025-03-24 21:45:11 +02:00
Lubomir I. Ivanov
310723b21c kubeadm: fix WaitForAllControlPlaneComponents with anonymous auth
When the kube-apiserver has --anonymous-auth=false,
the regular http.Client.Get() that WaitForAllControlPlaneComponents
does will not work.

Always use the discovery client when checking the health status
of the kube-apiserver.

Do a minor rework of struct fields and unit tests.

Replace nil client in cmd/phases/join/waitcontrolplane.go.
2025-03-24 20:58:59 +02:00
Kubernetes Prow Robot
d383020cc8 Merge pull request #130831 from ajaysundark/disable-swap-resize
disable in-place pod vertical scaling for swap enabled pods
2025-03-20 19:38:37 -07:00
Kubernetes Prow Robot
b0d6079ddc Merge pull request #130947 from pohly/dra-device-taints-flake
DRA device taints: fix some race conditions
2025-03-20 14:16:55 -07:00
Ajay Sundar Karuppasamy
a09cb22e4d disable in-place vertical pod scaling for non-restartable swappable containers 2025-03-20 20:43:18 +00:00
Patrick Ohly
ac6e47cb14 DRA taint eviction: improve error handling
There was one error path that led to a "controller has shut down" log
message. Other errors caused different log entries or are so unlikely (event
handler registration failure!) that they weren't checked at all.

It's clearer to let Run return an error in all cases and then log the
"controller has shut down" error at the call site. This also enables tests to
mark themselves as failed, should that ever happen.
2025-03-20 17:59:06 +01:00
Francesco Romani
3c7ed00e22 node: kep-2625: cpu manager policy options GA
Move the support for CPUManager Policy Options to GA

Signed-off-by: Francesco Romani <fromani@redhat.com>
2025-03-20 08:31:32 +01:00
Kubernetes Prow Robot
68ba091fca Merge pull request #130844 from danwinship/improved-traffic-distribution
KEP-3015 PreferSameZone/PreferSameNode traffic distribution
2025-03-19 13:00:48 -07:00
Kubernetes Prow Robot
ab3cec0701 Merge pull request #130447 from pohly/dra-device-taints
device taints and tolerations (KEP 5055)
2025-03-19 13:00:32 -07:00
yongruilin
dab8758a59 chore: avoid resetting config of emulation verison and featuregates when adding flags
This change introduces improvements to the component compatibility registry:
- Modify the kube-scheduler test server to create a separate ComponentGlobalsRegistry
- Update the compatibility registry to handle multiple flag configurations
- Enhance test cases to support emulation version mapping between components
2025-03-19 16:31:13 +00:00
Dan Winship
c85083589c Clarify hostname vs node name in kube-proxy
Various parts of kube-proxy passed around a "hostname", but it is
actually the name of the *node* kube-proxy is running on, which is not
100% guaranteed to be exactly the same as the hostname. Rename it
everywhere to make it clearer that (a) it is definitely safe to use
that name to refer to the Node, (b) it is not necessarily safe to use
that name with DNS, etc.
2025-03-19 08:46:15 -04:00
Patrick Ohly
a027b439e5 DRA: add device taint eviction controller
The controller is derived from the node taint eviction controller.
In contrast to that controller it tracks the UID of pods to prevent
deleting the wrong pod when it got replaced.
2025-03-19 09:18:38 +01:00
Yuma Ogami
d66330609c Remove the not-even alpha feature setting
Remove the setting for the feature gate that are not even alpha
because Compatibility Versions (KEP-4330) don't allow it.
2025-03-17 00:49:58 +00:00