Note:
This documentation is for version 3.35.0 of the library.
Some samples may not work with other versions.
Installation
Install the Google.Cloud.Container.V1 package from NuGet. Add it to
your project in the normal way (for example by right-clicking on the
project in Visual Studio and choosing "Manage NuGet Packages...").
Authentication
When running on Google Cloud, no action needs to be taken to authenticate.
Otherwise, the simplest way of authenticating your API calls is to
set up Application Default Credentials.
The credentials will automatically be used to authenticate. See
Set up Application Default Credentials for more details.
ClusterManagerClient client = ClusterManagerClient.Create();
// You can list clusters in a single zone, or specify "-" for all zones.
LocationName location = new LocationName(projectId, locationId: "-");
ListClustersResponse zones = client.ListClusters(location.ToString());
foreach (Cluster cluster in zones.Clusters)
{
Console.WriteLine($"Cluster {cluster.Name} in {cluster.Location}");
}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe latest version of the \u003ccode\u003eGoogle.Cloud.Container.V1\u003c/code\u003e .NET client library is 3.33.0, with documentation available, and there are many previous versions available, starting from 3.32.0 down to 2.3.0.\u003c/p\u003e\n"],["\u003cp\u003eThis library is specifically designed for the Google Kubernetes Engine API, enabling .NET developers to interact with Google Cloud's container management service.\u003c/p\u003e\n"],["\u003cp\u003eAuthentication is simplified through the use of Application Default Credentials, or when running on Google Cloud, it is automatic, so there are no additional actions needed.\u003c/p\u003e\n"],["\u003cp\u003eAll operations within the \u003ccode\u003eGoogle.Cloud.Container.V1\u003c/code\u003e library are facilitated through the \u003ccode\u003eClusterManagerClient\u003c/code\u003e class, which serves as the primary entry point for interacting with the Kubernetes Engine.\u003c/p\u003e\n"],["\u003cp\u003eThe library can be installed via NuGet, and the provided sample code demonstrates how to use the \u003ccode\u003eClusterManagerClient\u003c/code\u003e to list the available clusters in your project.\u003c/p\u003e\n"]]],[],null,[]]