Running Docker Inside a VM managed by Multipass

Anudha Mittal
2 min readOct 24, 2024

--

kube architecture:

containers → pods → nodes → clusters

Pods can be on the same node (hardware/vm), i.e. pods can technically share memory, processes, and anything that can be shared within the same hardware (?). Pods can communicate via any interprocess communication method (?). Or they can be configured not to, leading to a fine-grained config of isolation and shared resource, allowing optimization of resources in providing a microservice and minimizing falling apart due to functionality additions by different peeps.

Nodes require communication over tcp / udp (?) as technically different hardware.

Used multipass to launch a VM running ubuntu. Mounts were lost when restarted VM via multipass daemon on the host machine. Restarted the machine to release the locked files by the package manager. Checked that the locked files were no longer in use by using this command:

ps aux | grep ‘[a]pt’ → previously showed several processes, none after restart.

vm instance status launched via multipass

Since assigned ~ 1Gb memory to VM, insufficient for kube, which wants ~ 2Gb, and 1 CPU allocated to VM, kube wants at least 2:

[ERROR Mem]: the system RAM (953 MB) is less than the minimum 1700 MB

Installation for docker:

sudo apt-get install -y docker.io

sudo systemctl enable docker

sudo systemctl start docker

Installation for kube

Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).

And:

E: Could not get lock /var/lib/apt/lists/lock. It is held by process 35293 (apt-get)

Resolved by restarting instance.

sudo apt-get update — partial atm relevant output:

E: The repository ‘https://apt.kubernetes.io kubernetes-xenial Release’ does not have a Release file.

N: Updating from such a repository can’t be done securely, and is therefore disabled by default.

N: See apt-secure(8) manpage for repository creation and user configuration details.

installed kube (had to instal from a different location, host location changed spot in march 2024)

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response