HostPath Mapper
This feature is available in the vCluster Pro tier. Contact us for more details and to start a trial.
Virtual cluster internal logging relies on a separate component called the HostPath Mapper. This component resolves the virtual pod and container names to their physical counterparts.
If you don't map host paths, logs for vCluster pods are incorrectly resolved by log collectors such as Loki, ELK, and Fluentd.
vCluster Open Source​
Enabling the HostPath Mapper​
Set enabled: true
in the vCluster config to allow it to use the HostPath Mapper daemonset, which would be created in the next step.
controlPlane:
hostPathMapper:
enabled: true
Deploy the HostPath Mapper daemonset​
Now that the vCluster itself is ready, the HostPath Mapper component can be deployed. The following 2 pieces of information are needed for this:
- The HostPath Mapper has to be deployed in the same namespace as the target vCluster
- The
.Values.VclusterReleaseName
value when deploying this Helm Chart needs to be equal to the name of the target vCluster
For example if your vCluster is named my-vcluster
and is deployed in namespace my-namespace
then you should run
helm install vcluster-hpm vcluster-hpm \
--repo https://charts.loft.sh \
-n my-namespace \
--set VclusterReleaseName=my-vcluster
Once deployed successfully a new Daemonset component of the HostPath Mapper would start running on every node used by the vCluster workloads.
vCluster Pro​
The Centralized HostPath Mapper feature supports the following use cases in the virtual cluster:
- Container-based logging used by tools such as fluentd and Logstash.
- Pod-based logging used by Grafana Loki.
- Velero restic backups.
- KubeVirt workloads.
For details on configuring the vCluster and installing the Central HostPath Mapper, refer to the central-hostpath-mapper page under the platform documentation.