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: don't specify hostname-override if cloudprovider is set to aws #3582

Merged
merged 1 commit into from
Nov 8, 2023

Conversation

etungsten
Copy link
Contributor

@etungsten etungsten commented Nov 8, 2023

Issue number:
Provides workaround for #3525

Description of changes:
This is only applicable to <1.27 kubelet since 1.27 removes the aws in-tree cloud provider.

Testing done:
Set cloud-provider to aws, hostname-override goes away.

bash-5.1# apiclient set kubernetes.cloud-provider=aws
bash-5.1# cat /etc/systemd/system/kubelet.service.d/exec-start.conf 
[Service]
ExecStart=
ExecStart=/usr/bin/kubelet \
    --cloud-provider aws \
    --kubeconfig /etc/kubernetes/kubelet/kubeconfig \
    --config /etc/kubernetes/kubelet/config \
    --container-runtime=remote \
    --container-runtime-endpoint=unix:///run/containerd/containerd.sock \
    --containerd=/run/containerd/containerd.sock \
    --root-dir /var/lib/kubelet \
    --cert-dir /var/lib/kubelet/pki \
    --node-ip ${NODE_IP} \
    --node-labels "${NODE_LABELS}" \
    --register-with-taints "${NODE_TAINTS}" \
    --pod-infra-container-image ${POD_INFRA_CONTAINER_IMAGE}

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

This is only applicable to <1.27 kubelet since 1.27 removes the aws
in-tree cloud provider.
Copy link
Contributor

@yeazelm yeazelm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@etungsten etungsten merged commit 704dd51 into bottlerocket-os:develop Nov 8, 2023
46 checks passed
@etungsten etungsten deleted the kubeletwhy branch November 8, 2023 19:19
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