kdump

command module
v1.26.25 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2024 License: MIT Imports: 7 Imported by: 0

README

kdump

Dumps all kubernetes api resources (pods, deployments, namespaces, etc..) to files in yaml form.

Quick and dirty hack. Don't expect pretty code :).

My use case: poor man's etcd -> git sync

Dumps all api-resources from all configured contexts.

  • Calls kubectl api-resources to figure out what it has access to, then starts downloading all of it using kubectl get <resource> -o yaml > <file>.

NOTE: also dumps secrets, if you explicitly tell it to do so by providing an encryption key (aes gcm)

Usage
2023/02/19 00:18:22 Checking that kubectl is installed...
2023/02/19 00:18:22 Checking that kubectl neat is installed...
NAME:
   kdump - Dump all kubernetes resources as yaml files to a dir

USAGE:
   kdump [global options] [arguments...]

VERSION:
   v1.26.19

GLOBAL OPTIONS:
   --output-dir value, -o value    output directory to create
   --delete-previous-dir           if to delete previous output directory (default: false)
   --secrets-encryption-key value  symmetric secrets encryption hex key for aes GCM (lower case 64 chars)
   --help, -h                      show help (default: false)
   --version, -v                   print the version (default: false)
Code quality

code quality level = "hacky hack". Go is a new language to me. tests = none.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
k8s

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL