Using kubernetes API on GKE

0 votes
So using kubernetes API it is easily possible to create, delete, modify pods, services, replication controllers etc. But in gke(google container engine) this API is not exposed it seems. These objects are handled by gcloud. The only thing that you can manage through REST are the clusters. Is there any way I can access kubernetes API using gke?
Dec 6, 2018 in Kubernetes by Atul
• 10,230 points

1 answer to this question.

0 votes

When you create a cluster using GKE, it creates a master running kubernetes api on a virtual machine in your gcp project. Now, if you preview your gcloud container clusters list you can see the endpoints which kuberenets api is using along with http basic authentication credentials which are needed to access it.

Kubectl is already bundled with gcloud and gives the ability to execute it for any container cluster you have launched using GKE. Run gcloud preview containers kubectl list pods to list pods, for isntance.

Check out the following link which gives you the commands and the flags which can  be used with gcloud preview container kubectl: 

answered Dec 6, 2018 by ajs3033
• 7,280 points

Related Questions In Kubernetes

0 votes
2 answers

Access Kubernetes API using minKube

Try these commands: kubectl proxy --port=8080 You can then ...READ MORE

answered Aug 28, 2018 in Kubernetes by Hannah
• 18,570 points
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Different ways to provide API-Security on kubernetes

Use the correct auth mode with API ...READ MORE

answered Jul 23, 2019 in Kubernetes by Sirajul
• 59,170 points
+1 vote
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17, 2019 in Others by anonymous
+4 votes
1 answer

Installing Web UI (Dashboard):kubernetes-dashboard on main Ubuntu 16.04.6 LTS (Xenial Xerus) server

Follow these steps: $ kubeadm reset $ kubeadm init ...READ MORE

answered Apr 12, 2019 in Kubernetes by Kalgi
• 52,350 points

reshown Apr 12, 2019 by Kalgi 3,861 views
0 votes
1 answer

Forcing ssl for Kubernetes Ingress on GKE If you want to block http, you ...READ MORE

answered Sep 6, 2018 in Kubernetes by ajs3033
• 7,280 points
0 votes
1 answer

Accessing remote kubernetes cluster on azure using kubectl

So, try this. Edit your kube config ...READ MORE

answered Sep 11, 2018 in Kubernetes by ajs3033
• 7,280 points
Send OTP
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP