Editing Gcloud container clusters get-credentials

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
 
{{lc}}
 
{{lc}}
 
[[gcloud container clusters get-credentials --help]]
 
 
  [[gcloud container clusters]] get-credentials
 
  [[gcloud container clusters]] get-credentials
  [[gcloud container clusters]] get-credentials [[MyClusterName]]
+
  [[gcloud container clusters]] get-credentials MyClusterName
gcloud container clusters get-credentials MyClusterName [[--zone]] [[europe-west3-b]]
 
gcloud container clusters get-credentials MyClusterName [[--region]] [[europe-west3-c]]
 
[[gcloud container clusters]] get-credentials $(terraform output -raw kubernetes_cluster_name) --region $(terraform output -raw region)
 
 
 
  
== Example ==
 
 
  gcloud container clusters get-credentials MyClusterName [[--zone]] [[europe-west3-b]]
 
  gcloud container clusters get-credentials MyClusterName [[--zone]] [[europe-west3-b]]
 
  Fetching cluster endpoint and auth data.
 
  Fetching cluster endpoint and auth data.
  [[kubeconfig]] entry generated for MyClusterName.
+
  kubeconfig entry generated for MyClusterName.
 
 
Use new [[contexts]] to access the cluster:
 
[[kubectl config get-contexts]]
 
[[kubectl config use-context]]
 
[[kubectl config current-context]]
 
 
 
== Errors ==
 
 
 
[[gcloud container clusters]] get-credentials your-cluster-name --region europe-west3-b
 
Fetching cluster endpoint and auth data.
 
ERROR: (gcloud.container.clusters.get-credentials) [[ResponseError: code=403]], message=Required "[[container.clusters.get]]" permission(s) for "projects/your-project/zones/europe-west3-b/clusters/your-cluster-name".
 
  
  
Line 32: Line 14:
 
   
 
   
 
  For detailed information on this command and its flags, run:
 
  For detailed information on this command and its flags, run:
   [[gcloud container clusters get-credentials --help]]
+
   gcloud container clusters get-credentials --help
 
 
 
 
[[gcloud container clusters get-credentials $(terraform output -raw kubernetes_cluster_name) --region $(terraform output -raw region)]]
 
Fetching cluster endpoint and auth data.
 
ERROR: (gcloud.container.clusters.get-credentials) ResponseError: code=404, message=Not found: projects/your-project/locations/us- central1/clusters/your-cluster-co-gke.
 
Could not find [your-cluster-gke] in [us-central1].
 
Did you mean [your-cluster-gke] in [us-central1-a]?
 
 
 
 
 
[[gcloud container clusters]] get-credentials $([[terraform output -raw kubernetes_cluster_name]]) --region $([[terraform output -raw region]])
 
Fetching cluster endpoint and auth data.
 
WARNING: cluster your-cluster-gke is not RUNNING. The [[kubernetes API]] may or may not be available. Check the [[cluster status]] for more information.
 
[[kubeconfig]] entry generated for your-cluster-gke.
 
  
 
== Related ==
 
== Related ==
* <code>[[gcloud components install gke-gcloud-auth-plugin]]</code>
+
[[gcloud components install gke-gcloud-auth-plugin]]
* <code>[[gcloud container clusters list]]</code>
+
[[gcloud container clusters list]]
* <code>[[kubectl get pods]]</code>
+
[[kubectl get pods]]
* <code>[[aws eks update-kubeconfig --name my-eks-cluster-name]]</code>
 
* <code>[[~/.kube/config]]</code>
 
* <code>[[gcloud config set account]]</code>
 
* [[Provide access to GKE cluster]]
 
* [[Connect to K8s cluster]]
 
* <code>[[kubectl config rename-context]]</code>
 
  
 
== See also ==
 
== See also ==

Please note that all contributions to wikieduonline may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Wikieduonline:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Advertising: