pub struct ClusterManager { /* private fields */ }Expand description
Implements a client for the Kubernetes Engine API.
§Example
let client = ClusterManager::builder().build().await?;
// use `client` to make requests to the Kubernetes Engine API.§Service Description
Google Kubernetes Engine Cluster Manager v1
§Configuration
To configure ClusterManager use the with_* methods in the type returned
by builder(). The default configuration should
work for most applications. Common configuration changes include
- with_endpoint(): by default this client uses the global default endpoint
(
https://container.googleapis.com). Applications using regional endpoints or running in restricted networks (e.g. a network configured override this default. - with_credentials(): by default this client uses Application Default Credentials. Applications using custom authentication may need to override this default.
§Pooling and Cloning
ClusterManager holds a connection pool internally, it is advised to
create one and the reuse it. You do not need to wrap ClusterManager in
an Rc or Arc to reuse it, because it
already uses an Arc internally.
Implementations§
Source§impl ClusterManager
impl ClusterManager
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Returns a builder for ClusterManager.
let client = ClusterManager::builder().build().await?;Sourcepub fn from_stub<T>(stub: T) -> Selfwhere
T: ClusterManager + 'static,
pub fn from_stub<T>(stub: T) -> Selfwhere
T: ClusterManager + 'static,
Creates a new client from the provided stub.
The most common case for calling this function is in tests mocking the client’s behavior.
Sourcepub fn list_clusters(&self) -> ListClusters
pub fn list_clusters(&self) -> ListClusters
Lists all clusters owned by a project in either the specified zone or all zones.
Sourcepub fn get_cluster(&self) -> GetCluster
pub fn get_cluster(&self) -> GetCluster
Gets the details of a specific cluster.
Sourcepub fn create_cluster(&self) -> CreateCluster
pub fn create_cluster(&self) -> CreateCluster
Creates a cluster, consisting of the specified number and type of Google Compute Engine instances.
By default, the cluster is created in the project’s default network.
One firewall is added for the cluster. After cluster creation, the kubelet creates routes for each node to allow the containers on that node to communicate with all other instances in the cluster.
Finally, an entry is added to the project’s global metadata indicating which CIDR range the cluster is using.
Sourcepub fn update_cluster(&self) -> UpdateCluster
pub fn update_cluster(&self) -> UpdateCluster
Updates the settings of a specific cluster.
Sourcepub fn update_node_pool(&self) -> UpdateNodePool
pub fn update_node_pool(&self) -> UpdateNodePool
Updates the version and/or image type for the specified node pool.
Sourcepub fn set_node_pool_autoscaling(&self) -> SetNodePoolAutoscaling
pub fn set_node_pool_autoscaling(&self) -> SetNodePoolAutoscaling
Sets the autoscaling settings for the specified node pool.
Sourcepub fn set_logging_service(&self) -> SetLoggingService
pub fn set_logging_service(&self) -> SetLoggingService
Sets the logging service for a specific cluster.
Sourcepub fn set_monitoring_service(&self) -> SetMonitoringService
pub fn set_monitoring_service(&self) -> SetMonitoringService
Sets the monitoring service for a specific cluster.
Sourcepub fn set_addons_config(&self) -> SetAddonsConfig
pub fn set_addons_config(&self) -> SetAddonsConfig
Sets the addons for a specific cluster.
Sourcepub fn set_locations(&self) -> SetLocations
👎Deprecated
pub fn set_locations(&self) -> SetLocations
Sets the locations for a specific cluster. Deprecated. Use projects.locations.clusters.update instead.
Sourcepub fn update_master(&self) -> UpdateMaster
pub fn update_master(&self) -> UpdateMaster
Updates the master for a specific cluster.
Sourcepub fn set_master_auth(&self) -> SetMasterAuth
pub fn set_master_auth(&self) -> SetMasterAuth
Sets master auth materials. Currently supports changing the admin password or a specific cluster, either via password generation or explicitly setting the password.
Sourcepub fn delete_cluster(&self) -> DeleteCluster
pub fn delete_cluster(&self) -> DeleteCluster
Deletes the cluster, including the Kubernetes endpoint and all worker nodes.
Firewalls and routes that were configured during cluster creation are also deleted.
Other Google Compute Engine resources that might be in use by the cluster, such as load balancer resources, are not deleted if they weren’t present when the cluster was initially created.
Sourcepub fn list_operations(&self) -> ListOperations
pub fn list_operations(&self) -> ListOperations
Lists all operations in a project in a specific zone or all zones.
Sourcepub fn get_operation(&self) -> GetOperation
pub fn get_operation(&self) -> GetOperation
Gets the specified operation.
Sourcepub fn cancel_operation(&self) -> CancelOperation
pub fn cancel_operation(&self) -> CancelOperation
Cancels the specified operation.
Sourcepub fn get_server_config(&self) -> GetServerConfig
pub fn get_server_config(&self) -> GetServerConfig
Returns configuration info about the Google Kubernetes Engine service.
Sourcepub fn get_json_web_keys(&self) -> GetJSONWebKeys
pub fn get_json_web_keys(&self) -> GetJSONWebKeys
Gets the public component of the cluster signing keys in JSON Web Key format.
Sourcepub fn list_node_pools(&self) -> ListNodePools
pub fn list_node_pools(&self) -> ListNodePools
Lists the node pools for a cluster.
Sourcepub fn get_node_pool(&self) -> GetNodePool
pub fn get_node_pool(&self) -> GetNodePool
Retrieves the requested node pool.
Sourcepub fn create_node_pool(&self) -> CreateNodePool
pub fn create_node_pool(&self) -> CreateNodePool
Creates a node pool for a cluster.
Sourcepub fn delete_node_pool(&self) -> DeleteNodePool
pub fn delete_node_pool(&self) -> DeleteNodePool
Deletes a node pool from a cluster.
Sourcepub fn complete_node_pool_upgrade(&self) -> CompleteNodePoolUpgrade
pub fn complete_node_pool_upgrade(&self) -> CompleteNodePoolUpgrade
CompleteNodePoolUpgrade will signal an on-going node pool upgrade to complete.
Sourcepub fn rollback_node_pool_upgrade(&self) -> RollbackNodePoolUpgrade
pub fn rollback_node_pool_upgrade(&self) -> RollbackNodePoolUpgrade
Rolls back a previously Aborted or Failed NodePool upgrade. This makes no changes if the last upgrade successfully completed.
Sourcepub fn set_node_pool_management(&self) -> SetNodePoolManagement
pub fn set_node_pool_management(&self) -> SetNodePoolManagement
Sets the NodeManagement options for a node pool.
Sourcepub fn set_labels(&self) -> SetLabels
pub fn set_labels(&self) -> SetLabels
Sets labels on a cluster.
Sourcepub fn set_legacy_abac(&self) -> SetLegacyAbac
pub fn set_legacy_abac(&self) -> SetLegacyAbac
Enables or disables the ABAC authorization mechanism on a cluster.
Sourcepub fn start_ip_rotation(&self) -> StartIPRotation
pub fn start_ip_rotation(&self) -> StartIPRotation
Starts master IP rotation.
Sourcepub fn complete_ip_rotation(&self) -> CompleteIPRotation
pub fn complete_ip_rotation(&self) -> CompleteIPRotation
Completes master IP rotation.
Sourcepub fn set_node_pool_size(&self) -> SetNodePoolSize
pub fn set_node_pool_size(&self) -> SetNodePoolSize
Sets the size for a specific node pool. The new size will be used for all replicas, including future replicas created by modifying NodePool.locations.
Sourcepub fn set_network_policy(&self) -> SetNetworkPolicy
pub fn set_network_policy(&self) -> SetNetworkPolicy
Enables or disables Network Policy for a cluster.
Sourcepub fn set_maintenance_policy(&self) -> SetMaintenancePolicy
pub fn set_maintenance_policy(&self) -> SetMaintenancePolicy
Sets the maintenance policy for a cluster.
Sourcepub fn list_usable_subnetworks(&self) -> ListUsableSubnetworks
pub fn list_usable_subnetworks(&self) -> ListUsableSubnetworks
Lists subnetworks that are usable for creating clusters in a project.
Sourcepub fn check_autopilot_compatibility(&self) -> CheckAutopilotCompatibility
pub fn check_autopilot_compatibility(&self) -> CheckAutopilotCompatibility
Checks the cluster compatibility with Autopilot mode, and returns a list of compatibility issues.
Sourcepub fn fetch_cluster_upgrade_info(&self) -> FetchClusterUpgradeInfo
pub fn fetch_cluster_upgrade_info(&self) -> FetchClusterUpgradeInfo
Fetch upgrade information of a specific cluster.
Sourcepub fn fetch_node_pool_upgrade_info(&self) -> FetchNodePoolUpgradeInfo
pub fn fetch_node_pool_upgrade_info(&self) -> FetchNodePoolUpgradeInfo
Fetch upgrade information of a specific nodepool.
Trait Implementations§
Source§impl Clone for ClusterManager
impl Clone for ClusterManager
Source§fn clone(&self) -> ClusterManager
fn clone(&self) -> ClusterManager
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more