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,240 points
1,288 views

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: https://cloud.google.com/sdk/gcloud/reference/preview/container/kubectl 

answered Dec 6, 2018 by ajs3033
• 7,300 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,520 points
1,889 views
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,230 points
897 views
+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
15,477 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,036 views
0 votes
1 answer

Forcing ssl for Kubernetes Ingress on GKE

https://github.com/kubernetes/ingress-gce#frontend-https If you want to block http, you ...READ MORE

answered Sep 6, 2018 in Kubernetes by ajs3033
• 7,300 points
4,226 views
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,300 points
647 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP