Host path mapper
Log collection on shared nodes requires a separate component called the HostPath Mapper. This component maps the cluster's pod and container names to their names on the control plane cluster.
On shared nodes, enable the HostPath Mapper to collect pod logs. vCluster renames pods when it syncs them to the control plane cluster, so log collectors that read log files from the nodes can't match those files to the cluster's pods without it. Clusters on private nodes, including vCluster Standalone and the Docker driver, don't support it. To choose a log collection approach, see Logging and, with vCluster Platform, Choose a log collection approach.
vCluster Open Source​
HostPathMapper v0.2.3 and later versions are incompatible with vCluster that have toHost namespace syncing enabled (sync.toHost.namespaces).
Each release of the HostPathMapper tracks a specific vCluster version, with which it is fully-compatible. Before installation, please refer the release notes of your intended HPM version to verify compatibility with your vCluster setup.
Enable the HostPath Mapper​
Set enabled: true in the vCluster config to allow it to use the HostPath Mapper DaemonSet.
controlPlane:
hostPathMapper:
enabled: true
Deploy the HostPath Mapper DaemonSet​
After setting up the vCluster, deploy the HostPath Mapper component. Before you deploy the HostPath Mapper component, make sure the following requirements are met:
- Deploy the HostPath Mapper in the same namespace as the vCluster.
- Set the
.Values.VclusterReleaseNamefield in the Helm chart to match the vCluster name.
For example, if the vCluster name is my-vcluster and the namespace is my-namespace, run the following command:
helm install vcluster-hpm vcluster-hpm \
--repo https://charts.loft.sh \
-n my-namespace \
--set VclusterReleaseName=my-vcluster
After deployment, the HostPath Mapper DaemonSet starts running on every node that hosts vCluster workloads.
Enterprise feature​
The Central HostPath Mapper enables the following in a 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 more information about configuring vCluster and installing the Central HostPath Mapper, see Central HostPath Mapper in the platform documentation.
Config reference​
For every field under controlPlane.hostPathMapper, see the controlPlane reference.