https://pulumi.com logo
#google-cloud
Title
# google-cloud
m

microscopic-gigabyte-29813

05/29/2023, 8:36 AM
Hey, I’m trying to get
kubeconfig
as a
provider
using this example. But I’m getting
Copy code
error: failed to initialize discovery client: The gcp auth plugin has been removed.
    Please use the "gke-gcloud-auth-plugin" kubectl/client-go credential plugin instead.
    See <https://cloud.google.com/blog/products/containers-kubernetes/kubectl-auth-changes-in-gke> for further details
I have set
export USE_GKE_GCLOUD_AUTH_PLUGIN=True
, I do have
gke-gcloud-auth-plugin
in my
.zsh
profile
Copy code
❯ gke-gcloud-auth-plugin --version
Kubernetes v1.26.4-alpha+ab1c709b754d8b64a781a6213f9882b6e66cfa34
Any suggestions?
p

proud-pizza-80589

05/29/2023, 4:15 PM
check the way you build the kubeconfig
Copy code
this.kubeconfig = interpolate`apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: ${this.cluster.masterAuth.clusterCaCertificate}
    server: https://${this.cluster.endpoint}
  name: ${this.cluster.name}
contexts:
- context:
    cluster: ${this.cluster.name}
    user: ${this.cluster.name}
  name: ${this.cluster.name}
current-context: ${this.cluster.name}
kind: Config
preferences: {}
users:
- name: ${this.cluster.name}
  user:
    exec:
      apiVersion: <http://client.authentication.k8s.io/v1beta1|client.authentication.k8s.io/v1beta1>
      command: gke-gcloud-auth-plugin
      installHint: Install gke-gcloud-auth-plugin for use with kubectl by following
        <https://cloud.google.com/blog/products/containers-kubernetes/kubectl-auth-changes-in-gke>
      provideClusterInfo: true
`;
this one works
9 Views