Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kubelet-config-x.y ConfigMap logic improvements #1582

Closed
12 tasks done
neolit123 opened this issue May 30, 2019 · 23 comments
Closed
12 tasks done

kubelet-config-x.y ConfigMap logic improvements #1582

neolit123 opened this issue May 30, 2019 · 23 comments
Assignees
Labels
area/UX kind/deprecation Categorizes issue or PR as related to a feature/enhancement marked for deprecation. kind/design Categorizes issue or PR as related to design. kind/documentation Categorizes issue or PR as related to documentation. lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.

Comments

@neolit123
Copy link
Member

neolit123 commented May 30, 2019

tracking issue in k/e + KEP: kubernetes/enhancements#2915

1.23 Alpha:

1.24 Beta:

1.25 GA:

1.26 post-GA:


EDIT: original issue description below

when a control-plane node is created by init using kubernetesVersion: X.Y, kubeadm will create a "versioned" ConfigMap called kubelet-config-X.Y.

when a worker node joins the cluster, it uses the version of the local kubelet to fetch this ConfigMap, but if the version of the local kubelet differs from the control-plane version (X.Y) used to originally create the CM, the join process will just fail.

both init and upgrade use the version of the control-plane to manage this ConfigMap,
so it makes some sense for the join process to use the version of the control-plane as well.
but this raises the question whether this internal config stored in the CM will be compatible with the local kubelet.

however we have a version skew topic to discuss here as well.
Kubernetes itself supports X-1 nodes joining a X cluster, but kubeadm does not.

in our documentation we have no official mentions if e.g a kubeadm 1.13 and a kubelet 1.13 worker node can join a cluster with a CP that is 1.14:
https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/#version-skew-policy

@k8s-ci-robot k8s-ci-robot added kind/documentation Categorizes issue or PR as related to documentation. kind/bug Categorizes issue or PR as related to a bug. area/UX priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels May 30, 2019
@SataQiu
Copy link
Member

SataQiu commented May 31, 2019

Maybe we can get the cluster version through kubeadm-config ConfigMap when joining new work node.

# kubectl describe cm kubeadm-config -n kube-system
Name:         kubeadm-config
Namespace:    kube-system
Labels:       <none>
Annotations:  <none>

Data
====
ClusterConfiguration:
----
apiServer:
  extraArgs:
    authorization-mode: Node,RBAC
  timeoutForControlPlane: 4m0s
apiVersion: kubeadm.k8s.io/v1beta1
certificatesDir: /etc/kubernetes/pki
clusterName: kubernetes
controlPlaneEndpoint: ""
controllerManager: {}
dns:
  type: CoreDNS
etcd:
  local:
    dataDir: /var/lib/etcd
imageRepository: k8s.gcr.io
kind: ClusterConfiguration
kubernetesVersion: v1.13.0
networking:
  dnsDomain: cluster.local
  podSubnet: ""
  serviceSubnet: 10.96.0.0/12
scheduler: {}

ClusterStatus:
----
apiEndpoints:
  test-01:
    advertiseAddress: 192.168.137.139
    bindPort: 6443
apiVersion: kubeadm.k8s.io/v1beta1
kind: ClusterStatus

Events:  <none>

The ClusterConfiguration contains kubernetesVersion: v1.13.0.

@neolit123
Copy link
Member Author

@SataQiu
the PR you sent is something we've discussed yesterday - use kubernetesVersion.
so maybe we can merge that as a start in 1.16.

but the issue has deeper roots and we possibly need to discuss all the implications here.
e.g. versioning the kubelet-config CM, the usage of internal types and the component skew as a whole.

@rosti
Copy link

rosti commented May 31, 2019

kubelet's component config is a versioned API. It is at beta level now and I don't expect catastrophic incompatibility issues between a couple of consecutive kubelet versions, especially on join.
So I am all in for having equivalent behavior between the different kubeadm sub-commands.

@rosti
Copy link

rosti commented Aug 26, 2019

/assign

@neolit123 neolit123 added priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. and removed priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels Oct 10, 2019
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 8, 2020
@neolit123
Copy link
Member Author

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 8, 2020
@neolit123 neolit123 added kind/design Categorizes issue or PR as related to design. and removed kind/bug Categorizes issue or PR as related to a bug. labels Feb 11, 2020
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 11, 2020
@neolit123
Copy link
Member Author

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 11, 2020
@neolit123
Copy link
Member Author

/lifecycle frozen

@pacoxu
Copy link
Member

pacoxu commented Jan 11, 2022

For beta in 1.24, is cleanup any kubelet-config-x.yy instances in kubeadm too aggressive?
In my mind, the cleanup should happen when the feature is GA. Or users cannot roll back easily.

@neolit123
Copy link
Member Author

neolit123 commented Jan 11, 2022

For beta in 1.24, is cleanup any kubelet-config-x.yy instances in kubeadm too aggressive?
In my mind, the cleanup should happen when the feature is GA. Or users cannot roll back easily.

i think i mean clearing docs / code comments.
the code path for the x.yy variant will still be supported.

@pacoxu
Copy link
Member

pacoxu commented Jan 11, 2022

Oops. Got it.

@neolit123
Copy link
Member Author

neolit123 commented Feb 15, 2022

looks like kubernetes/kubernetes#108027 broke https://k8s-testgrid.appspot.com/sig-cluster-lifecycle-kubeadm#kubeadm-kinder-latest-on-1-23

that is a skew test.
maybe we need to one day make the k/k -> /test/e2e_kubeadm suite match the kubeadm version and not the k8s version.
if it matches the k8s version it also means it must support the kubeadm skew of k8s N and N-1.

the fix is to properly default the FG value to match the kubeadm features.go based on k8s MINOR version.

the fix here is to make test/e2e_kubeadm/kubelet_config_test.go tollerate both the old and new object names in the 1.23 branch of k/k.

i will send a PR later.

@pacoxu
Copy link
Member

pacoxu commented Feb 28, 2022

The CI is green again.

v1.24 tasks are finished and the milestone can move to 1.25.

@neolit123
Copy link
Member Author

the feature gate was removed for 1.26. this is complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/UX kind/deprecation Categorizes issue or PR as related to a feature/enhancement marked for deprecation. kind/design Categorizes issue or PR as related to design. kind/documentation Categorizes issue or PR as related to documentation. lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

No branches or pull requests

7 participants