k3s
Runs a k3s server than can be accessed both locally and in your pipelines
Installation
dagger install github.com/marcosnils/daggerverse/k3s@v0.1.0
Entrypoint
Return Type
K3S !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
name | String ! | - | No description provided |
image | String | "rancher/k3s:latest" | No description provided |
Example
dagger -m github.com/marcosnils/daggerverse/k3s@f4851a9c308410d58c5199dfd1b65e4f3ccae813 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@f4851a9c308410d58c5199dfd1b65e4f3ccae813 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@f4851a9c308410d58c5199dfd1b65e4f3ccae813 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
Name | Type | Default Value | Description |
---|---|---|---|
c | Container ! | - | No description provided |
Example
dagger -m github.com/marcosnils/daggerverse/k3s@f4851a9c308410d58c5199dfd1b65e4f3ccae813 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
Name | Type | Default Value | Description |
---|---|---|---|
local | Boolean | false | No description provided |
Example
dagger -m github.com/marcosnils/daggerverse/k3s@f4851a9c308410d58c5199dfd1b65e4f3ccae813 call \
--name string config
func (m *myModule) example(name string) *File {
return dag.
K3s(name).
Config()
}
@function
def example(name: str, ) -> dagger.File:
return (
dag.k3s(name)
.config()
)
@func()
example(name: string, ): File {
return dag
.k3s(name)
.config()
}
kubectl() 🔗
runs kubectl on the target k3s cluster
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
args | String ! | - | No description provided |
Example
dagger -m github.com/marcosnils/daggerverse/k3s@f4851a9c308410d58c5199dfd1b65e4f3ccae813 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@f4851a9c308410d58c5199dfd1b65e4f3ccae813 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()
}