Avoid System Performance issues with Docker Desktop

MouliVeera
3 min readOct 1, 2021

Replace Docker Desktop with Hyperkit

In my workstation[Mac], I have been using Docker Desktop and Minikube[Minikube is a utility you can use to run Kubernetes (k8s) on your local machine.]

Every time I start using the Docker Desktop it starts consuming high CPU, which was affecting my workstation performance.

Replace Docker Desktop with Hyperkit to avoid system performance issues
Get rid of Docker Desktop App

My Mac activity monitor shows as below.

CPU Load Activity

We have few more alternatives for Minikube to run in your local.

  • Docker
  • Hyperkit
  • Hyper-V, KVM
  • Parallels, Podman
  • VirtualBox (or) VMWare

Replacing Docker Desktop with Hyperkit will help you fix the performance issues.

To avoid system performance issues, we want to get rid of Docker Desktop, not Docker. Docker CLI will be useful.

Uninstall Docker Desktop

Goto Finder -> Applications -> Select Docker -> Right Click -> Move to Bin

Install Docker CommandLine

brew install docker

It installs Docker CLI, you can see the docker running status by running the below commands.

# docker info
Client:
Context: default
Debug Mode: false
Server:
ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
errors pretty printing info

It may show errors as we have not set the docker environment variables.

Set Docker environment variables

eval $(minikube -p minikube docker-env)

Check the docker running status.

# docker info

It shows docker running status with resource details. Also, it gives confirmation that the Docker CLI is working good.

Install Hyperkit

HyperKit is an open-source hypervisor for macOS hypervisor, optimized for lightweight virtual machines and container deployment.

brew install hyperkit

Check the version to make sure it is installed correctly.

hyperkit -v                                                                                               127 

hyperkit: 0.20200908
Homepage: https://github.com/docker/hyperkit
License: BSD

Try few docker commands to test.

# docker --help
# docker ps
# docker images

Lets start a Minikube K8s cluster using the hyperkit.

Kubernetes cluster using the Hyperkit driver

minikube start --driver=hyperkitπŸ˜„  minikube v1.23.0 on Darwin 11.5.2
✨ Using the hyperkit driver based on existing profile
πŸ‘ Starting control plane node minikube in cluster minikube
πŸ”„ Restarting existing hyperkit VM for "minikube" ...
🐳 Preparing Kubernetes v1.22.1 on Docker 20.10.8 ...
πŸ”Ž Verifying Kubernetes components...
β–ͺ Using image gcr.io/k8s-minikube/storage-provisioner:v5
🌟 Enabled addons: default-storageclass, storage-provisioner
πŸ„ Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default

Check nodes and pods using kubectl commands.

kubectl get nodes --context minikube
NAME STATUS ROLES AGE VERSION
minikube Ready control-plane,master 3h56m v1.22.1
----
kubectl get pods --context minikube -n kube-system
NAME READY STATUS RESTARTS AGE
coredns-78fcd69978-5f4vx 1/1 Running 1 (5m35s ago) 3h59m
etcd-minikube 1/1 Running 1 (5m35s ago) 3h59m
kube-apiserver-minikube 1/1 Running 1 (5m35s ago) 3h59m
kube-controller-manager-minikube 1/1 Running 1 (5m35s ago) 3h59m
kube-proxy-lhpb6 1/1 Running 1 (5m35s ago) 3h59m
kube-scheduler-minikube 1/1 Running 1 (5m35s ago) 3h59m
storage-provisioner 1/1 Running 4 (6m5s ago) 3h59m

Thanks for reading.

--

--

MouliVeera

Mouli is a seasoned DevOps Engineer with expertise in designing and optimising CI/CD pipelines, containerisation with Docker and Kubernetes.