<p>I am trying to learn kubernetes and for the Kube core resources like APIServer or controller manager [ Considering the cluster has been created via kubeadm], If I look at the config yaml file located at /etc/kubernetes/manifest. I see that we pass the cert or key path in the command like below :-</p>
<p>--etcd-certfile=/etc/kubernetes/pki/apiserver-etcd-client.crt</p>
<p>We then also specify the path in the pods volume like below</p>
<ul>
<li>mountPath: /etc/kubernetes/pki
name: k8s-certs</li>
</ul>
<p>volumes:</p>
<ul>
<li>hostPath:
path: /etc/kubernetes/pki</li>
</ul>
<p>My question is what is the  need of passing the cert path with name in the command when it is ultimately getting read from the volume?</p>

James Stan
<ul>
<li>Location of cert file on the node <code>/etc/kubernetes/pki/</code></li>
<li>That folder on the host is mapped/mounted inside the container at location <code> /etc/kubernetes/pki</code> ( <code> mountPath: /etc/kubernetes/pki name: k8s-certs</code> &amp;&amp; <code>hostPath: path: /etc/kubernetes/pki</code>)</li>
<li>so in the command <code>--etcd-certfile=/etc/kubernetes/pki/apiserver-etcd-client.crt</code> is not referring to directory on the node , it is directing towards the path inside the container. in short it is reading from the volume not directly from node directory.</li>
</ul>
