Is it possible to launch a kubernete as a docker container?

I am very new to kubernetes and trying to comprehend it, as well as configure it locally to try something on it.

It is confusing that I am running on a Windows machine.

The Getting Started documentation on github says you must run Linux to use the kubernets.

How docker works on windows, I was wondering if you could create an instance of kubernetes as a container in the loader windows and use it to manage the rest of the cluster in the same docker instance window.

From reading the installation instructions, it seems that docker, tunnels, and something called etcd should all run in parallel on the same host operating system ... But part of me thinks it's possible

  • Run docker, boot up the 'default' machine.
  • Create kubernetes container - configure communication with an existing docker default machine
  • Use kubernetes to manage your existing docker.

A trumpet sleep? Wrong stupidity? I see that there are several options for running it on a stray instance. Does this mean that docker, etcd and kubernetes are in the same virtual machine (which, in turn, creates a cluster of virtual machines in it?)

I feel like I need to paint a picture of how it all looks like physical equipment and โ€œmemory boxesโ€ to really wrap my head around it.

+5
source share
2 answers

On Windows, you will need docker-machine and boot2docker VM to run any docker- related one.
There are no (so far) "dockers for Windows".

Please note that issue 7428 mentions "Cannot start tunnels in boot2docker."
Therefore, even if you follow the instructions (from the default virtual machine created using the docking machine), you may get errors :

โžœ workspace docker run --net=host -d -v /var/run/docker.sock:/var/run/docker.sock gcr.io/google_containers/hyperkube:v0.14.2 /hyperkube kubelet --api_servers=http://localhost:8080 --v=2 --address=0.0.0.0 --enable_server --hostname_override=127.0.0.1 --config=/etc/kubernetes/manifests ee0b490f74f6bc9b70c1336115487b38d124bdcebf09b248cec91832e0e9af1d โžœ workspace docker logs -f ee0b490f74f6bc9b70c1336115487b38d124bdcebf09b248cec91832e0e9af1d W0428 09:09:41.479862 1 server.go:249] Could not load kubernetes auth path: stat : no such file or directory. Continuing with defaults. I0428 09:09:41.479989 1 server.go:168] Using root directory: /var/lib/kubelet 

An alternative would be to try a full-fledged Linux virtual machine (for example, the latest version of Ubuntu), rather than a Winchester VM (based on the TinyCore distro ).

+3
source

All k8s components can be lifted using the hyperkube, which helps you create a container container. If you can run dockers in windows, this will probably work. I personally have not tried this on windows.

+1
source

Source: https://habr.com/ru/post/1236286/


All Articles