Channel Revision Published Runs on
latest/edge 1422 15 Sep 2025
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 20.04
latest/edge 1421 15 Sep 2025
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 20.04
latest/edge 1420 15 Sep 2025
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 20.04
latest/edge 1419 15 Sep 2025
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 20.04
latest/edge 578 19 Mar 2025
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 20.04
latest/edge 576 19 Mar 2025
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 20.04
1.32/stable 1386 09 Sep 2025
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 20.04
1.32/stable 1383 09 Sep 2025
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 20.04
1.32/stable 1382 09 Sep 2025
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 20.04
1.32/stable 1385 09 Sep 2025
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 20.04
1.32/stable 1384 09 Sep 2025
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 20.04
1.32/stable 1381 09 Sep 2025
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 20.04
1.32/candidate 1385 05 Sep 2025
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 20.04
1.32/candidate 1381 05 Sep 2025
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 20.04
1.32/candidate 1383 05 Sep 2025
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 20.04
1.32/candidate 1382 05 Sep 2025
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 20.04
1.32/candidate 1386 05 Sep 2025
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 20.04
1.32/candidate 1384 05 Sep 2025
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 20.04
1.32/beta 1406 11 Sep 2025
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 20.04
1.32/beta 1405 11 Sep 2025
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 20.04
1.32/beta 1404 11 Sep 2025
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 20.04
1.32/beta 1403 11 Sep 2025
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 20.04
1.32/beta 1402 11 Sep 2025
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 20.04
1.32/beta 1401 11 Sep 2025
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 20.04
1.33/stable 1350 04 Sep 2025
Ubuntu 24.04 Ubuntu 22.04
1.33/stable 1348 04 Sep 2025
Ubuntu 24.04 Ubuntu 22.04
1.33/stable 1351 04 Sep 2025
Ubuntu 24.04 Ubuntu 22.04
1.33/stable 1347 04 Sep 2025
Ubuntu 24.04 Ubuntu 22.04
1.33/candidate 1390 05 Sep 2025
Ubuntu 24.04 Ubuntu 22.04
1.33/candidate 1387 05 Sep 2025
Ubuntu 24.04 Ubuntu 22.04
1.33/candidate 1388 05 Sep 2025
Ubuntu 24.04 Ubuntu 22.04
1.33/candidate 1389 05 Sep 2025
Ubuntu 24.04 Ubuntu 22.04
1.33/beta 1390 05 Sep 2025
Ubuntu 24.04 Ubuntu 22.04
1.33/beta 1389 05 Sep 2025
Ubuntu 24.04 Ubuntu 22.04
1.33/beta 1388 05 Sep 2025
Ubuntu 24.04 Ubuntu 22.04
1.33/beta 1387 05 Sep 2025
Ubuntu 24.04 Ubuntu 22.04
1.31/candidate 142 11 Dec 2024
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 20.04
1.31/candidate 141 27 Nov 2024
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 20.04
1.30/beta 65 23 May 2024
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 20.04
juju deploy k8s --channel 1.32/stable
Show information

Platform:

Ubuntu
24.04 22.04 20.04

charms.k8s.v0.k8sd_api_manager

Module for managing k8sd API interactions.

This module provides a high-level interface for interacting with K8sd. It simplifies tasks such as token management and component updates.

The core of the module is the K8sdAPIManager, which handles the creation and management of HTTP connections to interact with the k8sd API. This class utilises different connection factories (UnixSocketConnectionFactory and HTTPConnectionFactory) to establish connections through either Unix sockets or HTTP protocols.

Example usage for creating a join token for K8sd:

try:
    factory = UnixSocketConnectionFactory('/path/to/socket')
    api_manager = K8sdAPIManager(factory)
    join_token = api_manager.create_join_token('node-name')
except K8sdAPIManagerError as e:
    logger.error("An error occurred: %s", e.message)

Similarly, the module allows for requesting authentication tokens and managing K8s components.


Index

class ErrorCodes

Enumerate the response codes from the k8s api.

Attributes

STATUS_NODE_UNAVAILABLE
returned when the node isn't in the cluster
STATUS_NODE_IN_USE
returned when the node is in the cluster already

class K8sdAPIManagerError

Description

Base exception for K8sd API Manager errors. None

class K8sdConnectionError

Description

Raised when there is a connection error. None

class InvalidResponseError

Raised when the response is invalid or unexpected.

Attributes

code (int)
HTTP Status code

Methods

InvalidResponseError. __init__( self , code: int , msg: str , method , endpoint , reason , body )

Initialise the InvalidResponseError.

Arguments

code (int)

http response code

msg (str)

Message associated with the error

method (Optional[str])

The method used to make the request

endpoint (Optional[str])

The endpoint used to make the request

reason (Optional[str])

The reason for the error

body (Optional[str])

The body of the response

class BaseRequestModel

Base model for k8s request responses.

Attributes

type (str)
The type of the request.
status (str)
The status of the response, defaults to an empty string.
status_code (int)
The status code of the response.
operation (str)
The operation of the request, defaults to an empty string.
error_code (int)
The error code associated with the response.
error (str)
The error message, defaults to an empty string.

Methods

BaseRequestModel. check_status_code( cls , v )

Validate the status_code field.

Arguments

v (int)

The value of the status_code field to validate.

Returns

int

The validated status code if it is 200.

BaseRequestModel. check_error_code( cls , v , info: ValidationInfo )

Validate the error_code field.

Arguments

v (int)

The value of the error_code field to validate.

info (ValidationInfo)

The validation information.

Returns

int

The validated error code if it is 0.

class EmptyResponse

Description

Response model for request that do not expect any return value. None

class TokenMetadata

Model representing metadata for a token.

Attributes

token (SecretStr)
The token string. (accessible via .get_secret_value() )

class AuthTokenResponse

Response model for Kubernetes authentication token requests.

Attributes

metadata (TokenMetadata)
Metadata containing the authentication token.

class CreateJoinTokenResponse

Response model for join token creation requests.

Attributes

metadata (TokenMetadata)
Metadata containing the join token.

class ClusterMember

Represents a member in the k8sd cluster.

Attributes

name (str)
Name of the cluster member.
address (str)
Address of the cluster member.
cluster_role (str)
Cluster Role of the node in the cluster.
datastore_role (str)
Role of the member in the cluster.

class DNSConfig

Configuration for the DNS settings of the cluster.

Attributes

model_config
ConfigDict instance for the model.
enabled
Optional flag which.
cluster_domain
The domain name of the cluster.
service_ip
The IP address of the DNS service within the cluster.
upstream_nameservers
List of upstream nameservers for DNS resolution.

class IngressConfig

Configuration for the ingress settings of the cluster.

Attributes

model_config
ConfigDict instance for the model.
enabled
Optional flag which represents the status of Ingress.
enable_proxy_protocol
Optional flag to enable or disable proxy protocol.

class LoadBalancerConfig

Configuration for the load balancer settings of the cluster.

Attributes

model_config
ConfigDict instance for the model.
enabled
Optional flag which represents the status of LoadBalancer.
cidrs
List of CIDR blocks for the load balancer.
l2_mode
Optional flag to enable or disable layer 2 mode.
l2_interfaces
List of layer 2 interfaces for the load balancer.
bgp_mode
Optional flag to enable or disable BGP.
bgp_local_asn
The local ASN for BGP configuration.
bgp_peer_address
The peer address for BGP configuration.
bgp_peer_asn
The peer ASN for BGP configuration.
bgp_peer_port
The port for BGP peering.

class LocalStorageConfig

Configuration for the local storage settings of the cluster.

Attributes

model_config
ConfigDict instance for the model.
enabled
Optional flag which represents the status of Storage.
local_path
The local path for storage.
reclaim_policy
The policy for reclaiming local storage.
set_default
Optional flag to set this as the default storage option.

class NetworkConfig

Configuration for the network settings of the cluster.

Attributes

model_config
ConfigDict instance for the model.
enabled
Optional flag which represents the status of Network.

class GatewayConfig

Configuration for the gateway settings of the cluster.

Attributes

model_config
ConfigDict instance for the model.
enabled
Optional flag which represents the status of Gateway.

class MetricsServerConfig

Configuration for the metrics server settings of the cluster.

Attributes

model_config
ConfigDict instance for the model.
enabled
Optional flag which represents the status of MetricsServer.

class UserFacingClusterConfig

Aggregated configuration model for the user-facing aspects of a cluster.

Attributes

model_config
ConfigDict instance for the model.
network
Network configuration for the cluster.
dns
DNS configuration for the cluster.
ingress
Ingress configuration for the cluster.
load_balancer
Load balancer configuration for the cluster.
local_storage
Local storage configuration for the cluster.
gateway
Gateway configuration for the cluster.
metrics_server
Metrics server configuration for the cluster.
cloud_provider
The cloud provider for the cluster.
annotations
Dictionary that can be used to store arbitrary metadata configuration.

class UserFacingDatastoreConfig

Aggregated configuration model for the user-facing datastore aspects of a cluster.

Attributes

model_config
ConfigDict instance for the model.
type
Type of the datastore. For runtime updates, this needs to be "external".
servers
Server addresses of the external datastore.
ca_crt
CA certificate of the external datastore cluster in PEM format.
client_crt
client certificate of the external datastore cluster in PEM format.
client_key
client key of the external datastore cluster in PEM format.

class BootstrapConfig

Configuration model for bootstrapping a Canonical K8s cluster.

Attributes

cluster_config (UserFacingClusterConfig)
The cluster configuration settings.
control_plane_taints (List[str])
Register with the following control-plane taints
pod_cidr (str)
The IP address range for the cluster's pods.
service_cidr (str)
The IP address range for the cluster services.
disable_rbac (bool)
Flag to disable role-based access control
secure_port (int)
The secure port used for Kubernetes.
k8s_dqlite_port (int)
The port used by Dqlite.
datastore_type (str)
The type of datastore used by the cluster.
datastore_servers (List[str])
The servers used by the datastore.
datastore_ca_cert (str)
The CA certificate for the datastore.
datastore_client_cert (str)
The client certificate for accessing the datastore.
datastore_client_key (str)
The client key for accessing the datastore.
extra_sans (List[str])
List of extra sans for the self-signed certificates
ca_cert (str)
The CA certificate for Kubernetes services.
ca_key (str)
The CA key for Kubernetes services.
client_ca_cert (str)
The client CA certificate for Kubernetes services.
client_ca_key (str)
The client CA key for Kubernetes services.
front_proxy_ca_cert (str)
The front proxy CA certificate.
front_proxy_ca_key (str)
The front proxy CA key.
front_proxy_client_cert (str)
The front proxy client certificate.
front_proxy_client_key (str)
The front proxy client key.
api_server_kubelet_client_cert (str)
The kubelet client certificate for the API server.
api_server_kubelet_client_key (str)
The kubelet client key for the API server.
admin_client_cert (str)
The admin client certificate.
admin_client_key (str)
The admin client key.
kube_proxy_client_cert (str)
The kube-proxy client certificate.
kube_proxy_client_key (str)
The kube-proxy client key.
kube_scheduler_client_cert (str)
The kube-scheduler client certificate.
kube_scheduler_client_key (str)
The kube-scheduler client key.
kube_controller_manager_client_cert (str)
The controller manager client certificate.
kube_controller_manager_client_key (str)
The controller manager client key.
service_account_key (str)
The service account key.
api_server_cert (str)
The API server certificate.
api_server_key (str)
The API server key.
kubelet_cert (str)
The kubelet certificate.
kubelet_key (str)
The kubelet key.
kubelet_client_cert (str)
The kubelet client certificate.
kubelet_client_key (str)
The kubelet client key.
extra_node_config_files (Dict[str, str])
Additional configuration files for nodes.
extra_node_kube_apiserver_args (Dict[str, Optional[str]])
key-value service args .
extra_node_kube_controller_manager_args (Dict[str, Optional[str]])
key-value service args .
extra_node_kube_scheduler_args (Dict[str, Optional[str]])
key-value service args .
extra_node_kube_proxy_args (Dict[str, Optional[str]])
key-value service args .
extra_node_kubelet_args (Dict[str, Optional[str]])
key-value service args .
extra_node_containerd_args (Dict[str, Optional[str]])
key-value service args .
extra_node_k8s_dqlite_args (Dict[str, Optional[str]])
key-value service args
extra_node_containerd_config (Dict[str, Any])
key-value config args
containerd_base_dir (str)
The base directory for containerd.

class CreateClusterRequest

Request model for creating a new Canonical Kubernetes cluster.

Attributes

name (str)
The name of the cluster to be created.
address (str)
The address where the cluster is hosted.
config (BootstrapConfig)
Additional configuration parameters for the cluster.

class UpdateClusterConfigRequest

Request model for updating Cluster config.

Attributes

config (Optional[UserFacingClusterConfig])
The cluster configuration.
datastore (Optional[UserFacingDatastoreConfig])
The clusters datastore configuration.

class NodeJoinConfig

Request model for the config on a node joining the cluster.

Attributes

model_config
ConfigDict instance for the model.
kubelet_cert (str)
node's certificate
kubelet_key (str)
node's certificate key
kubelet_client_cert (str)
Kubelet client certificate
kubelet_client_key (str)
Kubelet client key
kube_proxy_client_cert (str)
Kube-proxy client certificate
kube_proxy_client_key (str)
Kube-proxy client key
extra_node_kube_proxy_args (Dict[str, str])
key-value service args
extra_node_kubelet_args (Dict[str, str])
key-value service args
extra_node_containerd_args ([Dict[str,str]])
key-value service args
extra_node_containerd_config ([Dict[str,Any]])
key-value config args
containerd_base_dir (str)
The base directory for containerd.

class ControlPlaneNodeJoinConfig

Request model for the config on a control-plane node joining the cluster.

Attributes

model_config
ConfigDict instance for the model.
extra_sans (List[str])
List of extra sans for the self-signed certificates
apiserver_crt (str)
API server certificate
apiserver_key (str)
API server certificate key
front_proxy_client_crt (str)
Front proxy client certificate
front_proxy_client_key (str)
Front proxy client key
admin_client_cert (str)
Admin client certificate
admin_client_key (str)
Admin client key
kube_scheduler_client_cert (str)
Kube-scheduler client certificate
kube_scheduler_client_key (str)
Kube-scheduler client key
kube_controller_manager_client_cert (str)
Controller manager client certificate
kube_controller_manager_client_key (str)
Controller manager client key
extra_node_config_files (Dict[str, str])
Additional node config files
extra_node_kube_apiserver_args (Dict[str, Optional[str]])
API server args .
extra_node_kube_controller_manager_args (Dict[str, Optional[str]])
Controller manager args
extra_node_kube_scheduler_args (Dict[str, Optional[str]])
Scheduler args
extra_node_k8s_dqlite_args (Dict[str, Optional[str]])
Dqlite args
extra_node_containerd_config (Dict[str, Any])
Containerd config

class JoinClusterRequest

Request model for a node joining the cluster.

Attributes

model_config
ConfigDict instance for the model.
name (str)
node's certificate
address (str)
node's certificate key
token (str)
token
config (NodeJoinConfig)
Node Config

Methods

JoinClusterRequest. serialize_token( self , token: SecretStr )

Serialize the token to a string.

Arguments

token (SecretStr)

The token to serialize.

Returns

str

The serialized token.

JoinClusterRequest. serialize_config( self , config )

Serialize the config to a YAML string.

Arguments

config (Optional[NodeJoinConfig])

The config to serialize.

Returns

Optional[str]

The serialized config.

class DatastoreStatus

information regarding the active datastore.

Attributes

datastore_type (str)
external or k8s-dqlite datastore
servers
(List(str)): list of server addresses of the external datastore cluster.

class ClusterStatus

Represents the overall status of the k8sd cluster.

Attributes

ready (bool)
Indicates if the cluster is ready.
members (List[ClusterMember])
List of members in the cluster.
config (UserFacingClusterConfig)
information about the cluster configuration.
datastore (DatastoreStatus)
information regarding the active datastore.

class ClusterMetadata

Metadata containing status information about the k8sd cluster.

Attributes

status (ClusterStatus)
The status of the k8sd cluster.

class GetClusterStatusResponse

Response model for getting the status of the k8sd cluster.

Attributes

metadata (ClusterMetadata)
Metadata containing the cluster status. Can be None if the status is not available.

class KubeConfigMetadata

Metadata containing kubeconfig.

Attributes

kubeconfig (KubeConfigMetadata)
The status of the k8sd cluster.

class GetKubeConfigResponse

Response model for getting the kubeconfig from the cluster.

Attributes

metadata (KubeconfigMetadata)
Metadata containing the kubeconfig.

class RefreshCertificatesPlanMetadata

Metadata for the certificates plan response.

Description

Attributes: model_config: ConfigDict instance for the model. seed (int): The seed for the new certificates. certificate_signing_requests (Optional[list[str]]): List of names of the CertificateSigningRequests that need to be signed externally (for worker nodes).

class RefreshCertificatesPlanResponse

Response model for the refresh certificates plan.

Attributes

metadata (RefreshCertificatesPlanMetadata)
Metadata for the certificates plan response.

class RefreshCertificatesRunRequest

Request model for running the refresh certificates run.

Attributes

model_config
ConfigDict instance for the model.
seed (int)
The seed for the new certificates from plan response.
expiration_seconds (int)
The duration of the new certificates.
extra_sans (list[str])
List of extra sans for the new certificates.

class RefreshCertificatesRunMetadata

Metadata for RefreshCertificatesRunResponse.

Description

Attributes: model_config: ConfigDict instance for the model. expiration_seconds (int): The duration of the new certificates (might not match the requested value).

class RefreshCertificatesRunResponse

Response model for the refresh certificates run.

Attributes

metadata (RefreshCertificatesRunMetadata)
Metadata for the certificates run response.

class GetClusterConfigMetadata

Metadata containing the cluster config.

Attributes

status (UserFacingClusterConfig)
The configuration of the cluster.
datastore (UserFacingDatastoreConfig)
The configuration of the datastore.
pod_cidr (str)
The CIDR range for the pods in the cluster.
service_cidr (str)
The CIDR range for the services in the cluster.

class GetClusterConfigResponse

Response model for the get cluster config endpoint.

Attributes

metadata (GetClusterConfigMetadata)
Metadata containing the cluster config.

class NodeStatus

Represents the status of a node in the cluster.

Attributes

name (Optional[str])
The name of the node.
address (Optional[str])
The address of the node.
cluster_role (Optional[str])
The role of the node in the cluster.
datastore_role (Optional[str])
The role of the node in the datastore cluster.

class GetNodeStatusMetadata

Metadata containing the node status.

Attributes

status (NodeStatus)
The status of the local node.
taints (Optional[List[str]])
List of taints applied to the node.

class GetNodeStatusResponse

Response model for the get node status endpoint.

Attributes

metadata (GetNodeStatusMetadata)
Metadata containing the node status.

class UnixSocketHTTPConnection

Description

HTTP connection over a Unix socket. None

Methods

UnixSocketHTTPConnection. __init__( self , unix_socket: str , timeout: int )

Initialise the UnixSocketHTTPConnection.

Arguments

unix_socket (str)

Path to the Unix socket.

timeout (int)

Connection timeout in seconds.

UnixSocketHTTPConnection. connect( self )

Establish a connection to the server using a Unix socket.

class ConnectionFactory

Description

Abstract factory for creating connection objects. None

Methods

ConnectionFactory. create_connection( self )

Create a new connection instance.

class UnixSocketConnectionFactory

Description

Concrete factory for creating Unix socket connections. None

Methods

UnixSocketConnectionFactory. __init__( self , unix_socket: str , timeout: int )

Initialize a new instance of UnixSocketConnectionFactory.

Arguments

unix_socket (str)

The file path to the Unix socket.

timeout (int)

The timeout for the connection in seconds. Defaults to 30 seconds.

UnixSocketConnectionFactory. create_connection( self )

Create and manage a Unix socket HTTP connection.

Returns

UnixSocketHTTPConnection

The created Unix socket HTTP connection.

class HTTPConnectionFactory

Description

Concrete factory for creating HTTP connections. None

Methods

HTTPConnectionFactory. __init__( self , host: str , port , timeout: int )

Initialize a new instance of HTTPConnectionFactory.

Arguments

host (str)

Hostname for the HTTP connection.

port (int)

Port for the HTTP connection.

timeout (int)

The timeout for the connection in seconds. Defaults to 30 seconds.

HTTPConnectionFactory. create_connection( self )

Create and manage an HTTP connection.

Returns

HTTPConnection

The created HTTP connection.

class K8sdAPIManager

Description

Manager for K8sd API interactions. None

Methods

K8sdAPIManager. __init__( self , factory: ConnectionFactory )

Initialise the K8sdAPIManager.

Arguments

factory (ConnectionFactory)

An instance of a connection factory that will be used to create connections. This factory determines the type of connection (e.g., Unix socket or HTTP).

K8sdAPIManager. create_join_token( self , name: str , worker: bool )

Create a join token.

Arguments

name (str)

Name of the node.

worker (bool)

Whether the node should join as control-plane or worker.

Returns

SecretStr

The generated join token if successful.

K8sdAPIManager. join_cluster( self , config: JoinClusterRequest )

Join a node to the k8s cluster.

Arguments

config

JoinClusterRequest: config to join the cluster

K8sdAPIManager. remove_node( self , name: str , force: bool )

Remove a node from the cluster.

Arguments

name (str)

Name of the node that should be removed.

force (bool)

Forcibly remove the node

K8sdAPIManager. update_cluster_config( self , config: UpdateClusterConfigRequest )

Enable or disable a k8s component.

Arguments

config (UpdateClusterConfigRequest)

The cluster configuration.

K8sdAPIManager. get_cluster_config( self )

Retrieve the cluster configuration.

Returns

GetClusterConfigResponse

The cluster configuration.

Description

Worker nodes are not allowed to call this endpoint: https://github.com/canonical/k8s-snap/blob/0a5edd2/src/k8s/pkg/k8sd/api/endpoints.go#L121-L126

K8sdAPIManager. get_node_status( self )

Retrieve the status of the local node.

Returns

GetNodeStatusResponse

The status of the local node.

K8sdAPIManager. get_cluster_status( self )

Retrieve cluster status.

Returns

cluster_status

status of the cluster.

K8sdAPIManager. is_cluster_bootstrapped( self )

Check if K8sd has been bootstrapped.

Returns

bool

True if the cluster has been bootstrapped, False otherwise.

K8sdAPIManager. is_cluster_ready( self )

Check if the Kubernetes cluster is ready.

Returns

bool

True if the cluster is ready, False otherwise.

Description

The cluster is ready if at least one k8s node is in READY state.

K8sdAPIManager. check_k8sd_ready( self )

Check if k8sd is ready using various microcluster endpoints.

K8sdAPIManager. bootstrap_k8s_snap( self , request: CreateClusterRequest )

Bootstrap the k8s cluster.

Arguments

request (CreateClusterRequest)

The request model to bootstrap the cluster.

K8sdAPIManager. request_auth_token( self , username: str , groups )

Request a Kubernetes authentication token.

Arguments

username (str)

Username for which the token is requested.

groups (List[str])

Groups associated with the user.

Returns

SecretStr

The authentication token.

K8sdAPIManager. revoke_auth_token( self , token: str )

Revoke a Kubernetes authentication token.

Arguments

token (str)

The authentication token.

K8sdAPIManager. get_kubeconfig( self , server )

Request a Kubernetes admin config.

Arguments

server (str)

Optional server to replace in the kubeconfig endpoint

Returns

str

The authentication token.

K8sdAPIManager. refresh_certs( self , extra_sans , expiration_seconds )

Refresh the certificates for the cluster.

Arguments

extra_sans (list[str])

List of extra SANs for the certificates.

expiration_seconds (Optional[int])

The duration of the new certificates.