cloud sdk not installed on google vm instance

1,824 views
Skip to first unread message

Montassar Dridi

unread,
Nov 30, 2016, 7:46:28 PM11/30/16
to gce-discussion
I thought the gcloud and gsutil command are supported in google compute engine instances, but when I run the command gcloud init I get this error -bash: gcloud: command not found

Kamran (Google Cloud Support)

unread,
Nov 30, 2016, 10:05:07 PM11/30/16
to gce-dis...@googlegroups.com

Hello Montassar,

As described in this article if you are using a Google Compute Engine VM, you should already have the Cloud SDK preinstalled on that image. That being said, can you elaborate further on the question and provide more information about the image that you used to create your VM. Is it a custom image or a GCE preconfigured public image? If it's a GCE public image, what are operating system, version and date of the image? You can find this information under REST link in the image's description page:


In the case that you're using a custom image that may not have Cloud SDK preinstalled on it, you can visit this document for instructions on how to download and install Google Cloud SDK on different operating systems, 

Sincerely,

Montassar Dridi

unread,
Nov 30, 2016, 10:28:15 PM11/30/16
to gce-discussion
Hello kamran
thanks for your respond
my vm instances were created through container engine cluster and I tried to install the cloud sdk on them but when I use the wget to download the package I get this 
google-cloud-sdk-135.0.0-linux-x86_64.tar.gz: Read-only file systemCannot write to 'google-cloud-sdk-135.0.0-linux-x86_64.tar.gz' (Success).

Kamran (Google Cloud Support)

unread,
Dec 1, 2016, 6:35:37 PM12/1/16
to gce-discussion

Hello Montassar,

If you're downloading Google Cloud SDK to a Container Engine node (gci node image), I'd recommend consulting this table for a list of paths, permissions and their recommended usage.

Please note that you cannot install software packages on a host with the gci image (that is, outside of containers) or upgrade software packages independently. However, the gci node image includes some common debugging tools in the image and provides a toolbox wrapper to run debugging tools of your choice. For more information on how to use toolbox wrapper please visit this article.
 
I hope this helps.

Sincerely,

Montassar Dridi

unread,
Dec 2, 2016, 1:01:32 AM12/2/16
to gce-discussion
Hi kAMRAN
thank you so much for your assistance, that was really helpful.
I have another question, it does concern kubernetes pods, I'm trying to install docker on them, is that possible? 
I tried to do it before with a debian pod by following this link https://docs.docker.com/engine/installation/linux/debian/#/debian-jessie-80-64-bit but no luck!!
again i appreciate your help

Kamran (Google Cloud Support)

unread,
Dec 2, 2016, 8:58:31 PM12/2/16
to gce-discussion
Hi Montassar,

Are you installing Docker on Kubernetes Nodes or inside the Pod containers? Can you provide me with the commands and the errors messages that you're getting?

Sincerely,

Montassar Dridi

unread,
Dec 2, 2016, 9:04:10 PM12/2/16
to gce-discussion
HEllo Kamran

yes on the pod container and got this error 
Cannot connect to the Docker daemon. Is the docker daemon running on this host?

Kamran (Google Cloud Support)

unread,
Dec 2, 2016, 11:05:06 PM12/2/16
to gce-discussion

Hey Montassar,

By default, Docker containers are “unprivileged” and cannot, for example, run a Docker daemon inside a container. This is because by default a container is not allowed to access any devices, but a “privileged” container is given access to all devices.

When the operator executes docker run --privileged, Docker will enable to access to all devices on the host as well as set some configuration in AppArmor or SELinux to allow the container nearly all the same access to the host as processes running outside containers on the host.

To read more about “privileged” mode for containers visit this blog post.

Sincerely,

Montassar Dridi

unread,
Dec 2, 2016, 11:11:52 PM12/2/16
to gce-discussion
I will test it and see how it goes 
thank you so much kamran, you have been so helpful, I do owe you so much, I appreciate it a lot.
Best regards
Reply all
Reply to author
Forward
0 new messages