Note:
This documentation is for version3.25.0of the library.
Some samples may not work with other versions.
Installation
Install theGoogle.Cloud.Container.V1package 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. SeeSet up Application Default Credentialsfor 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"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eGoogle.Cloud.Container.V1\u003c/code\u003e library is a .NET client for the Google Kubernetes Engine API, and this documentation is specifically for version \u003ccode\u003e3.25.0\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eVersion \u003ccode\u003e3.33.0\u003c/code\u003e is the latest available version of the library, with many previous versions accessible through links provided in the content.\u003c/p\u003e\n"],["\u003cp\u003eAuthentication with the API is seamless when running on Google Cloud, and for other environments, Application Default Credentials can be used.\u003c/p\u003e\n"],["\u003cp\u003eAll API operations are performed through the \u003ccode\u003eClusterManagerClient\u003c/code\u003e, which can be used for tasks such as listing clusters across different zones.\u003c/p\u003e\n"],["\u003cp\u003eThe library can be installed via NuGet by adding the \u003ccode\u003eGoogle.Cloud.Container.V1\u003c/code\u003e package to your project.\u003c/p\u003e\n"]]],[],null,[]]