INNER CODE UNIT · Python
api
kr8s-org/kr8s · kr8s/__init__.py:198
def api(
url: str | None = None,
kubeconfig: PathType | None = None,
serviceaccount: str | None = None,
namespace: str | None = None,
context: str | None = None,
) -> Api:
"""Create a :class:`kr8s.Api` object for interacting with the Kubernetes API.
If a kr8s object already exists with the same arguments in this thread, it will be returned.
Args:
url: The URL of the Kubernetes API server
kubeconfig: The path to a kubeconfig file to use
serviceaccount: The path of a service account to use
namespace: The namespace to use
context: The context to use