Dagger
Search

k3s

Runs a k3s server than can be accessed both locally and in your pipelines

Installation

dagger install github.com/marcosnils/daggerverse/k3s@v0.0.5

Entrypoint

Return Type
K3S !
Arguments
NameTypeDescription
nameString !No description provided
Example
dagger -m github.com/marcosnils/daggerverse/k3s@c3ebb4b4d3ddb0dcfe1e6a47da5d2d0c4ef8784d call \
 --name string
func (m *myModule) example(name string) *K3S  {
	return dag.
			K3s(name)
}
@function
def example(name: str) -> dag.K3S:
	return (
		dag.k3s(name)
	)
@func()
example(name: string): K3S {
	return dag
		.k3s(name)
}

Types

K3S 🔗

container() 🔗

Return Type
Container !
Example
dagger -m github.com/marcosnils/daggerverse/k3s@c3ebb4b4d3ddb0dcfe1e6a47da5d2d0c4ef8784d call \
 --name string container
func (m *myModule) example(name string) *Container  {
	return dag.
			K3s(name).
			Container()
}
@function
def example(name: str) -> dagger.Container:
	return (
		dag.k3s(name)
		.container()
	)
@func()
example(name: string): Container {
	return dag
		.k3s(name)
		.container()
}

server() 🔗

Returns a newly initialized kind cluster

Return Type
Service !
Example
dagger -m github.com/marcosnils/daggerverse/k3s@c3ebb4b4d3ddb0dcfe1e6a47da5d2d0c4ef8784d call \
 --name string server
func (m *myModule) example(name string) *Service  {
	return dag.
			K3s(name).
			Server()
}
@function
def example(name: str) -> dagger.Service:
	return (
		dag.k3s(name)
		.server()
	)
@func()
example(name: string): Service {
	return dag
		.k3s(name)
		.server()
}

withContainer() 🔗

Returns a newly initialized kind cluster

Return Type
K3S !
Arguments
NameTypeDefault ValueDescription
cContainer !-No description provided
Example
dagger -m github.com/marcosnils/daggerverse/k3s@c3ebb4b4d3ddb0dcfe1e6a47da5d2d0c4ef8784d call \
 --name string with-container --c IMAGE:TAG
func (m *myModule) example(name string, c *Container) *K3S  {
	return dag.
			K3s(name).
			WithContainer(c)
}
@function
def example(name: str, c: dagger.Container) -> dag.K3S:
	return (
		dag.k3s(name)
		.with_container(c)
	)
@func()
example(name: string, c: Container): K3S {
	return dag
		.k3s(name)
		.withContainer(c)
}

config() 🔗

returns the config file for the k3s cluster

Return Type
File !
Arguments
NameTypeDefault ValueDescription
localBoolean !-default=false
Example
dagger -m github.com/marcosnils/daggerverse/k3s@c3ebb4b4d3ddb0dcfe1e6a47da5d2d0c4ef8784d call \
 --name string config --local boolean
func (m *myModule) example(name string, local bool) *File  {
	return dag.
			K3s(name).
			Config(local)
}
@function
def example(name: str, local: bool) -> dagger.File:
	return (
		dag.k3s(name)
		.config(local)
	)
@func()
example(name: string, local: boolean): File {
	return dag
		.k3s(name)
		.config(local)
}

kubectl() 🔗

runs kubectl on the target k3s cluster

Return Type
String !
Arguments
NameTypeDefault ValueDescription
argsString !-No description provided
Example
dagger -m github.com/marcosnils/daggerverse/k3s@c3ebb4b4d3ddb0dcfe1e6a47da5d2d0c4ef8784d call \
 --name string kubectl --args string
func (m *myModule) example(ctx context.Context, name string, args string) string  {
	return dag.
			K3s(name).
			Kubectl(ctx, args)
}
@function
async def example(name: str, args: str) -> str:
	return await (
		dag.k3s(name)
		.kubectl(args)
	)
@func()
async example(name: string, args: string): Promise<string> {
	return dag
		.k3s(name)
		.kubectl(args)
}

kns() 🔗

runs k9s on the target k3s cluster

Return Type
Container !
Example
dagger -m github.com/marcosnils/daggerverse/k3s@c3ebb4b4d3ddb0dcfe1e6a47da5d2d0c4ef8784d call \
 --name string kns
func (m *myModule) example(name string) *Container  {
	return dag.
			K3s(name).
			Kns()
}
@function
def example(name: str) -> dagger.Container:
	return (
		dag.k3s(name)
		.kns()
	)
@func()
example(name: string): Container {
	return dag
		.k3s(name)
		.kns()
}