kubernetes/src/kubernetes/utils.rb
#
# Loads authentication and cluster information from kube-config file
# and stores them in Kubernetes::Configuration.
# @param config_file [String] Path of the kube-config file.
# @param context [String] Set the active context. If is set to nil,
#   current_context from config file will be used.
# @param client_configuration [Kubernetes::Configuration] The
#   Kubernetes::Configuration tp set configs to.
Loads authentication and cluster information from kube-config file
and stores them in Kubernetes::Configuration.
Loads authentication and cluster information from kube - config file and stores them in Kubernetes :: Configuration .
def load_kube_config(
    config_file = ENV['KUBECONFIG'],
    context: nil,
    client_configuration: Configuration.default
  )
    config_file ||= KubeConfig::KUBE_CONFIG_DEFAULT_LOCATION
    config = KubeConfig.new(config_file)
    config.configure(client_configuration, context)
  end
def load_kube_config ( config_file = ENV [ 'KUBECONFIG' ] , context : nil , client_configuration : Configuration . default ) config_file ||= KubeConfig :: KUBE_CONFIG_DEFAULT_LOCATION config = KubeConfig . new ( config_file ) config . configure ( client_configuration , context ) end
Loads authentication and cluster information from kube-config file
and stores them in Kubernetes::Configuration.
Loads authentication and cluster information from kube - config file and stores them in Kubernetes :: Configuration .
config_file
Path of the kube-config file.
Path of the kube - config file .
context
Set the active context. If is set to nil, current_context from config file will be used.
Set the active context . If is set to nil current_context from config file will be used .
client_configuration
The Kubernetes::Configuration tp set configs to.
The Kubernetes :: Configuration tp set configs to .
default