Dagger
Search

kubectl

No long description provided.

Installation

dagger install github.com/aweris/daggerverse/kubectl@1c14645e0139a4ca73969bc9314069d8e6d3b18b

Entrypoint

Return Type
Kubectl
Example
dagger -m github.com/aweris/daggerverse/kubectl@1c14645e0139a4ca73969bc9314069d8e6d3b18b call \
func (m *myModule) example() *Kubectl  {
	return dag.
			Kubectl()
}
@function
def example() -> dag.Kubectl:
	return (
		dag.kubectl()
	)
@func()
example(): Kubectl {
	return dag
		.kubectl()
}

Types

Kubectl 🔗

Kubectl represents the kubectl module for Dagger.

cli() 🔗

Cli returns a kubectl cli with the given config.

Return Type
Cli !
Arguments
NameTypeDefault ValueDescription
configFile !-No description provided
Example
dagger -m github.com/aweris/daggerverse/kubectl@1c14645e0139a4ca73969bc9314069d8e6d3b18b call \
 cli --config file:path
func (m *myModule) example(config *File) *KubectlCli  {
	return dag.
			Kubectl().
			Cli(config)
}
@function
def example(config: dagger.File) -> dag.KubectlCli:
	return (
		dag.kubectl()
		.cli(config)
	)
@func()
example(config: File): KubectlCli {
	return dag
		.kubectl()
		.cli(config)
}

Cli 🔗

config() 🔗

Return Type
File !
Example
dagger -m github.com/aweris/daggerverse/kubectl@1c14645e0139a4ca73969bc9314069d8e6d3b18b call \
 cli --config file:path \
 config
func (m *myModule) example(config *File) *File  {
	return dag.
			Kubectl().
			Cli(config).
			Config()
}
@function
def example(config: dagger.File) -> dagger.File:
	return (
		dag.kubectl()
		.cli(config)
		.config()
	)
@func()
example(config: File): File {
	return dag
		.kubectl()
		.cli(config)
		.config()
}

exec() 🔗

Exec executes the given kubectl command and returns the stdout.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
args[String ! ] !-No description provided
Example
dagger -m github.com/aweris/daggerverse/kubectl@1c14645e0139a4ca73969bc9314069d8e6d3b18b call \
 cli --config file:path \
 exec --args string1 --args string2
func (m *myModule) example(ctx context.Context, config *File, args []string) string  {
	return dag.
			Kubectl().
			Cli(config).
			Exec(ctx, args)
}
@function
async def example(config: dagger.File, args: List[str]) -> str:
	return await (
		dag.kubectl()
		.cli(config)
		.exec(args)
	)
@func()
async example(config: File, args: string[]): Promise<string> {
	return dag
		.kubectl()
		.cli(config)
		.exec(args)
}

container() 🔗

Container returns a container with the kubectl image and given config. The entrypoint is set to kubectl.

Return Type
Container !
Example
dagger -m github.com/aweris/daggerverse/kubectl@1c14645e0139a4ca73969bc9314069d8e6d3b18b call \
 cli --config file:path \
 container
func (m *myModule) example(config *File) *Container  {
	return dag.
			Kubectl().
			Cli(config).
			Container()
}
@function
def example(config: dagger.File) -> dagger.Container:
	return (
		dag.kubectl()
		.cli(config)
		.container()
	)
@func()
example(config: File): Container {
	return dag
		.kubectl()
		.cli(config)
		.container()
}