Page cover image

Register Google GKE Cluster

In case of gopaddle community edition, the installer automatically registers the local Kubernetes cluster in gopaddle. Ignore this section if you are running a community edition

In case of SaaS or Enterprise edition, this section needs to be followed to register a cluster

  1. Install gcloud CLI in your local environment

  2. Install jq. For instance, you can install jq in Ubuntu environments, as below:

apt update
apt install jq
  1. Login to your Google Cloud account using gcloud command line utility. For more information check out - https://cloud.google.com/sdk/gcloud/reference/auth

gcloud auth login
  1. Describe the GKE cluster and get the Cluster CA Certificate.

gcloud container clusters describe <clustername> --zone <cluster-zone> --project <project-name> --format json | jq '.masterAuth.clusterCaCertificate'
  1. Edit the Kubeconfig file below by replacing the values gathered in the previous step.

apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: <clusterCaCertificate>
    server: <server-end-point>
  name: gke_<project>_<zone>_<clustername>
contexts:
- context:
    cluster: gke_<project>_<zone>_<clustername>
    user: gke_<project>_<zone>_<clustername>
  name: gke_<project>_<zone>_<clustername>
current-context: gke_<project>_<zone>_<clustername>
kind: Config
preferences: {}
users:
- name: gke_<project>_<zone>_<clustername>
  user:
    auth-provider:
      name: gcp
  1. Navigate to the Environments section.

  2. Click on Add a Cluster and choose Register an existing Cluster.

  3. Provide the Google GKE Cluster name. The cluster name must match the cluster name in the Google portal.

  4. Choose the Cloud provider as Google. Select the Cloud Account and the Google project ID and the Regions.

  1. In the Authentication Step, upload the Kubeconfig file gathered in step 2.

  1. If you have configured a bastion host, provide the Bastion Host IP, SSH Pem file, SSH port

  1. Click on Finish to register the GKE Cluster.

Last updated