GKE (Google Kubernetes Engine)
Overview
New in version 3.1.
Google Kubernetes Engine (GKE) provides a managed environment for deploying, managing, and scaling your containerized applications using Google infrastructure. NVIDIA AI Enterprise, the end-to-end software of the NVIDIA AI platform, is supported to run on GKE. The GKE environment consists of multiple machines (specifically, Compute Engine instances) grouped together to form a cluster. This guide provides details for deploying and running NVIDIA AI Enterprise on GKE clusters with NVIDIA GPU Accelerated nodes.
The NVIDIA Terraform Modules offer an easy way to deploy Managed Kubernetes clusters that can be supported by NVIDIA AI Enterprise when used with supported OS and GPU Operator versions.
Prerequisites
-
NVIDIA Enterprise License via BYOL or a Private Offer
-
Install the Google Cloud CLI
NVIDIA recommends installing the Google Cloud CLI via download of the linux google-cloud-cli-xxx.x.x-linux-x86_64.tar.gz file. If a different OS distribution is being utilized, please continue to follow Google’s instructions for your desired OS.

-
Google Cloud account with Google Kubernetes Engine Admin Role and Kubernetes Engine Cluster Admin Role for more information please refer to Google’s IAM Policies
-
Ubuntu Nodes
Create a GKE Cluster
Run the below comannds to install the GKE components.
Run the below command to create a GKE cluster.
-
<Google-Project-ID>: You will find the Project ID within the Google console dashboard Settings and update accordingly.
-
If the network name is not “default” then get the network information from the console and append the below value with the appropriate network and subnetwork name.
Run the below command to get the kubeconfig credentials to the local system.
Run the below command to verify the node information
Example output result
Create a Resources to Install the GPU Operator on GKE
Create a resource quota file with the below command.
Run the below commands to create a namespace and resource quota to the namespace on GKE cluster.
Example output result:
For more information, please refer to GKE’s quotas and limits overview.
Verify the default Pod Security Policies on GKE with below command.
Example Output result:
Deploy GPU Operator
Now that the cluster and appropriate resources are created, the NVIDIA GPU Operator can be installed
The commands below serve as an example and will be similar, albeit slightly different, to the latest version of the GPU Operator. Please refer to the latest GPU Operator release notes for more information.
First we will access our NGC API Key.
Log into your NGC account and generate a new API Key or locate your existing API key. Please refer to the Accessing NGC section of the Appendix.
Generate an API key for accessing the catalog
Next you must generate an API Key that will give you access to the NGC Catalog.
Navigate to the user account icon in the top right corner and select Setup.


Select Get API key to open the Setup > API Key page.
Select Generate API Key to generate your API key.
Select Confirm to generate the key, and copy it from the bottom of the page. NGC does not save your key, so store it in a secure place.

Generating a new API Key invalidates the previously generated key.
Add the Helm repo and update with the below commands.
Create a NGC Secret with your NGC API key on “gpu-operator” namespace as per below.
Create an empty gridd.conf file, then create a configmap with NVIDIA vGPU Licence token file as per below
The configmap will look for the file client_configuration_token.tok, if your token is in a different form such as client_configuration_token_date_xx_xx.tok, then please run the below command:
Install the GPU Operator from NGC Catalog with License token and driver repository.
Ensure that you have the correct role as either a Kubernetes Engine Admin or Kubernetes Engine Cluster Admin in order to install the GPU Operator. Please refer to Create IAM policies if you lack the required permissions.
Once installed, please wait at least 5 minutes and verify that all the pods are either running or completed as per below.
Verify the GPU Operator Installation
Verify the NVIDIA GPU Driver loaded with below command.
nvidia-driver-daemonset-xxxxx will be different within your own environment for the above command to verify the NVIDIA vGPU Driver.
Verify the NVIDIA vGPU license information with below command
Run Sample NVIDIA AI Enterprise Container
Container images will be similar, albeit slightly different when using the latest image. Please refer to Pulling and Running NVIDIA AI Enterprise Containers to find the latest images on NGC.
Create a docker-regirty secret. This will be used in a custom yaml to pull containers from the NGC Catalog.
Create a custom yaml file to deploy an NVIDIA AI Enterprise Container and run sample training code.
Paste the below contents into the file and save
Check the status of the pod.
View the output of the sample mnist training job.
The output will look similar to this.
Delete the GKE Cluster
Run the below command to delete the GKE cluster