- class K3SContainer(image='rancher/k3s:latest', enable_cgroup_mount=True, **kwargs)ΒΆ
K3S container.
Example
>>> import yaml >>> from testcontainers.k3s import K3SContainer >>> from kubernetes import client, config >>> with K3SContainer() as k3s: ... config.load_kube_config_from_dict(yaml.safe_load(k3s.config_yaml())) ... pod = client.CoreV1Api().list_pod_for_all_namespaces(limit=1) ... assert len(pod.items) > 0, "Unable to get running nodes from k3s cluster"