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

Support customized kubelet configuration. #187

Merged
merged 2 commits into from
Nov 12, 2018
Merged

Support customized kubelet configuration. #187

merged 2 commits into from
Nov 12, 2018

Conversation

ralimi
Copy link
Contributor

@ralimi ralimi commented Nov 12, 2018

Support is added for both the alpha1 and alpha3 config.yaml formats.
Before the alpha3 format, kubelet configuration could be added via
kubeadm_extra_config. However, that doesn't work with the alpha3
format since kubelet configuration is passed via a separate YAML
document with kind == KubeletConfiguration:
https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1alpha3#hdr-Kubeadm_init_configuration_types

Support is added for both the alpha1 and alpha3 config.yaml formats.
Before the alpha3 format, kubelet configuration could be added via
kubeadm_extra_config.  However, that doesn't work with the alpha3
format since kubelet configuration is passed via a separate YAML
document with kind == KubeletConfiguration:
https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1alpha3#hdr-Kubeadm_init_configuration_types
@davejrt
Copy link
Contributor

davejrt commented Nov 12, 2018

Looks good, can you please document the param in the README as well?

@ralimi
Copy link
Contributor Author

ralimi commented Nov 12, 2018

Oops. Done.

@davejrt
Copy link
Contributor

davejrt commented Nov 12, 2018

LGTM

@davejrt davejrt merged commit 90d62a6 into puppetlabs:master Nov 12, 2018
@ralimi ralimi deleted the kubelet-config branch November 12, 2018 07:56
@davejrt davejrt added this to the 3.1.0 milestone Nov 12, 2018
@nickperry
Copy link
Contributor

nickperry commented Nov 17, 2018

This approach only works for kubelet config that is not critical for starting the kubelet up in the first place. I think this needs to be made clear in the documentation.

For example, in our air-gapped environments we need to be able to tell the kubelet to source the infra / pause container from an internal repo rather than trying in vain to get it from the Internet. We do this with the 'pod-infra-container-image' argument to Kubelet. However the Kubelet can't get to a point where dynamic config is viable without infra pods being able to get their pause container.

Instead, of using this new kubeadm_extra_config param which renders settings under
apiVersion: kubelet.config.k8s.io/v1beta1
kind: KubeletConfiguration
section of config.yaml

we need to specify pod-infra-container-image under

apiVersion: kubeadm.k8s.io/v1alpha3
kind: InitConfiguration
nodeRegistration:
kubeletExtraArgs:

and

kind: JoinConfiguration
nodeRegistration:
kubeletExtraArgs:

in config.yaml. The module does not currently support setting kubeletExtraArgs, but I would like it to. We can't use the generic kubeadm_extra_config as it only gets merged with the yaml under kind: InitConfiguration, but not under kind: JoinConfiguration, meaning our worker nodes don't get the configuration they need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants