Why does docker ps not show my minikube's docker containers?

10/25/2018

I am running minikube using the instructions at

https://kubernetes.io/docs/tutorials/hello-minikube/

I started minikube:

$ minikube start --vm-driver=hyperkit

and verified that it is successfully running.

I am running 'Docker Community Edition' version 18.06.1-ce-mac73.

$ minikube ssh

is working fine.

However when I do

$ docker ps

on my mac os host, it doesn't show any containers. However, when I do

$ docker ps 

after doing minikube ssh, I see about 20 containers.

So, where are the docker containers really running? Why does docker ps not show any containers on my mac?

Thank you.

-- user674669
docker
kubernetes
minikube

3 Answers

10/25/2018

Docker containers are not running on your MAC host.

They are running on a VM where you can do minikube ssh to that VM.

The docker ps shows the containers in there inside that VM.

-- Ijaz Ahmad Khan
Source: StackOverflow

10/26/2018

You can use the following command to configure your Docker Host address:

eval $(minikube docker-env)

Then, when you run docker ps, you should see your containers. Read more here.

-- RafaƂ Leszko
Source: StackOverflow

10/25/2018

That's expected because you are using hyperkit driver to work as a hypervisor & launch lightweight virtual machines. Think of it as virtualbox launching VMs for you & complete k8s cluster is deployed into those VMs, all of them are well integrated.

Use below to get your virtual machine address or the server where these containers are actually running -

$ minikube ip

Ref - https://github.com/moby/hyperkit

-- vivekyad4v
Source: StackOverflow