kubexporter

command module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

README

Go Docker Repository on Quay Go Report Card GitHub Release

KubExporter

KubExporter allows you to export resources from kubernetes as yaml/json files.

The configuration allows customization on which resources and which fields to exclude.

Usage

kubexporter --config config.yaml
Config

KubExporter exports by default all resources and allows to exclude unwanted resources. The benefit is that new custom resource definitions are automatically considered in the export.

Example configuration

summary: true # print a summary
progress: true # print progress
archive: true # create an archive
namespace: # define a single namespace (default all)
worker: 1 # define the number of parallel worker
excluded:
  kinds: # list all kinds to be excluded
    - Binding
    - ComponentStatus
    - Endpoints
    - Event
    - LimitRange
    - LocalSubjectAccessReview
    - PersistentVolume
    - Pod
    - ReplicationController
    - ReplicationControllerDummy
    - RoleBindingRestriction
    - Secret
    - apps.ReplicaSet
    - authentication.k8s.io.TokenReview
    - authorization.k8s.io.LocalResourceAccessReview
    - authorization.k8s.io.LocalSubjectAccessReview
    - authorization.k8s.io.ResourceAccessReview
    - authorization.k8s.io.SelfSubjectAccessReview
    - authorization.k8s.io.SelfSubjectRulesReview
    - authorization.k8s.io.SubjectAccessReview
    - authorization.openshift.io.LocalResourceAccessReview
    - authorization.openshift.io.LocalSubjectAccessReview
    - authorization.openshift.io.ResourceAccessReview
    - authorization.openshift.io.SelfSubjectRulesReview
    - authorization.openshift.io.SubjectAccessReview
    - authorization.openshift.io.SubjectRulesReview
    - batch.Job
    - build.openshift.io.Build
    - events.k8s.io.Event
    - extensions.ReplicaSet
    - image.openshift.io.Image
    - image.openshift.io.ImageSignature
    - image.openshift.io.ImageStreamImage
    - image.openshift.io.ImageStreamImage
    - image.openshift.io.ImageStreamImport
    - image.openshift.io.ImageStreamMapping
    - image.openshift.io.ImageStreamTag
    - security.openshift.io.PodSecurityPolicyReview
    - security.openshift.io.PodSecurityPolicySelfSubjectReview
    - security.openshift.io.PodSecurityPolicySubjectReview
    - user.openshift.io.UserIdentityMapping
  fields: # list fields that should be removed for all resources before exported
    - [ status ]
    - [ metadata, uid ]
    - [ metadata, selfLink ]
    - [ metadata, resourceVersion ]
    - [ metadata, creationTimestamp ]
    - [ metadata, generation ]
    - [ metadata, annotations, "kubectl.kubernetes.io/last-applied-configuration" ]
  kindFields: # kind specific excluded fields
    Service:
      - [ spec, clusterIP ]
    image.openshift.io.ImageStream:
      - [ annotations, "openshift.io/image.dockerRepositoryCheck" ]

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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