ClusterManager

Struct ClusterManager 

Source
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

Source

pub fn builder() -> ClientBuilder

Returns a builder for ClusterManager.

let client = ClusterManager::builder().build().await?;
Source

pub fn from_stub<T>(stub: T) -> Self
where 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.

Source

pub fn list_clusters(&self) -> ListClusters

Lists all clusters owned by a project in either the specified zone or all zones.

Source

pub fn get_cluster(&self) -> GetCluster

Gets the details of a specific cluster.

Source

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.

Source

pub fn update_cluster(&self) -> UpdateCluster

Updates the settings of a specific cluster.

Source

pub fn update_node_pool(&self) -> UpdateNodePool

Updates the version and/or image type for the specified node pool.

Source

pub fn set_node_pool_autoscaling(&self) -> SetNodePoolAutoscaling

Sets the autoscaling settings for the specified node pool.

Source

pub fn set_logging_service(&self) -> SetLoggingService

Sets the logging service for a specific cluster.

Source

pub fn set_monitoring_service(&self) -> SetMonitoringService

Sets the monitoring service for a specific cluster.

Source

pub fn set_addons_config(&self) -> SetAddonsConfig

Sets the addons for a specific cluster.

Source

pub fn set_locations(&self) -> SetLocations

👎Deprecated

Sets the locations for a specific cluster. Deprecated. Use projects.locations.clusters.update instead.

Source

pub fn update_master(&self) -> UpdateMaster

Updates the master for a specific cluster.

Source

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.

Source

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.

Source

pub fn list_operations(&self) -> ListOperations

Lists all operations in a project in a specific zone or all zones.

Source

pub fn get_operation(&self) -> GetOperation

Gets the specified operation.

Source

pub fn cancel_operation(&self) -> CancelOperation

Cancels the specified operation.

Source

pub fn get_server_config(&self) -> GetServerConfig

Returns configuration info about the Google Kubernetes Engine service.

Source

pub fn get_json_web_keys(&self) -> GetJSONWebKeys

Gets the public component of the cluster signing keys in JSON Web Key format.

Source

pub fn list_node_pools(&self) -> ListNodePools

Lists the node pools for a cluster.

Source

pub fn get_node_pool(&self) -> GetNodePool

Retrieves the requested node pool.

Source

pub fn create_node_pool(&self) -> CreateNodePool

Creates a node pool for a cluster.

Source

pub fn delete_node_pool(&self) -> DeleteNodePool

Deletes a node pool from a cluster.

Source

pub fn complete_node_pool_upgrade(&self) -> CompleteNodePoolUpgrade

CompleteNodePoolUpgrade will signal an on-going node pool upgrade to complete.

Source

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.

Source

pub fn set_node_pool_management(&self) -> SetNodePoolManagement

Sets the NodeManagement options for a node pool.

Source

pub fn set_labels(&self) -> SetLabels

Sets labels on a cluster.

Source

pub fn set_legacy_abac(&self) -> SetLegacyAbac

Enables or disables the ABAC authorization mechanism on a cluster.

Source

pub fn start_ip_rotation(&self) -> StartIPRotation

Starts master IP rotation.

Source

pub fn complete_ip_rotation(&self) -> CompleteIPRotation

Completes master IP rotation.

Source

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.

Source

pub fn set_network_policy(&self) -> SetNetworkPolicy

Enables or disables Network Policy for a cluster.

Source

pub fn set_maintenance_policy(&self) -> SetMaintenancePolicy

Sets the maintenance policy for a cluster.

Source

pub fn list_usable_subnetworks(&self) -> ListUsableSubnetworks

Lists subnetworks that are usable for creating clusters in a project.

Source

pub fn check_autopilot_compatibility(&self) -> CheckAutopilotCompatibility

Checks the cluster compatibility with Autopilot mode, and returns a list of compatibility issues.

Source

pub fn fetch_cluster_upgrade_info(&self) -> FetchClusterUpgradeInfo

Fetch upgrade information of a specific cluster.

Source

pub fn fetch_node_pool_upgrade_info(&self) -> FetchNodePoolUpgradeInfo

Fetch upgrade information of a specific nodepool.

Trait Implementations§

Source§

impl Clone for ClusterManager

Source§

fn clone(&self) -> ClusterManager

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ClusterManager

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,