terraform-aws-eks icon indicating copy to clipboard operation
terraform-aws-eks copied to clipboard

Ability to pass parameters to kubelet's config file

Open vchepkov opened this issue 3 years ago β€’ 7 comments

Currently we supply custom max-pod values via --kubelet-extra-args kubelet reports that flag has been deprecated and config file should be used instead

Flag --max-pods has been deprecated, This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.

It would be useful for the module to provide ability to supply kubelet's config parameters

vchepkov avatar Jul 26 '22 15:07 vchepkov

Because of the various different ways in which settings are passed to the bootstrap script, we only provide the minimum information necessary to join nodes to the cluster while letting users to provide additional functionality as needed through user data. This avoids having to keep up to date on things like this deprecation notice as well as the myriad of different ways these settings are passed to the kubelet

bryantbiggs avatar Jul 26 '22 15:07 bryantbiggs

@bryantbiggs, what would you recommend to do for this case? using sed command in pre_bootstrap_user_data to edit /var/lib/kubelet/kubeconfig directly ? Please advise. Thank you

vchepkov avatar Jul 26 '22 17:07 vchepkov

I don't know what your setup/configuration is, but the solution would most likely be implemented via user data in some shape or form. You can check our examples for references https://github.com/terraform-aws-modules/terraform-aws-eks/blob/master/examples/eks_managed_node_group/main.tf#L221-L231

bryantbiggs avatar Jul 26 '22 17:07 bryantbiggs

Right, so the choices are either hack bootstrap.sh, so it will populate /var/lib/kubelet/kubeconfig or hack /var/lib/kubelet/kubeconfig directly before script runs. From what I understand, that is the file that deprecation warning refers to

vchepkov avatar Jul 26 '22 17:07 vchepkov

I think you are looking for https://github.com/awslabs/amazon-eks-ami/issues/873

bryantbiggs avatar Jul 26 '22 17:07 bryantbiggs

That's exactly it, thanks

vchepkov avatar Jul 26 '22 17:07 vchepkov

if you come up with a better solution, please do share. The example I linked to was provided by a user of the module - it helps to share these solutions for others that might be running into similar situations

bryantbiggs avatar Jul 26 '22 17:07 bryantbiggs

closing for now with the information provided above

bryantbiggs avatar Aug 20 '22 20:08 bryantbiggs

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

github-actions[bot] avatar Nov 09 '22 02:11 github-actions[bot]