To read the memory and CPU count of your running Minikube instance, you can use the following commands:
The minikube status
command provides the overall status of your Minikube instance, but it does not show memory or CPU allocation directly. Instead, use the next command.
To see the memory and CPU settings for Minikube, use the minikube config view
command to display the current configuration.
minikube config view
This will show the configuration for memory and CPU if you have set them previously using the minikube config set
command.
You can check the allocated resources (memory and CPU) for the running Minikube virtual machine by using:
docker inspect minikube | grep -E '"Memory":|"NanoCpus":'
This will display the memory (in bytes) and CPU settings (in nanoseconds) of the Minikube Docker container.
If you're using VirtualBox as the driver, use the following command to check the VM details:
VBoxManage showvminfo minikube | grep -E 'Memory size|CPU count'
This will show the memory size (in MB) and CPU count allocated to the Minikube VM.
To see CPU and memory resource limits for Minikube system components, you can use kubectl
:
kubectl top nodes
This shows the current CPU and memory usage on the Minikube node (as well as other nodes if any are available).
Alternatively, to check resource usage for pods:
kubectl top pod -A
This command shows the CPU and memory usage of all the pods across all namespaces.
If needed, you can SSH into the Minikube virtual machine and run typical Linux commands like free -h
to check memory usage or nproc
to see the CPU count:
minikube ssh
Once inside the Minikube VM, run:
- To check memory:
free -h
- To check CPU count:
nproc