Skip to content

Instantly share code, notes, and snippets.

@csantanapr
Last active October 26, 2024 15:11
Show Gist options
  • Save csantanapr/4110517e5359b4fc139afabfcd3aa9b4 to your computer and use it in GitHub Desktop.
Save csantanapr/4110517e5359b4fc139afabfcd3aa9b4 to your computer and use it in GitHub Desktop.
lima ubuntu 22.04

Using Lima for the Kubernetes - Enterprise Guide book

Book Github Repo: https://github.com/PacktPublishing/Kubernetes-An-Enterprise-Guide-Third-Edition

Install Lima https://github.com/lima-vm/lima

Create Lima VM Ubuntu 22.04 using x86 (arm64 not supported yet)

limactl start --name k8sbookclub --cpus 4 --memory 16 --arch x86_64 https://gist.githubusercontent.com/csantanapr/4110517e5359b4fc139afabfcd3aa9b4/raw/47a9a128296da455c3ec82c794e6bbf17b9a824e/ubuntu-22.04.yaml
limactl shell k8sbookclub

Clone the git repo

cd ~
git clone  https://github.com/PacktPublishing/Kubernetes-An-Enterprise-Guide-Third-Edition.git
cd Kubernetes-An-Enterprise-Guide-Third-Edition/

Chapter 1

cd chapter1
./install_docker.sh

Note: You need to reboot for $USER to be able to use `docker

sudo reboot

Then login back

limactl shell k8sbookclub
# This template requires Lima v0.7.0 or later.
images:
# Try to use release-yyyyMMdd image if available. Note that release-yyyyMMdd will be removed after several months.
- location: "https://cloud-images.ubuntu.com/releases/22.04/release-20241002/ubuntu-22.04-server-cloudimg-amd64.img"
arch: "x86_64"
digest: "sha256:55c687a9a242fab7b0ec89ac69f9def77696c4e160e6f640879a0b0031a08318"
- location: "https://cloud-images.ubuntu.com/releases/22.04/release-20241002/ubuntu-22.04-server-cloudimg-arm64.img"
arch: "aarch64"
digest: "sha256:2edb369b85141fbeff6c87c7d92e08f315ec236f639235e35429e4930d98e2de"
- location: "https://cloud-images.ubuntu.com/releases/22.04/release-20241002/ubuntu-22.04-server-cloudimg-armhf.img"
arch: "armv7l"
digest: "sha256:35e952e46c5659233f18cf866e9b998f142c29f6391c10615b5f2470d0463109"
# Fallback to the latest release image.
# Hint: run `limactl prune` to invalidate the cache
- location: "https://cloud-images.ubuntu.com/releases/22.04/release/ubuntu-22.04-server-cloudimg-amd64.img"
arch: "x86_64"
- location: "https://cloud-images.ubuntu.com/releases/22.04/release/ubuntu-22.04-server-cloudimg-arm64.img"
arch: "aarch64"
- location: "https://cloud-images.ubuntu.com/releases/22.04/release/ubuntu-22.04-server-cloudimg-armhf.img"
arch: "armv7l"
mounts:
- location: "~"
- location: "/tmp/lima"
writable: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment