Quickstart with GKE
This is a quick start guide for deploying TigerGraph on Kubernetes with Google Kubernetes Engine (GKE).
Prerequisites
The
gcloud
command-line interface (CLI) is installed on your machine.The
kubectl
Kubernetes client command-line tool is installed on your machine.A running GKE cluster with nodes that meet the minimum hardware and software requirements for running TigerGraph.
You have configured cluster access for
kubectl
.
Single-server deployment
This section describes the steps to deploy, verify, and remove a single-server deployment of TigerGraph on GKE.
Deploy single server
Step 1: Generate deployment manifest. Clone the TigerGraph ecosystems repository and change into the k8s
directory. You can edit the kustimization.yaml
file in the gke
folder to change the namespace and image name for your deployment. The default namespace is default
. No need to edit the files if no changes are needed.
Next, run the ./tg
script in the k8s
directory to generate the deployment manifest for a single-server deployment. A deploy
directory will be created automatically and you should find the manifest named tigergraph-gke.yaml
in the directory.
Step 2: Deploy manifest. Run kubectl apply
to create the deployment using the manifest you generated in Step1.
Verify single server
Run kubectl get pods
to confirm that the pods were created successfully:
Run kubectl describe service/tg-external-service
to find the IP address of the load balancer. You can then make curl calls to port 9000 to make sure that RESTPP is running:
You can also copy the IP address into your browser and visit port 14240 to make sure that GraphStudio is working.
Connect to single server
You can use kubectl
to get a shell to the container or log in via ssh
To use GraphStudio, copy the IP address into your browser and visit port 14240.
Remove single server resources
Run the command below to delete all cluster resources:
Cluster deployment
Once your GKE cluster is ready, you can start following the below steps to deploy a TigerGraph cluster on Kubernetes.
Deploy TigerGraph cluster
1. Generate Kubernetes manifest
Clone the TigerGraph ecosystem repository and change into the k8s
directory:
You can customize your deployment by editing the kustomize.yaml
file in the gke
directory. The tg
script in the k8s
folder offers a convenient way to make common customizations such as namespace, TigerGraph version, as well as cluster size. Run ./tg -h
to view the help text on how to use the script.
Use the tg
script in the k8s
directory of the repo to create a Kubernetes manifest. Use -s
or --size
to indicate the number of nodes in the cluster. Use the --ha
option to indicate the replication factor of the cluster, and the partitioning factor will be the number of nodes divided by the replication factor.
For example, the following command will create a manifest that will deploy a 3*2 cluster with a replication factor of 2 and a partitioning factor of 3. The --version
flag specifies the version of TigerGraph to use for the deployment.
The command will create a directory named deploy
with the manifest inside.
2. Deploy the cluster
Run kubectl apply
to create the deployment
Verify cluster
Run kubectl get pods
to verify the pods were created successfully:
Run kubectl describe service/tg-external-service
to find the IP address of the load balancer for your GKE cluster. You can make a curl call to port 9000 to make sure that RESTPP is working:
You can also copy the IP address into your browser and visit port 14240 to make sure that GraphStudio is working.
Connect to instances
You can use kubectl
to get a shell to the container or log in via ssh
To use GraphStudio, copy the IP address into your browser and visit port 14240.
Delete cluster resources
Run the command below to delete all cluster resources:
Last updated