Skip to main content
Unlisted page
This page is unlisted. Search engines will not index it, and only users having a direct link can access it.

Google Kubernetes Engine

This guide will walk you through the process of setting up a self-hosted instance on Google Kubernetes Engine.

Prerequisites

  • A Google account
  • The ability to create a GCP project, or an existing GCP project in which you can create a new GKE cluster
  • The ability to run commands in your terminal to interact with GCP resources (See Google Cloud CLI Docs here)

Create a new GCP Project

  1. Set the following variables:

    # The ID of your GCP project
    PROJECT_ID="<project-id>"

    # If you don't know your billing account, run `gcloud billing accounts list`
    BILLING_ACCOUNT_ID="<billing-account-id>"
  2. Run the following commands:

    # Make sure you're logged in and have access
    gcloud auth login

    # Create your project
    gcloud projects create \
    --name="Ascend Quickstart on BigQuery" \
    ${PROJECT_ID}

    # Set your billing account... you'll need this to create a project with API access
    gcloud billing projects link \
    --billing-account=${BILLING_ACCOUNT_ID} \
    ${PROJECT_ID}

    # Set the project
    gcloud config set project ${PROJECT_ID}

Create a new GKE cluster

  1. Set the following variables:

    PROJECT_ID="<project-id>"
    REGION="<region>"
    CLUSTER_NAME="<cluster-name>"
  2. Run the following command to create a new GKE cluster:

    gcloud container clusters create \
    ${CLUSTER_NAME} \
    --region ${REGION} \
    --project ${PROJECT_ID}

Record the cluster OIDC issuer information

Set your OIDC Issuer URL and OIDC Issuer JWKS URL to the following values:

OIDC_ISSUER_URL="https://container.googleapis.com/v1/projects/${PROJECT_ID}/locations/${REGION}/clusters/${CLUSTER_NAME}"
OIDC_ISSUER_JWKS_URL="${OIDC_ISSUER_URL}/jwks"

You can validate this by running the following command:

curl -s -X GET "${OIDC_ISSUER_JWKS_URL}"

Install the Ascend Instance Backend

Go to the Bring Your Own Instance Backend guide and follow the instructions to install the Ascend Instance Backend.

Create External Access to your Instance Backend

  1. Save the following to a file called load-balancer.yaml:

    apiVersion: v1
    kind: Service
    metadata:
    labels:
    app.kubernetes.io/name: instance-backend
    ascend.io/instance: [your-instance-uuid]
    name: instance-backend-ext
    namespace: [your-namespace]
    spec:
    allocateLoadBalancerNodePorts: true
    externalTrafficPolicy: Local
    ports:
    - name: grpc
    port: 443
    targetPort: 4200
  2. Apply the configuration to your cluster:

    kubectl apply -f load-balancer.yaml
  • Setup a DNS record for a custom domain that routes to the external IP of the load balancer.
  • Create a TLS certificate for your custom domain.
  • Install the certificate to your cluster as a k8s secret.