-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Add Node IPs to kubelet systemd service allowed IP addresses for cluster hardening #11290
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: hadi2f244 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @hadi2f244. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/ok-to-test |
@@ -107,7 +107,7 @@ kubelet_systemd_hardening: true | |||
# IP addresses, kubelet_secure_addresses allows you | |||
# to specify the IP from which the kubelet | |||
# will receive the packets. | |||
kubelet_secure_addresses: "localhost link-local {{ kube_pods_subnet }} 192.168.10.110 192.168.10.111 192.168.10.112" | |||
kubelet_secure_addresses: "localhost link-local {{ kube_pods_subnet }} {{ groups['all'] | map('extract', hostvars, ['ansible_host']) | join(' ') }}"" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep in mind that ansible_host
could potentially be set to a hostname or an FQDN.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. Also, as implemented in Kubernetes roles, by default it sets to proper host nodes and this variable is an option to specify the IP list when there are multiple interfaces. So I'll close this PR.
As implemented in Kubernetes roles, by default it sets to proper host nodes and this variable is an option to specify the IP list when there are multiple interfaces. So I'll close this PR. |
What type of PR is this?
/kind bug
What this PR does / why we need it:
Get all node IPs to the list of allowed IP addresses IPAddressAllow in the kubelet.service configuration to resolve an issue preventing kube-proxy pods from starting correctly when kubelet_systemd_hardening: true is applied to Kubernetes clusters.
Which issue(s) this PR fixes:
Fixes #11289
Special notes for your reviewer:
Does this PR introduce a user-facing change?: