InfoHeap
Tech
Navigation
  • Home
  • Tutorials
    • CSS tutorials & examples
    • CSS properties
    • Javascript cookbook
    • Linux/Unix Command Line
    • Mac
    • PHP
      • PHP functions online
      • PHP regex
    • WordPress
  • Online Tools
    • Text utilities
    • Online Lint Tools
search

Mac tutorials

  • Brew
  • Chrome enable webgl on old macbooks
  • How to change computer display name on Mac
  • How to change default system voice for text-to-speech on Mac
  • How to install drupal on Mac usin MAMP
  • How to remove hard drive icon from mac desktop
  • How to use rrdtool plot traffic from network interface
  • How to view your WiFi password on Mac
  • Mac - change desktop icons size
  • Mac - how to take timed screenshot
  • Mac - how to always show scroll bar
  • Mac - how to change default location for screenshots
  • Mac - how to open apps not from App Store
  • Mac - how to take screenshots
  • Mac - how to use kubernetes with Lima-VM
  • Mac - kubernetes minikube - create deployment
  • Mac - make spotlight search faster
  • Mac - show volume icon on menu bar
  • Mac Command Line
  • Mac Finder
  • Mac Preview
  • Mac m1 - How to Install Kubernetes with kind
  • Mac m1 - How to Install Kubernetes with minikube
  • Mac m1 - minikube - create multi node kubernetes cluster
  • Mac podman quick start guide
  • NestJS Quick start tutorial on Mac
  • NextJS Quick start tutorial on Mac
  • Vagarant quick start guide on Mac
  • Windows on Mac
  • minikube kubernetes - create deployment with multiple replica and load balancer
  • minikube kubernetes - how to access service IP endpoint using curl
  • minikube kubernetes - how to access specific pod IP endpoint using curl
 
  • Home
  • > Tutorials
  • > Mac

Mac – how to use kubernetes with Lima-VM

on Jan 1, 2023

Lima is Linux virtual machines (on macOS, in most cases). Lima launches Linux virtual machines with automatic file sharing and port forwarding (similar to WSL2), and containerd. Lima can be considered as a some sort of unofficial “containerd for Mac”. Lima is expected to be used on macOS hosts, but can be used on Linux hosts as well.

Steps to install Lima-VM (alternative to docker) and use it with kubernetes on Mac:

  1. Instal lima
    brew install lima
  2. start lima
    limactl start
  3. Check uname
    lima uname -a
    Linux lima-default 5.19.0-26-generic #27-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 23 20:49:05 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux
  4. Open shell to VM
    lima
  5. Create a container using lima directly
    lima nerdctl run -p 8001:80 --name nginx -d nginx
  6. List all containers
    lima nerdctl ps -a
    CONTAINER ID    IMAGE                                  COMMAND                   CREATED               STATUS     PORTS                     NAMES
    3c57f17c0986    docker.io/library/nginx:latest         "/docker-entrypoint.…"    About a minute ago    Up         0.0.0.0:8081->80/tcp      nginx
  7. Get a shell to above container
    lima nerdctl exec -it nginx /bin/bash
  8. Stop, rm and start container again
    lima nerdctl stop nginx
    lima nerdctl rm nginx
    lima nerdctl start nginx
  9. Install minikube and start it using drive qemu
    brew install minikube
    minikube start --driver=qemu
    minikube dashboard
  10. Create a simple pod (nginx) using kubectl
    kubectl apply -f https://k8s.io/examples/pods/simple-pod.yaml
  11. Get a shell on nginx pod
    kubectl exec -it nginx -- /bin/bash
    (Please note that this container is attached to the pod and different from container created above using lima nerdctl)
  12. To list instances, stop and delete
    limactl list
    limactl stop
    limactl delete default

Suggested posts:

  1. Mac – create a one container pod and get shell to it
  2. Docker container – handy commands
  3. How to use wildcard in robots.txt
  4. Mac – enable and use kubernetes in docker
  5. Docker how to add a user to group docker on Linux
  6. Chrome extension tutorial – access active page dom
  7. Mac m1 – How to Install Kubernetes with kind
  8. Mac docker minikube kubernetes – how to get shell access to container
Share this article: share on facebook share on linkedin tweet this submit to reddit
Posted in Tutorials | Tagged Kubernetes, Mac
  • Browse content
  • Article Topics
  • Article archives
  • Contact Us
Popular Topics: Android Development | AngularJS | Apache | AWS and EC2 | Bash shell scripting | Chrome developer tools | Company results | CSS | CSS cookbook | CSS properties | CSS Pseudo Classes | CSS selectors | CSS3 | CSS3 flexbox | Devops | Git | HTML | HTML5 | Java | Javascript | Javascript cookbook | Javascript DOM | jQuery | Kubernetes | Linux | Linux/Unix Command Line | Mac | Mac Command Line | Mysql | Networking | Node.js | Online Tools | PHP | PHP cookbook | PHP Regex | Python | Python array | Python cookbook | SEO | Site Performance | SSH | Ubuntu Linux | Web Development | Webmaster | Wordpress | Wordpress customization | Wordpress How To | Wordpress Mysql Queries | InfoHeap Money

Copyright © 2025 InfoHeap.

Powered by WordPress