<p>According to this <a href="https://github.com/kubernetes-sigs/kubespray/blob/master/docs/vars.md" rel="nofollow noreferrer">documentation</a>, Extra flags for the API server, controller, and scheduler components can be specified using the variables below, in the form of dicts of key-value pairs of configuration parameters that will be inserted into the kubeadm YAML config file:</p>
<ul>
<li><em><strong>kube_kubeadm_apiserver_extra_args</strong></em></li>
<li><em><strong>kube_kubeadm_controller_extra_args</strong></em></li>
<li><em><strong>kube_kubeadm_scheduler_extra_args</strong></em></li>
</ul>
<p>But I can't really figure out where to add them in ansible playbooks so that they can be rendered on the master node during the cluster deloyment.</p>
<p>I tried using this file <code>kubespray/roles/kubernetes/master/defaults/main/main.yml</code> and this file <code>kubespray/roles/kubespray-defaults/defaults/main.yaml</code> but it doesn't work for none of the two files, ansible doesn't deploy them, like if ansible doesn't read them.</p>
<p>Where the <code>kubeadm</code> YAML config file is located?</p>
<p>Can someone here help with these parameters management?</p>

nixmind
<p>As documented on <a href="https://kubespray.io/#/docs/ansible?id=group-vars-and-overriding-variables-precedence" rel="nofollow noreferrer">https://kubespray.io/#/docs/ansible?id=group-vars-and-overriding-variables-precedence</a>, you should take a look at <code>inventory/&lt;mycluster&gt;/group_vars/all/all.yml</code> and <code>inventory/&lt;mycluster&gt;/group_vars/k8s-cluster/k8s-cluster.yml</code> for the configuration of your cluster.</p>
<p>Where <code>inventory/&lt;mycluster&gt;</code> is a copy of the kubespray provided <a href="https://github.com/kubernetes-sigs/kubespray/tree/master/inventory/sample" rel="nofollow noreferrer"><code>inventory/sample</code> folder</a> with adaptations of the <code>inventory.ini</code> file and files inside <code>group_vars</code>.</p>
<p>Kubespray use the inventory layout proposed in <a href="https://docs.ansible.com/ansible/latest/user_guide/sample_setup.html#alternative-directory-layout" rel="nofollow noreferrer">https://docs.ansible.com/ansible/latest/user_guide/sample_setup.html#alternative-directory-layout</a></p>
<p>Whatever your layout, for group_vars to be loaded, the have to be in the same folder as the file referenced by the <code>--inventory-file/--inventory/-i</code> option or <code>defaults.inventory</code> config.</p>
<p>For example, if your inventory is the file <code>config/inventory</code>, you need to copy the sample inventory group_vars in <code>config/group_vars</code>.</p>
