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