kelseyhightower / kubernetes-the-hard-way

Bootstrap Kubernetes the hard way. No scripts.
Apache License 2.0
40.72k stars 13.96k forks source link

Error: mkdir: cannot create directory ‘/var/lib/kubelet’ #775

Open stanfordpeng opened 5 months ago

stanfordpeng commented 5 months ago

Error: mkdir: cannot create directory ‘/var/lib/kubelet’

It has been created in the previous section: https://github.com/kelseyhightower/kubernetes-the-hard-way/blob/master/docs/04-certificate-authority.md#distribute-the-client-and-server-certificates

zatricky commented 4 months ago

If following the steps in order then it would have been done correctly in 04 and there would be no error.

This change would make it so the user doesn't have to read and understand what they are doing, putting it closer to simply being a fire-and-forget deploy script, which is counter to my understanding of the aim of the repo. :-|

My suggestion if you insist on a change would be to put a comment along the lines of "Note that the /var/lib/kubelet folder was created on each node in a previous step in 04".

jasonwashburn commented 4 months ago

If following the steps in order then it would have been done correctly in 04 and there would be no error.

This change would make it so the user doesn't have to read and understand what they are doing, putting it closer to simply being a fire-and-forget deploy script, which is counter to my understanding of the aim of the repo. :-|

That's a fair take as well...fixing it either way (removing it, or adding -p) makes sense to me. I would lean against leaving it as is, knowing the error will get thrown though.