diff --git a/internal/resources/templates/kubespray/inventory/group_vars/all.yml.tmpl b/internal/resources/templates/kubespray/inventory/group_vars/all.yml.tmpl index 09ffdbd..9026b7f 100644 --- a/internal/resources/templates/kubespray/inventory/group_vars/all.yml.tmpl +++ b/internal/resources/templates/kubespray/inventory/group_vars/all.yml.tmpl @@ -134,6 +134,3 @@ unsafe_show_logs: false ## If enabled it will allow kubespray to attempt setup even if the distribution is not supported. For unsupported distributions this can lead to unexpected failures in some cases. allow_unsupported_distribution_setup: false - -## Kubelet additional settings -kubelet_custom_flags: "--root-dir={{ .Orchestrator.KubeletDir }}" diff --git a/internal/resources/templates/kubespray/inventory/group_vars/k8s_cluster/k8s-cluster.yml.tmpl b/internal/resources/templates/kubespray/inventory/group_vars/k8s_cluster/k8s-cluster.yml.tmpl index 3acaf5f..0f5cb91 100644 --- a/internal/resources/templates/kubespray/inventory/group_vars/k8s_cluster/k8s-cluster.yml.tmpl +++ b/internal/resources/templates/kubespray/inventory/group_vars/k8s_cluster/k8s-cluster.yml.tmpl @@ -451,3 +451,7 @@ kubeadm_patches: enabled: false source_dir: {{ `"{{ inventory_dir }}/patches"` }} dest_dir: {{ `"{{ kube_config_dir }}/patches"` }} + +## Kubelet additional settings +kubelet_custom_flags: + - "--root-dir={{ .Orchestrator.KubeletDir }}" diff --git a/kubespray/inventory/group_vars/all.yml b/kubespray/inventory/group_vars/all.yml index 34998b0..936a703 100644 --- a/kubespray/inventory/group_vars/all.yml +++ b/kubespray/inventory/group_vars/all.yml @@ -128,6 +128,3 @@ unsafe_show_logs: false ## If enabled it will allow kubespray to attempt setup even if the distribution is not supported. For unsupported distributions this can lead to unexpected failures in some cases. allow_unsupported_distribution_setup: false - -## Kubelet additional settings -kubelet_custom_flags: "--root-dir=/app/k8s/kubelet" diff --git a/kubespray/inventory/group_vars/k8s_cluster/k8s-cluster.yml b/kubespray/inventory/group_vars/k8s_cluster/k8s-cluster.yml index 72e8986..353b5c8 100644 --- a/kubespray/inventory/group_vars/k8s_cluster/k8s-cluster.yml +++ b/kubespray/inventory/group_vars/k8s_cluster/k8s-cluster.yml @@ -404,3 +404,7 @@ kubeadm_patches: enabled: false source_dir: "{{ inventory_dir }}/patches" dest_dir: "{{ kube_config_dir }}/patches" + +## Kubelet additional settings +kubelet_custom_flags: + - "--root-dir=/app/k8s/kubelet" diff --git a/kubespray/project/roles/kubernetes/node/defaults/main.yml b/kubespray/project/roles/kubernetes/node/defaults/main.yml index 7b8438e..6c60c72 100644 --- a/kubespray/project/roles/kubernetes/node/defaults/main.yml +++ b/kubespray/project/roles/kubernetes/node/defaults/main.yml @@ -9,7 +9,7 @@ kubelet_bind_address: "{{ ip | default('0.0.0.0') }}" kube_resolv_conf: "/etc/resolv.conf" # Set to empty to avoid cgroup creation -kubelet_enforce_node_allocatable: "\"\"" +kubelet_enforce_node_allocatable: '""' # Set runtime and kubelet cgroups when using systemd as cgroup driver (default) kube_service_cgroups: "{% if kube_reserved %}{{ kube_reserved_cgroups_for_service_slice }}{% else %}system.slice{% endif %}" @@ -32,7 +32,6 @@ kube_node_addresses: >- {{ hostvars[host]['ip'] | default(fallback_ips[host]) }}{{ ' ' if not loop.last else '' }} {%- endfor -%} kubelet_secure_addresses: "localhost link-local {{ kube_pods_subnet }} {{ kube_node_addresses }}" - # Reserve this space for kube resources # Whether to run kubelet and container-engine daemons in a dedicated cgroup. (Not required for resource reservations). kube_reserved: false @@ -266,7 +265,6 @@ conntrack_modules: - nf_conntrack - nf_conntrack_ipv4 - ## Enable distributed tracing for kubelet kubelet_tracing: false kubelet_tracing_endpoint: 0.0.0.0:4317