class

KCE::Extractor

Inherits Reference < Object

require "kce"

# using instance methods
# if path is omitted, KUBECONFIG env variable will be used
# if env variable is unset, it defaults to "~/.kube/config"
kce = KCE::Extractor.new("my-context", "/path/to/kubeconfig")
puts kce.config         # => config as Object (from YAML)
puts kce.config.to_yaml # => config as String (from YAML)

# using class methods
kubeconfig = KCE::Extractor.config("my-context", "/path/to/kubeconfig")

Constructors

new(kubecontext : String, kubeconfig : String | Nil = nil)
Source

Class methods

config(kubecontext : String, kubeconfig : String | Nil = nil)

Returns KUBECONFIG Object for kubecontext

Source

Instance methods

config

Returns KUBECONFIG Object for kubecontext

Source
kubeconfig

Path to KUBECONFIG

Source
kubecontext

Context to extract config for

Source