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
131 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,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
• 14,070 points
243 views
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 in Kubernetes by Sirajul
• 25,420 points
16 views
0 votes
1 answer
0 votes
3 answers

Error while joining cluster with node

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

answered Jan 17 in Others by anonymous
2,116 views
+3 votes
1 answer
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,280 points
1,167 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,280 points
58 views