0

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.

Community
  • 1
  • 1
Bar Kedem
  • 575
  • 1
  • 6
  • 13

2 Answers2

0

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
  • 18,151
  • 28
  • 132
  • 204
  • Thanks for the response! I have been using the cloud shell as well, but can I have my docker images pushed/created there? since I have my project's code locally on my laptop. – Bar Kedem Nov 17 '17 at 18:12
  • yes, Its comes with docker installed, you should be able to build the image there. – sfgroups Nov 17 '17 at 19:50
  • The problem is that my project's code sits locally on my laptop. I can't build it in the cloud shell, since the cloud shell doesn't know my code nor my locally created images. – Bar Kedem Nov 18 '17 at 15:53
0

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
  • 19,068
  • 5
  • 80
  • 116
  • Thank you for the answer, I am working with Minikube already, but my problem is with finding a proper way to push my images to gcloud repository, and in general finding the proper way to set everything up for production as well (which minikube can't help with) – Bar Kedem Nov 17 '17 at 18:10