---
title: Multipass: Mount Host Volume
description: If you're using Multipass you might need to mount a volume to gain access to resources on your host machine, here's how to do it.
date: 2021-03-12
tags: Multipass, Microk8s, k8s
source: https://brianchildress.co/blog/multipass-mount-host-volume
---

# Multipass: Mount Host Volume

I've recently been exploring solutions for local development of a robust microservices platform that is using [Kubernetes (k8)](https://kubernetes.io/) in production. The basic idea is that I have an application with a few services, a user interface (UI), database, etc. that I want to develop features for in an environment as close to the real production environment as possible. We've recently moved to Kubernetes to support production and I want parity for local development as well. I need something easy to setup, configure, and extend to the entire development team. 

The tool that is most interesting currently is [MicroK8s](https://microk8s.io/). MicroK8s uses a virtual machine (VM) provisioned my [Multipass](https://multipass.run/) to layer a Kubernetes implementation on top. This solution gets really close to the real-world which I like. 

For local development I also want a very quick feedback cycle, i.e. I save changes in my local code base and I want to see the results of that local change right away. To achieve this I need to mount my a folder ("volume") from my local machine to the VM provisioned by Multipass which can then be used by Microk8s in the Kubernetes implementation.

`
/folder-on-local-machine --> /volume-on-vm --> /volume-on-k8s-pod
`

With Multipass installed on my local machine and a VM running, run the following command in the terminal:

```sh
multipass mount /path-to-local-folder <name-of-vm>:/path-on-vm
```

Example:

```sh
multipass mount ./api-server microk8s-vm:/api
```

I'm still exploring this tool chain for local development, but I think this might be part of a workable solution.
