Google.Cloud.Container.V1

Google.Cloud.Container.V1 is a.NET client library for theGoogle Kubernetes Engine API.

Note:This documentation is for version3.36.0 of the library.Some samples may not work with other versions.

Installation

Install theGoogle.Cloud.Container.V1 package from NuGet. Add it toyour project in the normal way (for example by right-clicking on theproject 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 toset up Application Default Credentials.The credentials will automatically be used to authenticate. SeeSet up Application Default Credentials for more details.

Getting started

All operations are performed throughClusterManagerClient.

Sample code

List clusters

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}");}

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-01-26 UTC.