Struct ClusterManager

Source
pub struct ClusterManager { /* private fields */ }
Expand description

Implements a client for the Kubernetes Engine API.

§Service Description

Google Kubernetes Engine Cluster Manager v1

§Configuration

ClusterManager has various configuration parameters, the defaults should work with most applications.

§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 async fn new() -> Result<Self>

Creates a new client with the default configuration.

Source

pub async fn new_with_config(conf: ClientConfig) -> Result<Self>

Creates a new client with the specified configuration.

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 when mocking the client.

Source

pub fn list_clusters(&self, parent: impl Into<String>) -> ListClusters

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

Source

pub fn get_cluster(&self, name: impl Into<String>) -> GetCluster

Gets the details of a specific cluster.

Source

pub fn create_cluster(&self, parent: impl Into<String>) -> 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, name: impl Into<String>) -> UpdateCluster

Updates the settings of a specific cluster.

Source

pub fn update_node_pool(&self, name: impl Into<String>) -> UpdateNodePool

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

Source

pub fn set_node_pool_autoscaling( &self, name: impl Into<String>, ) -> SetNodePoolAutoscaling

Sets the autoscaling settings for the specified node pool.

Source

pub fn set_logging_service(&self, name: impl Into<String>) -> SetLoggingService

Sets the logging service for a specific cluster.

Source

pub fn set_monitoring_service( &self, name: impl Into<String>, ) -> SetMonitoringService

Sets the monitoring service for a specific cluster.

Source

pub fn set_addons_config(&self, name: impl Into<String>) -> SetAddonsConfig

Sets the addons for a specific cluster.

Source

pub fn set_locations(&self, name: impl Into<String>) -> SetLocations

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

Source

pub fn update_master(&self, name: impl Into<String>) -> UpdateMaster

Updates the master for a specific cluster.

Source

pub fn set_master_auth(&self, name: impl Into<String>) -> 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, name: impl Into<String>) -> 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, parent: impl Into<String>) -> ListOperations

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

Source

pub fn get_operation(&self, name: impl Into<String>) -> GetOperation

Gets the specified operation.

Source

pub fn cancel_operation(&self, name: impl Into<String>) -> CancelOperation

Cancels the specified operation.

Source

pub fn get_server_config(&self, name: impl Into<String>) -> GetServerConfig

Returns configuration info about the Google Kubernetes Engine service.

Source

pub fn get_json_web_keys(&self, parent: impl Into<String>) -> GetJSONWebKeys

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

Source

pub fn list_node_pools(&self, parent: impl Into<String>) -> ListNodePools

Lists the node pools for a cluster.

Source

pub fn get_node_pool(&self, name: impl Into<String>) -> GetNodePool

Retrieves the requested node pool.

Source

pub fn create_node_pool(&self, parent: impl Into<String>) -> CreateNodePool

Creates a node pool for a cluster.

Source

pub fn delete_node_pool(&self, name: impl Into<String>) -> DeleteNodePool

Deletes a node pool from a cluster.

Source

pub fn complete_node_pool_upgrade( &self, name: impl Into<String>, ) -> CompleteNodePoolUpgrade

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

Source

pub fn rollback_node_pool_upgrade( &self, name: impl Into<String>, ) -> 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, name: impl Into<String>, ) -> SetNodePoolManagement

Sets the NodeManagement options for a node pool.

Source

pub fn set_labels(&self, name: impl Into<String>) -> SetLabels

Sets labels on a cluster.

Source

pub fn set_legacy_abac(&self, name: impl Into<String>) -> SetLegacyAbac

Enables or disables the ABAC authorization mechanism on a cluster.

Source

pub fn start_ip_rotation(&self, name: impl Into<String>) -> StartIPRotation

Starts master IP rotation.

Source

pub fn complete_ip_rotation( &self, name: impl Into<String>, ) -> CompleteIPRotation

Completes master IP rotation.

Source

pub fn set_node_pool_size(&self, name: impl Into<String>) -> 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, name: impl Into<String>) -> SetNetworkPolicy

Enables or disables Network Policy for a cluster.

Source

pub fn set_maintenance_policy( &self, name: impl Into<String>, ) -> SetMaintenancePolicy

Sets the maintenance policy for a cluster.

Source

pub fn list_usable_subnetworks( &self, parent: impl Into<String>, ) -> ListUsableSubnetworks

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

Source

pub fn check_autopilot_compatibility( &self, name: impl Into<String>, ) -> CheckAutopilotCompatibility

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

Trait Implementations§

Source§

impl Clone for ClusterManager

Source§

fn clone(&self) -> ClusterManager

Returns a copy 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, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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> 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,

Source§

impl<T> MaybeSendSync for T