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.4

Entrypoint

Return Type
K3S !
Arguments
NameTypeDescription
nameString !No description provided
Example
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
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
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
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
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
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)
}