Note:
This documentation is for version 3.24.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"]],[["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-03-21 UTC."],[[["The latest version of the Google.Cloud.Container.V1 .NET client library is 3.33.0, and the webpage provides documentation and links for multiple versions, starting from 3.33.0 down to 2.3.0."],["This page specifically documents version 3.24.0 of the `Google.Cloud.Container.V1` library, which is a .NET client library for interacting with the Google Kubernetes Engine API."],["The library can be installed via NuGet, and it can authenticate using Application Default Credentials or automatically when running on Google Cloud."],["The `ClusterManagerClient` is used to perform all operations within the Google Kubernetes Engine, and example code is provided to list clusters."],["The primary use of this library is for the management of clusters within the Google Kubernetes Engine API."]]],[]]