k3s
Runs a k3s server than can be accessed both locally and in your pipelines
Installation
dagger install github.com/nilium/dagdug/k3s@c8a4824185c306c7ccb169eb2a0cff48f732c399
Entrypoint
Return Type
K3S !
Arguments
Name | Type | Description |
---|---|---|
name | String | Name of the k3s cluster |
base | Container | Override the base rancher/k3s container with a custom one |
port | Integer | HTTPS listen port |
Example
dagger -m github.com/nilium/dagdug/k3s@c8a4824185c306c7ccb169eb2a0cff48f732c399 call \
func (m *myModule) example() *K3S {
return dag.
K3s()
}
@function
def example() -> dag.K3S:
return (
dag.k3s()
)
@func()
example(): K3S {
return dag
.k3s()
}
Types
K3S 🔗
container() 🔗
Returns a configured container for the k3s
Return Type
Container !
Example
dagger -m github.com/nilium/dagdug/k3s@c8a4824185c306c7ccb169eb2a0cff48f732c399 call \
container
func (m *myModule) example() *Container {
return dag.
K3s().
Container()
}
@function
def example() -> dagger.Container:
return (
dag.k3s()
.container()
)
@func()
example(): Container {
return dag
.k3s()
.container()
}
server() 🔗
Returns initialized k3s cluster
Return Type
Service !
Example
dagger -m github.com/nilium/dagdug/k3s@c8a4824185c306c7ccb169eb2a0cff48f732c399 call \
server
func (m *myModule) example() *Service {
return dag.
K3s().
Server()
}
@function
def example() -> dagger.Service:
return (
dag.k3s()
.server()
)
@func()
example(): Service {
return dag
.k3s()
.server()
}
kubeconfig() 🔗
Returns the kubeconfig file from the k3s container
Return Type
File !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
local | Boolean | false | Indicates that the kubeconfig should be use localhost instead of the container IP. This is useful when running k3s as service |
Example
dagger -m github.com/nilium/dagdug/k3s@c8a4824185c306c7ccb169eb2a0cff48f732c399 call \
kubeconfig
func (m *myModule) example() *File {
return dag.
K3s().
Kubeconfig()
}
@function
def example() -> dagger.File:
return (
dag.k3s()
.kubeconfig()
)
@func()
example(): File {
return dag
.k3s()
.kubeconfig()
}