class Kube::Client::Config
- Kube::Client::Config
- Reference
- Object
Overview
Kubernetes client configuration class
Defined in:
kube/client/config.crkube/client/config/context.cr
kube/error.cr
Constructors
-
.new(data : YAML::Any, kcfg_path : String | Nil = nil)
data (Hash) - Parsed kubeconfig data.
Class Method Summary
-
.read(filename : String)
Builds Config instance by parsing given file, with lookups relative to file's directory.
Instance Method Summary
-
#contexts : Array(String)
Returns all the available contexts
- #current_context
-
#fetch_context(context_name : String)
Fetch the cluster, user and namespace information for the provided {context_name}
- #fetch_user_auth_options(user : YAML::Any)
Constructor Detail
def self.new(data : YAML::Any, kcfg_path : String | Nil = nil)
#
data (Hash) - Parsed kubeconfig data. kcfg_path (string) - Base directory for resolving relative references to external files. If set to nil, all external lookups & commands are disabled (even for absolute paths). See also the more convenient Config.read
Class Method Detail
def self.read(filename : String)
#
Builds Config instance by parsing given file, with lookups relative to file's directory.
Instance Method Detail
def fetch_context(context_name : String)
#
Fetch the cluster, user and namespace information for the provided {context_name}