digitalocean / clusterlint

A best practices checker for Kubernetes clusters. 🤠
Apache License 2.0
542 stars 45 forks source link

Hostpath check: Checks if there are pods which use hostpath volumes #22

Closed varshavaradarajan closed 5 years ago

varshavaradarajan commented 5 years ago

Background: https://kubernetes.io/docs/concepts/storage/volumes/#hostpath

Watch out when using this type of volume, because:

Pods with identical configuration (such as created from a podTemplate) may behave differently on different nodes due to different files on the nodes when Kubernetes adds resource-aware scheduling, as is planned, it will not be able to account for resources used by a hostPath the files or directories created on the underlying hosts are only writable by root. You either need to run your process as root in a privileged Container or modify the file permissions on the host to be able to write to a hostPath volume

varshavaradarajan commented 5 years ago

@timoreimann - I'll address all the test related feedback in a separate PR like you suggested. Can you please take a look at the rest of the changes? Thanks a lot! :)