Skip to main content
Version: 3.2

Central Hostpath Mapper

While it is possible to install a common logging solution such as FluentD or ELK stack on the host cluster and then use it inside the virtual cluster, there are certain use cases where you would want to install them directly on the virtual cluster. These solutions mount the node host paths directly to access the pod and container logs and rely on the filenames to be a certain format in order to map the logs to the appropriate pods. However inside a vcluster, this would not work as the vcluster rewrites the names of the pods to a vcluster specific format when it syncs the pods down to the host cluster.

Hostpath mapper was developed to support this by resolving the correct virtual pod and container names to their physical counterparts via the use of symbolic links. It can be enabled per vcluster and is installed as a Daemonset. This works well for a smaller cluster with fewer nodes and virtual clusters. However, as the number of nodes and virtual cluster increases, the number of pods required just for the hostpath mapper increase as we would have one daemonset per vcluster per node.

With Central Hostpath Mapper, this is optimized further where we now have just a one Central Hostpath Mapper daemonset installed on the host cluster that manages the hostpath remapping for all the vclusters created on this host cluster.

Pre-Requisites

This feature requires the Central Hostpath Mapper to be present in the host cluster. It is available as a default Loft App under the Apps Section. Make sure to install it beforehand for all the features to work correctly.

  1. Select the Projects field on the left menu bar.
  2. From the project drop-down menu, select the project you'd like to create the virtual cluster in.
  3. Click the Virtual Clusters option on the project pane.
  4. Click the button on the right side of the page.
  5. [Optional] select the cluster in which to create the virtual cluster.
  6. Click the to continue.
  7. Click the Advanced Options configuration tab and expand the 'Host Path Mapper' section.
  8. Toggle the slider Enable. This will add the 'loft.sh/hpm-enabled' annotation to the template metadata which will be automatically synced to the virtual cluster on creation. Secondly, it will add the 'rewrite-host-paths=true' as extraArgs to the helm values for the syncer.
  9. Finish configuring anything else you'd like on your virtual cluster, then click the button.