Skip to main content
Version: Deploy 24.1

Install or Upgrade—Deploy or Release—on Google GKE

Note: Here is a basic setup for the GKE cluster, use it as a guideline to create K8s cluster to have minimal K8s environment for Digital.ai Deploy or Release installation.

Prerequisites

Important: You must also install the gke-gcloud-auth-plugin in case you are using kubectl 1.26 or later. See Run kubectl with the new plugin prior to the release of v1.26 and have kubectl use the new gke-gcloud-auth-plugin binary plugin for authentication instead of using the default provider-specific code.

Important: If you want to enable the TLS protocol in your cluster, you must have the TLS secret created in the namespace before you start the installation or upgrade. This means that you must create the namespace first, create the TLS secret in that namespace, and use the same namespace and TLS secret during the installation or upgrade of Digital.ai Deploy or Release.

The xl kube install and xl kube upgrade options reference let you go with the default (latest) docker image tags available when you install or upgrade Digital.ai Deploy or Release. However, here are the Docker Hub links to verify all the available image tags.

Step 1—Prepare for Installation

You must set up your system for installation, which includes installing the kubectl, the required CLIs, and so on.

Install and Configure the kubectl, XL CLI, gCloud CLI, gke-gcloud-auth-plugin, and yq

See:

Step 2—Set up the Google GKE Cluster

Note: The instructions to set up the cluster are indicative of the process. You may have to keep abreast of the latest developments in regards to the cloud platform you work with and set up the cluster to suit your requirements.

This step involves tasks such as creating the GKE cluster and connecting to it, creating the storage class, and setting up the domain name.

Create the Google GKE cluster

Create the GKE cluster. Here's an example (use any supported cluster-version, here is the example with 1.20.11-gke.1801).

❯ gcloud beta container --account "user@gmail.com" --project "apollo-playground" clusters create "gcp-gke-test-cluster" --zone  "us-central1-a" --release-channel "regular" --num-nodes "3" --machine-type "e2-standard-2" --cluster-version "1.20.11-gke.1801" --image-type "COS_CONTAINERD" --metadata disable-legacy-endpoints=true --logging=SYSTEM,WORKLOAD --monitoring=SYSTEM --enable-ip-alias --no-enable-master-authorized-networks --addons HorizontalPodAutoscaling,HttpLoadBalancing,GcePersistentDiskCsiDriver --enable-autoupgrade --enable-autorepair --enable-shielded-nodes 
NAME LOCATION MASTER_VERSION MASTER_IP MACHINE_TYPE NODE_VERSION NUM_NODES STATUS
gcp-gke-test-cluster us-central1-a 1.20.11-gke.1801 34.121.95.175 e2-standard-2 1.20.11-gke.1801 3 RUNNING
WARNING: The Pod address range limits the maximum size of the cluster. Please refer to https://cloud.google.com/kubernetes-engine/docs/how-to/flexible-pod-cidr to learn how to optimize IP address allocation.
Creating cluster gcp-gke-test-cluster in us-central1-a...
.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................done.
Created [https://container.googleapis.com/v1beta1/projects/apollo-playground/zones/us-central1-a/clusters/gcp-gke-test-cluster].
To inspect the contents of your cluster, go to: https://console.cloud.google.com/kubernetes/workload_/gcloud/us-central1-a/gcp-gke-test-cluster?project=apollo-playground
kubeconfig entry generated for gcp-gke-test-cluster.

Connect to the Cluster

  1. Connect to the cluster. Here's an example.

    ❯ gcloud beta container --account "user@gmail.com" --project "apollo-playground" clusters get-credentials "gcp-gke-test-cluster" --zone "us-central1-a"
    Fetching cluster endpoint and auth data.
    kubeconfig entry generated for gcp-gke-test-cluster.
  2. Verify the connection to the cluster.

    ❯ kubectl get node
    NAME STATUS ROLES AGE VERSION
    gke-gcp-gke-test-cluster-default-pool-d354d6a9-0627 Ready <none> 35m v1.20.11-gke.1801
    gke-gcp-gke-test-cluster-default-pool-d354d6a9-0ljz Ready <none> 35m v1.20.11-gke.1801
    gke-gcp-gke-test-cluster-default-pool-d354d6a9-bgfb Ready <none> 35m v1.20.11-gke.1801

Create the Storage Class

  1. Verify the default storage classes. Here's an example.

    ❯ kubectl get storageclass
    NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
    premium-rwo pd.csi.storage.gke.io Delete WaitForFirstConsumer true 49m
    standard kubernetes.io/gce-pd Delete Immediate true 49m
    standard-rwo pd.csi.storage.gke.io Delete WaitForFirstConsumer true 49m
  2. Enable the GcePersistentDiskCsiDriver driver and update. Here's an example.

    ❯ gcloud container clusters update "gcp-gke-test-cluster" --update-addons=GcePersistentDiskCsiDriver=ENABLED
  3. Update the following specs with standard-rwo storage classes:

    spec.postgresql.persistence.storageClass
    spec.rabbitmq.persistence.storageClass.

    For more information, see Using the Compute Engine persistent disk CSI Driver.

Set up the Domain Name

See Deploying the Endpoints configuration.

Step 3—Install Digital.ai Deploy or Release

  1. Run the xl kube install command. For more information about flags to skip prompts, enable additional logging, and so on, see xl kube install Command Reference.
  2. Answer the questions in the installation options reference.
  3. When prompted, select Google GKE as the Kubernetes setup where the Digital.ai Devops Platform will be installed. For more information, see:
  4. Complete the installation.
  5. Log on to the Deploy or Release server and verify the installation.

Upgrade Deploy or Release on Google GKE

The following upgrade scenarios are supported:

  • Upgrading existing sites created using Helm Charts
  • Upgrading existing sites created using Operator

Backup and Restore

  • Before you upgrade existing Deploy or Release sites using the Operator-based installer, you must back up your volumes, databases, and file systems so that you can revert to the earlier state in case of upgrade failures.
  • Back up and restore your data according to your organization's backup policies.
  • For more information, see Backup for GKE.

Upgrade Digital.ai Deploy or Release

  1. Run the xl kube upgrade command. For more information about flags to skip prompts, enable additional logging, and so on, see xl kube upgrade command reference
  2. Answer the questions in the upgrade options reference.
  3. When prompted, select Google GKE as the Kubernetes setup where the Digital.ai Devops Platform will be upgraded. For more information, see:
  4. Complete the upgrade.
  5. Log on to the Deploy or Release server and verify the installation.