Package Details: google-cloud-sdk-gke-gcloud-auth-plugin 414.0.0-1

Git Clone URL: https://aur.archlinux.org/google-cloud-sdk-gke-gcloud-auth-plugin.git (read-only, click to copy)
Package Base: google-cloud-sdk-gke-gcloud-auth-plugin
Description: A google-cloud-sdk component that provides a kubectl authentication plugin for GKE.
Upstream URL: https://cloud.google.com/blog/products/containers-kubernetes/kubectl-auth-changes-in-gke
Keywords: auth gcloud gke google kubectl plugin sdk
Licenses: Apache
Submitter: rew1red
Maintainer: rew1red
Last Packager: rew1red
Votes: 2
Popularity: 0.89
First Submitted: 2022-05-24 15:45 (UTC)
Last Updated: 2023-01-23 16:06 (UTC)

Latest Comments

rew1red commented on 2022-10-28 12:52 (UTC)

Hey @deepu105--

It looks like pamac is trying to install this package as the root user, which when run is attempting to write something in /root/ (for which your current user does not have permission. This is probably unintended and undesirable. While I'm not personally familiar with pamac-- many of the AUR helper utilities activley discourage (or in the case of utilities like YAY-- flat out reject) any use as root.

Does your installation work without using sudo?

deepu105 commented on 2022-10-28 12:44 (UTC)

Unable to install this package. I'm new to Arch ecosystem, started with Manjaro and when running sudo pamac install google-cloud-sdk-gke-gcloud-auth-plugin I get the below error

I found this relevant issue https://github.com/sudoforge/pkgbuilds/issues/14

==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Extracting google-cloud-sdk_404.0.0.orig.tar.gz with bsdtar
==> Starting prepare()...
==> Entering fakeroot environment...
==> Starting package()...
Traceback (most recent call last):
  File "/var/cache/private/pamac/google-cloud-sdk/pkg/google-cloud-sdk/opt/google-cloud-sdk/lib/googlecloudsdk/core/util/files.py", line 1299, in _FileOpener
    return io.open(path, mode, encoding=encoding, newline=newline)
PermissionError: [Errno 13] Permission denied: '/root/.config/gcloud/active_config'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/var/cache/private/pamac/google-cloud-sdk/pkg/google-cloud-sdk/opt/google-cloud-sdk/lib/googlecloudsdk/core/configurations/named_configs.py", line 537, in _ActiveConfigNameFromFile
    config_name = file_utils.ReadFileContents(path)
  File "/var/cache/private/pamac/google-cloud-sdk/pkg/google-cloud-sdk/opt/google-cloud-sdk/lib/googlecloudsdk/core/util/files.py", line 1076, in ReadFileContents
    with FileReader(path) as f:
  File "/var/cache/private/pamac/google-cloud-sdk/pkg/google-cloud-sdk/opt/google-cloud-sdk/lib/googlecloudsdk/core/util/files.py", line 1200, in FileReader
    return _FileOpener(path, 'rt', 'read', encoding='utf-8')
  File "/var/cache/private/pamac/google-cloud-sdk/pkg/google-cloud-sdk/opt/google-cloud-sdk/lib/googlecloudsdk/core/util/files.py", line 1306, in _FileOpener
    raise exc_type('Unable to {0} file [{1}]: {2}'.format(verb, path, e))
googlecloudsdk.core.util.files.Error: Unable to read file [/root/.config/gcloud/active_config]: [Errno 13] Permission denied: '/root/.config/gcloud/active_config'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/var/cache/private/pamac/google-cloud-sdk/pkg/google-cloud-sdk/opt/google-cloud-sdk/bin/bootstrapping/install.py", line 12, in <module>
    import bootstrapping
  File "/var/cache/private/pamac/google-cloud-sdk/pkg/google-cloud-sdk/opt/google-cloud-sdk/bin/bootstrapping/bootstrapping.py", line 46, in <module>
    from googlecloudsdk.core import execution_utils
  File "/var/cache/private/pamac/google-cloud-sdk/pkg/google-cloud-sdk/opt/google-cloud-sdk/lib/googlecloudsdk/core/execution_utils.py", line 37, in <module>
    from googlecloudsdk.core import log
  File "/var/cache/private/pamac/google-cloud-sdk/pkg/google-cloud-sdk/opt/google-cloud-sdk/lib/googlecloudsdk/core/log.py", line 849, in <module>
    _log_manager = _LogManager()
  File "/var/cache/private/pamac/google-cloud-sdk/pkg/google-cloud-sdk/opt/google-cloud-sdk/lib/googlecloudsdk/core/log.py", line 584, in __init__
    self.Reset(sys.stdout, sys.stderr)
  File "/var/cache/private/pamac/google-cloud-sdk/pkg/google-cloud-sdk/opt/google-cloud-sdk/lib/googlecloudsdk/core/log.py", line 597, in Reset
    std_console_formatter = _ConsoleFormatter(stderr)
  File "/var/cache/private/pamac/google-cloud-sdk/pkg/google-cloud-sdk/opt/google-cloud-sdk/lib/googlecloudsdk/core/log.py", line 371, in __init__
    console_log_format = properties.VALUES.core.console_log_format.Get()
  File "/var/cache/private/pamac/google-cloud-sdk/pkg/google-cloud-sdk/opt/google-cloud-sdk/lib/googlecloudsdk/core/properties.py", line 3485, in Get
    property_value = self.GetPropertyValue(required, validate)
  File "/var/cache/private/pamac/google-cloud-sdk/pkg/google-cloud-sdk/opt/google-cloud-sdk/lib/googlecloudsdk/core/properties.py", line 3505, in GetPropertyValue
    named_configs.ActivePropertiesFile.Load(),
  File "/var/cache/private/pamac/google-cloud-sdk/pkg/google-cloud-sdk/opt/google-cloud-sdk/lib/googlecloudsdk/core/configurations/named_configs.py", line 448, in Load
    [config.Paths().installation_properties_path, ActiveConfig(
  File "/var/cache/private/pamac/google-cloud-sdk/pkg/google-cloud-sdk/opt/google-cloud-sdk/lib/googlecloudsdk/core/configurations/named_configs.py", line 488, in ActiveConfig
    config_name = _EffectiveActiveConfigName()
  File "/var/cache/private/pamac/google-cloud-sdk/pkg/google-cloud-sdk/opt/google-cloud-sdk/lib/googlecloudsdk/core/configurations/named_configs.py", line 513, in _EffectiveActiveConfigName
    config_name = _ActiveConfigNameFromFile()
  File "/var/cache/private/pamac/google-cloud-sdk/pkg/google-cloud-sdk/opt/google-cloud-sdk/lib/googlecloudsdk/core/configurations/named_configs.py", line 549, in _ActiveConfigNameFromFile
    raise NamedConfigFileAccessError(
googlecloudsdk.core.configurations.named_configs.NamedConfigFileAccessError: Active configuration name could not be read from: [/root/.config/gcloud/active_config]. Ensure you have sufficient read permissions on required active configuration in [/root/.config/gcloud/configurations].
  Unable to read file [/root/.config/gcloud/active_config]: [Errno 13] Permission denied: '/root/.config/gcloud/active_config'
==> ERROR: A failure occurred in package().
    Aborting...
Finished with result: exit-code
Main processes terminated with: code=exited/status=4

gromez commented on 2022-06-17 07:42 (UTC)

OK, I found the issue with my config, I added USE_GKE_GCLOUD_AUTH_PLUGIN=True in my .bashrc but I forgot to export it, so with export USE_GKE_GCLOUD_AUTH_PLUGIN=True, it works like a charm.

Bluesboy commented on 2022-06-15 17:23 (UTC)

For those who still getting deprecation messages even after you installed this plugin, you need to create environment variable USE_GKE_GCLOUD_AUTH_PLUGIN with True value and after that renew k8s config with gcloud container clusters get-credentials <cluster_name> --region <region> after that everything should be fine.

gromez commented on 2022-06-15 14:29 (UTC) (edited on 2022-06-15 14:44 (UTC) by gromez)

Here is the output with community/kubectl

$ $ echo $USE_GKE_GCLOUD_AUTH_PLUGIN 
True
$ kubectl get pods
W0615 16:21:23.248731  267602 gcp.go:120] WARNING: the gcp auth plugin is deprecated in v1.22+, unavailable in v1.25+; use gcloud instead.
To learn more, consult https://cloud.google.com/blog/products/containers-kubernetes/kubectl-auth-changes-in-gke
$ kubectl version
W0615 16:24:02.725448  267984 gcp.go:120] WARNING: the gcp auth plugin is deprecated in v1.22+, unavailable in v1.25+; use gcloud instead.
To learn more, consult https://cloud.google.com/blog/products/containers-kubernetes/kubectl-auth-changes-in-gke
WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short.  Use --output=yaml|json to get the full version.
Client Version: version.Info{Major:"1", Minor:"24", GitVersion:"v1.24.1", GitCommit:"3ddd0f45aa91e2f30c70734b175631bec5b5825a", GitTreeState:"archive", BuildDate:"2022-05-27T18:33:09Z", GoVersion:"go1.18.2", Compiler:"gc", Platform:"linux/amd64"}
Kustomize Version: v4.5.4
Server Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.5-gke.1501", GitCommit:"d722d90777bdbd0ce2bbe9c16e970738fba5cabc", GitTreeState:"clean", BuildDate:"2022-04-15T02:20:45Z", GoVersion:"go1.17.8b7", Compiler:"gc", Platform:"linux/amd64"}

With aur/kubectl-gke-stable-bin I don't have this issue but maybe it's only because it's an old version (1.21.13) and warning is not managed.

And I have installed gcloud with aur/google-cloud-sdk.

rew1red commented on 2022-06-14 14:05 (UTC)

That's interesting, I'm using kubectl version 1.24.1-1, and not the google issued version.

For those having an issue, what version of kubectl do you have installed?

gromez commented on 2022-06-14 07:49 (UTC) (edited on 2022-06-14 08:22 (UTC) by gromez)

I had an issue with kubectl even with the plugin installed, it seems you must use kubectl from Google too.
Replace kubectl with kubectl-gke-stable-bin does the trick.

paolomainardi commented on 2022-05-24 21:13 (UTC) (edited on 2022-05-24 21:13 (UTC) by paolomainardi)

I'm having this error when trying to reconfigure the kubeconfig:

gcloud container clusters get-credentials my-cluster --project=my-project --zone europe-west1-b
Fetching cluster endpoint and auth data.
CRITICAL: ACTION REQUIRED: gke-gcloud-auth-plugin, which is needed for continued use of kubectl, was not found or is not executable. Install gke-gcloud-auth-plugin for use with kubectl by following https://cloud.google.com/blog/products/containers-kubernetes/kubectl-auth-changes-in-gke
kubeconfig entry generated for my-cluster.

But the packages are installed correctly:

> gke-gcloud-auth-plugin --version                                                               
Kubernetes v1.23.0-alpha+66064c62c6c23110c7a93faca5fba668018df732

> gcloud --version                                                          
Google Cloud SDK 386.0.0
alpha 2022.05.13
beta 2022.05.13
bq 2.0.74
bundled-python3-unix 3.9.12
core 2022.05.13
gsutil 5.10

A note gcloud has been installed from AUR.