NAME

Kubernetes::REST::CLI - CLI base class for Kubernetes::REST command-line tools

VERSION

version 1.001

SYNOPSIS

kube_client <command> [options]

# Get resources
kube_client get Pod my-pod -n default
kube_client get Deployment --output yaml

# Create from file
kube_client create -f deployment.yaml

# Delete resources
kube_client delete Pod my-pod -n default

DESCRIPTION

Base class for the kube_client command-line tool. Provides common functionality for managing Kubernetes resources from the command line.

This tool uses Kubernetes::REST::Kubeconfig to connect to the cluster, so it reads from ~/.kube/config by default.

COMMANDS

get

kube_client get <Kind> [name] [options]

Get a resource or list resources.

get Pod - List all pods in the namespace
get Pod my-pod - Get a specific pod
--output json (default) - JSON output
--output yaml - YAML output
--output name - Names only

create

kube_client create -f <file>

Create a resource from a YAML or JSON file. Use -f - to read from stdin.

delete

kube_client delete <Kind> <name> [options]

Delete a resource by name.

raw

kube_client raw <Group> <Method> [key=value ...]

Make a raw v0 API call (DEPRECATED).

GLOBAL OPTIONS

--namespace

Namespace for namespaced resources. Defaults to default.

Short form: -n

--output

Output format. One of: json, yaml, name.

Defaults to json.

Short form: -o

json

JSON::MaybeXS encoder instance for JSON output.

format_output

$cli->format_output($result);

Format and print the result according to the --output option.

execute

Default execute method. Prints usage information.

SEE ALSO

SUPPORT

Issues

Please report bugs and feature requests on GitHub at https://github.com/pplu/kubernetes-rest/issues.

IRC

Join #kubernetes on irc.perl.org or message Getty directly.

CONTRIBUTING

Contributions are welcome! Please fork the repository and submit a pull request.

AUTHORS

  • Torsten Raudssus <torsten@raudssus.de>

  • Jose Luis Martinez Torres <jlmartin@cpan.org> (JLMARTIN, original author, inactive)

COPYRIGHT AND LICENSE

This software is Copyright (c) 2019 by Jose Luis Martinez.

This is free software, licensed under:

The Apache License, Version 2.0, January 2004