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
- CLI
- UI
-
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>" -
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}
- Log in to your Google account.
- Create a new GCP project. For more information on creating a GCP project, see Google Cloud documentation.
- Project Name: We recommend changing the project name to something more description, such as
Ascend Quickstart on BigQuery
. - (Optional) Project ID: If you want to specify a project ID, click Edit and enter it in the box that appears. If you leave this blank, the project ID will be generated for you.
- Copy the project ID to your clipboard.
- Billing account: Choose the appropriate billing account for your project.
- Click Create
- Project Name: We recommend changing the project name to something more description, such as
It's generally recommend to isolate your Ascend workloads in separate GCP projects. If you cannot create a new project or already have one you'd like to use, you can skip this step.
Create a new GKE cluster
- CLI
- UI
-
Set the following variables:
PROJECT_ID="<project-id>"
REGION="<region>"
CLUSTER_NAME="<cluster-name>" -
Run the following command to create a new GKE cluster:
gcloud container clusters create \
${CLUSTER_NAME} \
--region ${REGION} \
--project ${PROJECT_ID}
- Navigate to your GKE Clusters.
- Click Create.
- Click Configure for an auto-pilot cluster.
- Enter a name for your cluster, such as
ascend-io-self-hosted-instance
. - Click Create.
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
-
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 -
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.