Skip to content

k8sVoodoo/kubegen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

kubegen

kubegen is a CLI tool for generating, applying, and updating Kubernetes configurations. It simplifies the management of Kubernetes resources by automating common tasks.

Features

  • Generate: Create Kubernetes configuration files from templates.
  • Apply: Apply configuration files to your Kubernetes cluster.
  • Update Image: Update the container image in existing Kubernetes resources.

Installation

  1. Build from Source

    Clone the repository and build the tool:

    git clone <repository-url>
    cd kubegen
    go build -o kubegen
    

Add to PATH

Add the kubegen binary to your PATH for easier access.

Usage

Generate

Generate a Kubernetes configuration file.

kubegen generate --type <resource-type> --name <resource-name> [--namespace <namespace>] [--image <image>]

Flags:

--type, -t: Type of Kubernetes resource (e.g., deployment, statefulset, service). --name, -n: Name of the Kubernetes resource. --namespace, -N: Namespace for the Kubernetes resource (default: default). --image, -i: Container image to use (default: my-image:latest). Examples:

kubegen generate --type <resource-type> --name <resource-name> [--namespace <namespace>] [--image <image>]

Apply

Apply a Kubernetes configuration file to the cluster.

kubegen apply <file-path>

Examples:

kubegen apply path/to/generated-deployment-my-deployment.yaml

Update Image

Update the container image in a Kubernetes resource.

kubegen update-image --type <resource-type> --name <resource-name> --version <image-version>

Flags:

--type, -t: Type of Kubernetes resource (deployment, daemonset, statefulset). --name, -n: Name of the Kubernetes resource. --version, -v: New container image version (e.g., my-image:new-tag).

Examples:

kubegen update-image -t deployment -n my-deployment -v my-image:new-tag

Help

For more information on each command, use the --help flag:

kubegen --help
kubegen generate --help
kubegen apply --help
kubegen update-image --help

About

CLI tool to generate kubernetes manifests

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages