class Kube::Client
- Kube::Client
- Reference
- Object
Included Modules
Defined in:
kube/client.crkube/client/api.cr
kube/client/config.cr
kube/client/config/context.cr
kube/error.cr
kube/version.cr
Constant Summary
-
VERSION =
"0.1.0"
Constructors
- .new(kube_file : String)
-
.new
Initialize a Client using the
KUBECONFIG
env
Instance Method Summary
- #api : Kube::Client::Api
-
#change_context(context_name : String)
Change the current context
- #config : Kube::Client::Config
- #context : Hash(Symbol, String | YAML::Any | Nil)
- #context=(context : Hash(Symbol, String | YAML::Any | Nil))
- #pods(namespace : String | Nil = nil, label_selector : Hash(String, String) | Nil = nil)
Constructor Detail
Instance Method Detail
def change_context(context_name : String)
#
Change the current context
@example
client = Kube::Client.new("~/.kube/config")
client.context[:name] => "mysql-test"
client.change_context("mysql-helper")
client.context[:name] => "mysql-helper"