Description

K3s is a highly available, certified Kubernetes distribution designed for production workloads in unattended, resource-constrained, remote locations or inside IoT appliances.

Examples

Dependency:
<dependency>
    <groupId>org.testcontainers</groupId>
    <artifactId>k3s</artifactId>
    <version>1.20.0</version>
    <scope>test</scope>
</dependency>
Usage:
var k3s = new K3sContainer(DockerImageName.parse("rancher/k3s:v1.21.3-k3s1"));
k3s.start();
Dependency:
go get github.com/testcontainers/testcontainers-go/modules/k3s
Usage:
k3sContainer, err := k3s.Run(ctx, "rancher/k3s:v1.27.1-k3s1")
Dependency:
dotnet add package Testcontainers.K3s --version 3.9.0
Usage:
var k3sConainter = new K3sBuilder()
  .WithImage("rancher/k3s:v1.26.2-k3s1")
  .Build();
await k3sConainter.StartAsync();
Dependency:
pip install testcontainers[k3s]
Usage:
with K3SContainer() as k3s:
    kube_config = k3s.config_yaml()
Dependency:
npm install @testcontainers/k3s --save-dev
Usage:
const container = await new K3sContainer("rancher/k3s:v1.31.2-k3s1").start();