-
Notifications
You must be signed in to change notification settings - Fork 715
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
Graduate kubelet config to beta #571
Comments
/assign @xiangpengzhao |
TODO list:
if err := kubeletphase.WriteInitKubeletConfigToDiskOnMaster(i.cfg)
// KubeletBaseConfigurationConfigMapKey specifies in what ConfigMap key the initial remote configuration of kubelet should be stored
// TODO: Use the constant ("kubelet.config.k8s.io") defined in pkg/kubelet/kubeletconfig/util/keys/keys.go
// after https://github.com/kubernetes/kubernetes/pull/53833 being merged.
KubeletBaseConfigurationConfigMapKey = "kubelet" UPDATE: The 3, 4, 5 should wait for the associated PR merged. Anything else am I missing or anything incorrect from above list? @luxas @fabriziopandini |
@xiangpengzhao, with "introduce corresponding phases" I was thinking at @xiangpengzhao, @luxas, if you agree I will rename this issue into "Graduate kubelet config to beta“ |
@fabriziopandini thanks for clarifying ! |
@xiangpengzhao it should be exposed as commands in, for example:
|
phase added in kubernetes/kubernetes#57224. The graduation should wait for the associated PRs merged. |
FWIW; we need a phase / something command that points a kubelet to a new ConfigMap as well, for the kubelet upgrade scenario. e.g. I've just upgraded the kubelet (which is associated with the v1.9 configmap) to v1.10, I now need to repoint it to the v1.10 config... maybe we can just document to use |
@luxas please check discussion on #57244 IMO we should move this somewhere else, and considering the use case, I suggest under |
I was thinking Agree to document to make them more clear. |
It is, yes
👍
Something like that probably makes sense... What do people think would be the most productive naming? kubeadm upgrade kubelet-config [myNode] |
@timothysc wrote in kubernetes/kubernetes#53084 (comment) (Graduate the kubeletconfig API to beta)
I updated the TODO list #571 (comment) as per the final implementation of kubernetes/kubernetes#53833. The only bullet in the TODO list is |
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Remove invalid TODOs in kubeadm constants. **What this PR does / why we need it**: These TODOs are invalid now. **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: ref kubernetes/kubeadm#571 (comment) **Special notes for your reviewer**: **Release note**: ```release-note NONE ```
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Add phase command for dynamic kubelet configuration in kubeadm. **What this PR does / why we need it**: As the title says. **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: partially fixes this: kubernetes/kubeadm#571 **Special notes for your reviewer**: /cc @luxas @fabriziopandini @kubernetes/sig-cluster-lifecycle-pr-reviews **Release note**: ```release-note Phase `kubeadm alpha phase kubelet` is added to support dynamic kubelet configuration in kubeadm. ```
Automatic merge from submit-queue (batch tested with PRs 63914, 63887, 64116, 64026, 62933). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. kubeadm: Write kubelet config file to disk and persist in-cluster **What this PR does / why we need it**: In order to make configuration flow from the cluster level to node level, we need a way for kubeadm to tell the kubelet what config to use. As of v1.10 (I think) the kubelet can read `--config` using the kubelet Beta ComponentConfiguration API, so now we have an interface to talk to the kubelet properly. This PR: - Writes the kubelet ComponentConfig to `/var/lib/kubelet/config.yaml` on init and join - Writes an environment file to source in the kubelet systemd dropin `/var/lib/kubelet/kubeadm-flags.env`. This file contain runtime flags that should be passed to the kubelet. - Uploads a ConfigMap with the name `kubelet-config-1.X` - Patches the node object so that it starts using the ConfigMap with updates using Dynamic Kubelet Configuration, **only if the feature gate is set** (currently alpha and off by default, not intended to be switched on in v1.11) - Updates the phase commands to reflect this new flow The kubelet dropin file I used now looks like this: ``` # v1.11.x dropin as-is at HEAD # /etc/systemd/system/kubelet.service.d/10-kubeadm.conf --- [Service] Environment="KUBELET_KUBECONFIG_ARGS=--bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf" Environment="KUBELET_CONFIG_ARGS=--config=/var/lib/kubelet/config.yaml" EnvironmentFile-=/var/lib/kubelet/kubeadm-flags.env # Should default to 0 in v1.11: #63881, and hence not be here in the real v1.11 manifest Environment="KUBELET_CADVISOR_ARGS=--cadvisor-port=0" # Should be configurable via the config file: #63878, and hence be configured using the file in v1.11 Environment="KUBELET_CERTIFICATE_ARGS=--rotate-certificates=true" ExecStart= ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_CONFIG_ARGS $KUBELET_KUBEADM_ARGS $KUBELET_CADVISOR_ARGS $KUBELET_CERTIFICATE_ARGS $KUBELET_EXTRA_ARGS --- # v1.11.x dropin end goal # /etc/systemd/system/kubelet.service.d/10-kubeadm.conf --- [Service] Environment="KUBELET_KUBECONFIG_ARGS=--bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf" Environment="KUBELET_CONFIG_ARGS=--config=/var/lib/kubelet/config.yaml" EnvironmentFile-=/var/lib/kubelet/kubeadm-flags.env ExecStart= ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_CONFIG_ARGS $KUBELET_KUBEADM_ARGS $KUBELET_EXTRA_ARGS --- # Environment file dynamically created at runtime by "kubeadm init" # /var/lib/kubelet/kubeadm-flags.env KUBELET_KUBEADM_ARGS=--cni-bin-dir=/opt/cni/bin --cni-conf-dir=/etc/cni/net.d --network-plugin=cni ``` **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes kubernetes/kubeadm#822 Fixes kubernetes/kubeadm#571 **Special notes for your reviewer**: **Release note**: ```release-note "kubeadm init" now writes a structured and versioned kubelet ComponentConfiguration file to `/var/lib/kubelet/config.yaml` and an environment file with runtime flags (you can source this file in the systemd kubelet dropin) to `/var/lib/kubelet/kubeadm-flags.env`. ``` @kubernetes/sig-cluster-lifecycle-pr-reviews @mtaufen
FEATURE REQUEST
Kubelet config was introduced in
kubeadm init
as alpha feature behind feature gates, but it is planned to graduate it as soon as possible.It should be necessary to introduce corresponding phases as well before graduation.
The text was updated successfully, but these errors were encountered: