class Kube::Client

Included Modules

Extended Modules

Defined in:

kube-client/version.cr
kube/client.cr
kube/client/api.cr
kube/client/config.cr
kube/client/config/auth_provider.cr
kube/client/config/context.cr
kube/client/error.cr
kube/client/service_account.cr

Constant Summary

VERSION = "0.2.0"

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(kube_file : String) #

[View source]
def self.new #

Initialize a Client using the KUBECONFIG env

TODO handle multiple config files


[View source]

Class Method Detail

def self.logger #

[View source]

Instance Method Detail

def add_pod_label(pod_name : String, key : String, value : String, namespace : String | Nil = nil) #

[View source]
def api : Kube::Client::Api #

[View source]
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"

[View source]
def config : Kube::Client::Config #

[View source]
def context : Hash(Symbol, String | YAML::Any | Nil) #

[View source]
def context=(context : Hash(Symbol, String | YAML::Any | Nil)) #

[View source]
def del_pod_label(pod_name : String, key : String, namespace : String | Nil = nil) #

[View source]
def delete_pod(name : String, namespace : String | Nil = nil) #

Delete pod


[View source]
def logger #

[View source]
def mod_pod_label(mod, pod_name : String, key : String, value : String, namespace : String | Nil = nil) #

[View source]
def namespaces(label_selector : Hash(String, String) | Nil = nil) #

[View source]
def nodes(label_selector : Hash(String, String) | Nil = nil) #

[View source]
def patch(path, data) #

[View source]
def pods(namespace : String | Nil = nil, label_selector : Hash(String, String) | Nil = nil) #

Gathers all the pods


[View source]
def secrets(namespace : String | Nil = nil, label_selector : Hash(String, String) | Nil = nil) #

[View source]
def select_pods(namespace : String | Nil = nil, label_selector : Hash(String, String) | Nil = nil, status : String | Nil = nil) : Array(JSON::Any) #

Will select pods with the provided status


[View source]
def stream #

[View source]
def watch_nodes(label_selector : Hash(String, String) | Nil = nil) #

[View source]
def watch_pods(namespace : String | Nil = nil, label_selector : Hash(String, String) | Nil = nil) #

[View source]