Config
struct ConfigImplements Copyable, Movable
- Fields
server: String: The API server's base URL,https://host:port.ca_file: String: A PEM bundle the server's certificate must chain to; empty for the system's.cert_file: String: A PEM client certificate, or empty.key_file: Stringtoken: String: A bearer token, or empty.token_file: String: A file the token is read from for every request, or empty.namespace: String: The namespace a context or pod is in;defaultif none is said.
__init__
def __init__(out self, server: String, ca_file: String = "", cert_file: String = "", key_file: String = "", token: String = "", token_file: String = "", namespace: String = "default") bearer
def bearer(self) -> String The token to send now: the file's, read again, or the given one.
load
def load() -> Self In a pod, its service account's; otherwise the kubeconfig's current context.
in_cluster
def in_cluster() -> Self from_kubeconfig
def from_kubeconfig(path: String = "", context: String = "") -> Self The kubeconfig at path (else the first of $KUBECONFIG, else ~/.kube/config), in context (else its current context).