what's the different between gcloud components tools and the original tools? - gcloud

As the gcloud components doc said, we can install some tools like: minikube, kubectl using the below command:
gcloud components install minikube
What's the difference between the tools(minikube, kubectl) installed by gcloud components install command and the original tools minikube?
Does gcloud sdk have any customization or restrictions on these tools?
Can I use the original minikube and kubectl(e.g. installed by brew install kubectl command) to replace the gcloud component tools?

As far as I know, the only difference is the package manager and how you installed the component. Cloud SDK pulls the external components based on the latest version of the SDK. As example, by updating to the latest SDK (as of now 315.0.0), you'll be able to install Minikube 1.14.0. Checking the version of this component will also display a commit version that you can check on the official repository.
If you need to work on a feature that is available on the latest version, then I suggest that you continue using Homebrew. However if not, and you want your components managed by Google, then installing it via Cloud SDK is also a good choice.

Related

Manage API from Cloud Shell Editor

I try to manage API keys from Cloud Shell Editor to restore an API (autocreated by Firebase) that I deleted.
I try to run gcloud alpha services api-keys undelete BYuihiuYUIGyugIIHU... but i receive Error: ERROR: (gcloud.alpha.services.api-keys.undelete) NOT_FOUND: Method not found.
I try to run (for testing) gcloud alpha services api-keys list command but I receive error: ERROR: (gcloud.alpha.services.api-keys.list) Projects instance [PROJECT_ID] not found: Method not found.
What I'm wrong?
Thank you so much
thank you so much for answer.
The result of commands is:
version -->
Google Cloud SDK 327.0.0
alpha 2021.02.05
beta 2021.02.05
bq 2.0.64
core 2021.02.05
gsutil 4.58
kpt 0.37.1
minikube 1.17.1
skaffold 1.19.0
Component list -->
Installed │ gcloud Alpha Commands │ alpha │ < 1 MiB
I tried to remove and reinstall gcloud-sdk with:
sudo apt purge --autoremove google-cloud-sdk
and sudo apt-get install google-cloud-sdk but nothing has changed
It is probable that (for some reason), your Cloud Shell is not running the latest version of gcloud (Cloud SDK). The latest version is 328.0.0. My Cloud Shell is running 327.0.0 includes the alpha commands (see below) and the commands work for me.
What is the result of the following in Cloud Shell?
gcloud version
gcloud components list does the list include gcloud Alpha Commands?
I'm confident that gcloud Alpha Commands are installed (by default) on Cloud Shell and so suspect that, for some reason, you're running an outdated version of Cloud SDK.
I'm unsure how you can install gcloud Alpha Commands under Cloud Shell if the component isn't installed because using gcloud commands will error under Cloud Shell but it should (!) tell you which apt-get install command you will need:
gcloud components install alpha
I assumed it was not permitted (since Cloud Shell is managed) but it is possible to self-update Cloud SDK in Cloud Shell. The following update will again tell you that you can't run the command in Cloud Shell but, it should give you a set of apt-get install commands that you can use to perform the update:
gcloud components update
Here's a link to the release notes for Cloud SDK. It's not obvious from these notes when these methods were added.

minikube --kubernetes-version --> Which version are supported?

I know that you can start minikube with a different K8s version with --kubernetes-version.
But how can I let minikube list all versions which it supports?
I had a look at the command reference of start, but could not find a way up to now.
In my case I would like to know which one is the latest v1.17.X version which is supported.
On the github release page I found that v1.17.12 is today the latest version in the 17.x series. But it would be nice, if I minikube or kubectl could tell me this.
#Esteban Garcia is right but I would like to expand on this topic a bit more with the help of the official documentation:
By default, minikube installs the latest stable version of Kubernetes
that was available at the time of the minikube release. You may select
a different Kubernetes release by using the --kubernetes-version
flag, for example:
minikube start --kubernetes-version=v1.11.10
minikube follows the Kubernetes Version and Version Skew Support
Policy, so we guarantee support for the latest build for the last
3 minor Kubernetes releases. When practical, minikube aims to support
older releases as well so that users can emulate legacy environments.
For up to date information on supported versions, see
OldestKubernetesVersion and NewestKubernetesVersion in
constants.go.
The following command may be helpful:
minikube config defaults kubernetes-version

Reverting to old Google Cloud SDK shell version

I am trying to deploy a Java project into Google App Engine from Eclipse and am blocked by JSPs.
Everything JSP makes my app not capable of deploying due to "'utf8' codec can't decode byte" error.
Not trying to insert any strange (not UTF-8) character, everything Eclipse is set to UTF-8.
Tried to send archives which were OK with the Google App Engine Tools for Eclipse (soon to be deprecated), won't deploy.
I've seen threads regarding reverting the Google Cloud Tools for Eclipse plugin to previous version (1.58 seemed to avoid a few problems) being a possible solution to these recent errors but I have a problem installing, the batch just tells me "Install will exit" ?!
Tried to uninstall previous (latest) versions before, made sure I was launching the bundled-python batch, still not capable of installing an old version of the Google Cloud SDK shell.
Would be glad if anybody had any suggestion at what makes my install fail.
Thanks in advance.
There are a few ways you can get older version of Google Cloud SDK.
Download versioned archive
(If you are on windows) Grab google-cloud-sdk-XXX.0.0-windows-x86_64-bundled-python.zip file.
Unzip it to some\dir
Add some\dir\google-cloud-sdk\bin directory to your system path
Restart your command prompt (or other apps which depend on gcloud) and run for example gcloud info, it should be fully functional installation, no need to run install.bat.
Alternatively, use existing SDK installation and gcloud component manager to go back to previous versions. For example
gcloud components update --version 158.0.0
target by version number using apt-get :
sudo apt-get install google-cloud-sdk=294.0.0-0

Enabling component manager in gcloud CLI

I made a fresh install of gcloud for ubuntu as instructed here. I want to use the additional components offered by gcloud like kubectl and docker.
So, when I tried typing gcloud components install kubectl, I get an error saying that The component manager is disabled for this installation. Here is the full error message:
This is because you installed google-cloud-sdk with a package manager like apt-get or yum.
kubectl:
If you look here you can see how to install additional components. Basically sudo apt-get install kubectl.
If by docker you mean the docker-credential-gcr then I don't know if there's a way to install using a package manager, can't seem to find it. Perhaps ou can try the github repo. Mind you, you don't need this for commands like gcloud docker -- push gcr.io/your-project/your-image:version.
If you mean actual docker for building images and running them locally, that's standalone software which you need to install separately, instructions here.
Alternatively, you can uninstall google-cloud-sdk with apt-get and then reinstall with interactive installer, which will support the suggested gcloud components install *

Cloud Foundry CLI version 6.11.2 or later is required for the IBM Containers plug-in. Upgrade your Cloud Foundry CLI installation to continue

cf -v
cf version 6.13.0-e68ce0f-2015-10-15T22:53:58+00:00
Plugin IBM-Containers v0.8.723 successfully installed.
cf ic login
Expect: login successfully
Actual: Cloud Foundry CLI version 6.11.2 or later is required for the IBM Containers plug-in. Upgrade your Cloud Foundry CLI installation to continue.
How could this happened? I have installed the latest cf...
UPDATED 26 October 2015 the latest version (0.8.763 or later) of the cf ic plugin supports the 6.13 version of cf.
Run cf ic update and you should see the commands you need to run to upgrade the plugin (varies by operating system). Or check the documentation.
Previous answer follows:
Currently (19 October 2015) the IBM-Containers plugin (version 0.8.723 or earlier) is not compatible with the 6.13.x version of cf. We're working on patching our plugin. Sorry about that.
In the meantime, you can install CF 6.12.4 and then install the IBM Containers plugin. Or use the ice tools