When to choose command over args? especially when working with additional logging or inti containers?
Questions ask for command but most the docs references use args and it could be achieved with either of it.
Secondly, in exam I found it little confusion about pod with local volume mount. Question did not say I can use emtrydir{} and it did not say I need to use persistent volume either. However, on the top where it had document to refer link it also had a link for persistent volume. it causes delay and time wasting for sure. I should have skipped those question and save for the last.
It depends upon what’s set as ENTRYPOINT AND CMD in the container. If the container uses a shell as an entry point, it isn’t going to matter, so using args will be fine. Sometimes you definitely want to replace whatever is running as the entrypoint, so command would be required.
As for local: it’s an official volume type that’s very similar to hostPath. So if they say use a “local volume”, they mean, use the “local” volume type.
Yes local volume type mapped as the emptyDir{} I would assume. But if I had gone by the reference link then I would end up using hostpath or local persistent volume with node affinity
Don’t think you’re correct here. Here’s the docs:
A local
volume represents a mounted local storage device such as a disk, partition or directory.
Local volumes can only be used as a statically created PersistentVolume. Dynamic provisioning is not supported.
Compared to hostPath
volumes, local
volumes are used in a durable and portable manner without manually scheduling pods to nodes. The system is aware of the volume’s node constraints by looking at the node affinity on the PersistentVolume.