Solution by setting up required tools locally (you need a while or two for that)
You just need to reconfigure your kubectl
client, which can be done pretty straighforward. When you log in to GCP Console -> go to Kubernetes Engine -> Clusters -> click on Actions (3 vertical dots to the right of the cluster name) -> select Connect -> copy the command, which may resemble the following one:
gcloud container clusters get-credentials my-gke-cluster --zone europe-west4-c --project my-project
It assumes you have your Cloud SDK and kubectl
already installed on your local machine. If you have not, here you have step-by-step description how to do that:
Once you run the above command on your local machine, your kubectl
context will be automatically set to your GKE Cluster even if it was set before e.g. to your local Minikube instance. You can check it by running:
kubectl config current-context
OK, almost done. Did I also mention helm
? Well, you will also need it. So if you have not installed it on your local machine previously, please do it now:
Alternative slution using Cloud Shell (much quicker)
If installing and configuring it locally seems to you too much hassle, you can simply use a Cloud Shell (I bet you've used it before). In case you didn't, once logged in to your GCP Console click on the following icon:
Once logged into Cloud Shell, you can choose to upload your local files there:
simply click on More (3 dots again):
and choose Upload a file:
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…