Skip to content

Example to deploy a GKE Cluster with a GPU node-pool

Notifications You must be signed in to change notification settings

LaloLoop/gke-gpu-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

gke-gpu-example

This repository creates a private GKE cluster in your organization within a Shared VPC setup.

Setup

Make sure you have the right permissions to create the needed resources:

  • roles/resourcemanager.projectCreator: Create projects.
  • roles/compute.admin: Network and compute resources.
  • roles/container.admin: Kubernetes resources.

‼️ The above list is non exhaustive

Create the terraform.tfvars file by copying the terraform.tfvars.example file. Adjust it to your organization parameters.

Required variables

  • billing_account: The billing account ID to which the resources will be associated to.
  • org_id: Your GCP org ID.
  • project_unique_id: A random string to prevent project name collisions. You can manually type or auto generate. Only needed every time you want to create the setup on a clean project.
  • master_authorized_networks: CIDR ranges of allowed ranges that can connect to the cluster.

Provision resources

Run the following command to create all resources.

terraform apply

Connecting to the cluster

Run the following commands to configure your kubectl client.

Optionally setup a new gcloudconfiguration.

gcloud config configurations create poc
gcloud config set project <service-project-id>
gcloud config set account <your-company-account>

Configure kubectl.

gcloud container clusters list
gcloud container clusters get-credentials gke-gpu-cluster --location <listed-location-above>

Verify by listing nodes

kubectl get nodes

About

Example to deploy a GKE Cluster with a GPU node-pool

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages