We know that mesosphere provides mesosphere fetcher in DCOS to download resources into the sandbox directory. Does Kubernetes provides anything similar to same?
While Kubernetes does not have a feature like Mesosphere Fetcher, it is still possible to copy / download resources into a Docker container using the following ways:
COPY
and ADD
copy resources from the host into the container.ADD
supports tar extraction and remote URLs too.wget
curl
lynx
tar
gunzip
No. Kubernetes does not have any built-in feature to download and inject files into a container the way Mesos does.
The Mesos fetcher feature existed before Docker image support, in fact. Prior to images, the fetcher was the primary way to download the executable and any supporting files. Kubernetes never needed that feature because it requires a container image. That said, having both be optional can be useful.
The Mesos fetcher is supported by Mesos, Marathon, and Mesosphere DC/OS.
Kubernetes could hypothetically add support for arbitrary file fetching in the future, but there hasn’t been a lot of demand, and it would probably require either container dependencies within a pod (to use a controller-injected sidecar), a kubelet plugin (to download before container start), or a native fetcher-like feature.