Skip to content
Snippets Groups Projects
Commit 89847d56 authored by Ayaz Ahmed Khan's avatar Ayaz Ahmed Khan Committed by Antoine Legrand
Browse files

Explicitly defines the --kubelet-preferred-address-types parameter

to the API server configuration.

This solves the problem where if you have non-resolvable node names,
and try to scale the server by adding new nodes, kubectl commands
start to fail for newly added nodes, giving a TCP timeout error when
trying to resolve the node hostname against a public DNS.
parent dada9814
No related branches found
No related tags found
No related merge requests found
......@@ -78,6 +78,9 @@ kube_oidc_auth: false
## Variables for custom flags
apiserver_custom_flags: []
# List of the preferred NodeAddressTypes to use for kubelet connections.
kubelet_preferred_address_types: 'InternalDNS,InternalIP,Hostname,ExternalDNS,ExternalIP'
controller_mgr_custom_flags: []
scheduler_custom_flags: []
......
......@@ -51,6 +51,7 @@ spec:
- --kubelet-client-certificate={{ kube_cert_dir }}/node-{{ inventory_hostname }}.pem
- --kubelet-client-key={{ kube_cert_dir }}/node-{{ inventory_hostname }}-key.pem
- --service-account-lookup=true
- --kubelet-preferred-address-types={{ kubelet_preferred_address_types }}
{% if kube_basic_auth|default(true) %}
- --basic-auth-file={{ kube_users_dir }}/known_users.csv
{% endif %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment