Example GKE cluster setup

If you would like to try a hybrid install on GKE, and you need help setting up your GKE cluster, this section provides example steps for you to follow.

Set up your Kubernetes administration machine

Install the following utilities on your Kubernetes administration machine:

  1. kubectl command line interface 1.10 or later
  2. (GKE only) gcloud if you are running Kubernetes on GKE

Create the cluster

To create the cluster:

  1. Log in to the Google Kubernetes Engine (GKE) dashboard on Google Cloud Platform (GCP).
  2. Click Create Cluster.
  3. Select the Standard cluster template.
  4. Enter a name for your cluster.
  5. Under Location type, select Zonal.
  6. Select a Zone. You can use the default zone.
  7. Select the latest GKE version. For example, 1.11.7-gke.12.
  8. Create a stateful node pool for the persistent data storage service (Cassandra):
    1. Under Node pools, click Advanced edit under default-pool.
    2. Change the name of the node pool to apigee-data.
    3. For number of nodes zone, choose 3.
    4. For the Machine type, choose 4 vCPUs (n1-standard-4 -- 15 GB memory).
    5. Click Save.
  9. Create a stateless node pool for the runtime services:
    1. Click + Add node pool.
    2. Change the name of the node pool to apigee-runtime.
    3. For number of nodes per zone, choose 2.
    4. For the Machine type, choose 4 vCPUs (n1-standard-4 -- 15 GB memory).
    5. Click Save.
  10. Accept all other default configuration values.
  11. Click Create. It may take a few minutes for the cluster to start up.

Fetch your cluster credentials

After your cluster is running, you need to fetch your cluster credentials. Cluster credentials allow you to manage your Google Kubernetes Engine (GKE) cluster with kubectl from a local terminal window.

To fetch your cluster credentials:

  1. Set your GKE project name:
    gcloud config set project project_name
  2. Set your GKE project zone:
    gcloud config set compute/zone zone_name
  3. Get your gcloud container credentials:
    gcloud container clusters get-credentials cluster_name --zone zone_name --project project_name

    Where:

    • cluster_name is the name of the Kubernetes cluster you created.
    • zone_name is the zone where your cluster is located.
    • project_name is your GCP project name.

      For example:

      gcloud container clusters get-credentials my-cluster --zone us-central1-a --project my-project
  4. Execute the following command exactly as shown:
    kubectl create clusterrolebinding cluster-admin-binding --clusterrole=cluster-admin --user=$(gcloud config get-value core/account)

    This command grants cluster admin permissions to the current user. Admin permissions are required to create the necessary RBAC rules for the hybrid services.