How to setup Kubernetes & Docker local environment for GCE on Windows 10 Home Edition?

11/15/2017

I am new to Kubernetes and Docker, and trying to setup a good environment for working with GCE using the gcloud cli.

Since I am using Windows 10 Home Edition, I realized my only option to use Docker is installing Docker Toolbox, so any Docker commands can be run only from a VM (docker-machine, a boot2docker). It also means, every time I want to create a docker image, I have to copy my local project folder to a share folder which the docker-machine would see, in order to build its image.

The docker-machine is a light version of linux, so it's not very user-friendly and difficult to use gcloud cli from.

I managed to work it all out up to the point where I want push my local docker image to my google's private registry.

gcloud cli is installed on my actual machine, can't be installed on the light-weight linux VM, so when I try to push the image from my Windows Powershell using:

gcloud docker -- push gcr.io/..../..

I receive the following error:

ERROR: Docker CLI operation failed:

unknown flag: --email

See 'docker login --help'.

ERROR: (gcloud.docker) Docker login failed.

First, I'm not even sure if the image would be recognized, since it has been created on the docker-machine.

Second, I could not login to docker on my actual machine, since docker could not be installed, and any docker command should be made from inside the docker-machine.

So basically, now I'm stuck without being able to push my image. I feel like the whole process from the start has been very complicated, so it all made me wonder about my whole setup.

My question is, what would be the appropriate way to setup my environment for a smooth flow?

If you think the flow I described, given the fact I've been using Windows 10 Home, is the best I can achieve, I would appreciate your help with solving the pushing issue with the google cli.

-- Bar Kedem
docker
docker-toolbox
gcloud
kubernetes
windows

2 Answers

11/15/2017

To get a local Kube environment you should also take a look at Minikube: https://github.com/kubernetes/minikube

It uses docker-machine and thus supports the virtualbox docker-machine driver, which should work on Windows 10 Home (it doesn't require Hyper-V).

Note that Docker (where I work) is working on Kube support in Docker for Mac and Windows: https://blog.docker.com/2017/10/docker-for-mac-and-windows-with-kubernetes-beta/

... although Docker for Windows won't work on Windows 10 Home, because Hyper-V is not enabled on that Windows version.

-- friism
Source: StackOverflow

11/15/2017

Do you have option of using cloud shell? it works in browser and comes with all the tools pre-installed. https://cloud.google.com/shell/docs/quickstart.

if you want to use your laptop. install virutalbox and create centos Linux, then you can install all the tool on it. you should be able login using putty for your centos Linux.

-- sfgroups
Source: StackOverflow