Skip to main content

try_client

Function try_client 

Source
pub async fn try_client() -> Result<Client>
Expand description

Discovers an in-cluster Kubernetes client, which uses the in-pod serviceAccount token.

Outside the cluster, which is useful for cargo test, this returns an Err and the caller should report the failover as skipped.

ยงErrors

Returns an error when input data is invalid, required I/O fails, or the destination rejects the generated report or audit event.