class Kubernetes::Client

Defined in:

kubernetes.cr:15
kubernetes.cr:1049
kubernetes.cr:1053
kubernetes.cr:1058
kubernetes.cr:1063
kubernetes.cr:1068
kubernetes.cr:1074
kubernetes.cr:1080

Constructors

Instance Method Summary

Constructor Detail

def self.new(server : URI = URI.parse("https://#{ENV["KUBERNETES_SERVICE_HOST"]}:#{ENV["KUBERNETES_SERVICE_PORT"]}"), token : String = File.read("/var/run/secrets/kubernetes.io/serviceaccount/token"), certificate_file : String = "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt", log : Log = Log.for("kubernetes.client")) #

[View source]
def self.new(*, config_file : String, context context_name : String) #

[View source]

Instance Method Detail

def api_resources(group : String) #

[View source]
def apis #

[View source]
def apply_deployment(resource : Deployment, spec, name : String = resource.metadata.name, namespace : String | Nil = resource.metadata.namespace, force : Bool = false, field_manager : String | Nil = nil) #

[View source]
def apply_deployment(metadata : NamedTuple | Metadata, api_version : String = "apps/v1", kind : String = "Deployment", force : Bool = false, field_manager : String | Nil = nil, **kwargs) #

[View source]
def apply_ingress(resource : Resource(Networking::Ingress), spec, name : String = resource.metadata.name, namespace : String | Nil = resource.metadata.namespace, force : Bool = false, field_manager : String | Nil = nil) #

[View source]
def apply_ingress(metadata : NamedTuple | Metadata, api_version : String = "networking.k8s.io/v1", kind : String = "Ingress", force : Bool = false, field_manager : String | Nil = nil, **kwargs) #

[View source]
def apply_job(resource : Resource(Job), spec, name : String = resource.metadata.name, namespace : String | Nil = resource.metadata.namespace, force : Bool = false, field_manager : String | Nil = nil) #

[View source]
def apply_job(metadata : NamedTuple | Metadata, api_version : String = "batch/v1", kind : String = "Job", force : Bool = false, field_manager : String | Nil = nil, **kwargs) #

[View source]
def apply_persistentvolumeclaim(resource : Resource(JSON::Any), spec, name : String = resource.metadata.name, namespace : String | Nil = resource.metadata.namespace, force : Bool = false, field_manager : String | Nil = nil) #

[View source]
def apply_persistentvolumeclaim(metadata : NamedTuple | Metadata, api_version : String = "/v1", kind : String = "PersistentVolumeClaim", force : Bool = false, field_manager : String | Nil = nil, **kwargs) #

[View source]
def apply_pod(resource : Pod, spec, name : String = resource.metadata.name, namespace : String | Nil = resource.metadata.namespace, force : Bool = false, field_manager : String | Nil = nil) #

[View source]
def apply_pod(metadata : NamedTuple | Metadata, api_version : String = "/v1", kind : String = "Pod", force : Bool = false, field_manager : String | Nil = nil, **kwargs) #

[View source]
def apply_service(resource : Service, spec, name : String = resource.metadata.name, namespace : String | Nil = resource.metadata.namespace, force : Bool = false, field_manager : String | Nil = nil) #

[View source]
def apply_service(metadata : NamedTuple | Metadata, api_version : String = "/v1", kind : String = "Service", force : Bool = false, field_manager : String | Nil = nil, **kwargs) #

[View source]
def apply_statefulset(resource : Resource(StatefulSet), spec, name : String = resource.metadata.name, namespace : String | Nil = resource.metadata.namespace, force : Bool = false, field_manager : String | Nil = nil) #

[View source]
def apply_statefulset(metadata : NamedTuple | Metadata, api_version : String = "apps/v1", kind : String = "StatefulSet", force : Bool = false, field_manager : String | Nil = nil, **kwargs) #

[View source]
def close : Nil #

[View source]
def delete(path : String, headers = HTTP::Headers.new) #

[View source]
def delete_deployment(resource : Deployment) #

[View source]
def delete_deployment(name : String, namespace : String = "default") #

[View source]
def delete_ingress(resource : Resource(Networking::Ingress)) #

[View source]
def delete_ingress(name : String, namespace : String = "default") #

[View source]
def delete_job(resource : Resource(Job)) #

[View source]
def delete_job(name : String, namespace : String = "default") #

[View source]
def delete_persistentvolumeclaim(resource : Resource(JSON::Any)) #

[View source]
def delete_persistentvolumeclaim(name : String, namespace : String = "default") #

[View source]
def delete_pod(resource : Pod) #

[View source]
def delete_pod(name : String, namespace : String = "default") #

[View source]
def delete_service(resource : Service) #

[View source]
def delete_service(name : String, namespace : String = "default") #

[View source]
def delete_statefulset(resource : Resource(StatefulSet)) #

[View source]
def delete_statefulset(name : String, namespace : String = "default") #

[View source]
def deployment(name : String, namespace : String = "default", resource_version : String = "") #

[View source]
def deployments(namespace : String | Nil = "default", label_selector = nil) #

[View source]
def get(path : String, headers = HTTP::Headers.new, &) #

[View source]
def ingress(name : String, namespace : String = "default", resource_version : String = "") #

[View source]
def ingresses(namespace : String | Nil = "default", label_selector = nil) #

[View source]
def job(name : String, namespace : String = "default", resource_version : String = "") #

[View source]
def jobs(namespace : String | Nil = "default", label_selector = nil) #

[View source]
def patch(path : String, body, headers = HTTP::Headers.new) #

[View source]
def patch_deployment(name : String, namespace, **kwargs) #

[View source]
def patch_ingress(name : String, namespace, **kwargs) #

[View source]
def patch_job(name : String, namespace, **kwargs) #

[View source]
def patch_persistentvolumeclaim(name : String, namespace, **kwargs) #

[View source]
def patch_pod(name : String, namespace, **kwargs) #

[View source]
def patch_service(name : String, namespace, **kwargs) #

[View source]
def patch_statefulset(name : String, namespace, **kwargs) #

[View source]
def persistentvolumeclaim(name : String, namespace : String = "default", resource_version : String = "") #

[View source]
def persistentvolumeclaims(namespace : String | Nil = "default", label_selector = nil) #

[View source]
def pod(name : String, namespace : String = "default", resource_version : String = "") #

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

[View source]
def put(path : String, body, headers = HTTP::Headers.new) #

[View source]
def raw_patch(path : String, body, headers = HTTP::Headers.new) #

[View source]
def service(name : String, namespace : String = "default", resource_version : String = "") #

[View source]
def services(namespace : String | Nil = "default", label_selector = nil) #

[View source]
def statefulset(name : String, namespace : String = "default", resource_version : String = "") #

[View source]
def statefulsets(namespace : String | Nil = "default", label_selector = nil) #

[View source]
def watch_deployments(resource_version = "0", timeout : Time::Span = 1.hour, namespace : String | Nil = nil, labels label_selector : String = "", &) #

[View source]
def watch_ingresses(resource_version = "0", timeout : Time::Span = 1.hour, namespace : String | Nil = nil, labels label_selector : String = "", &) #

[View source]
def watch_jobs(resource_version = "0", timeout : Time::Span = 1.hour, namespace : String | Nil = nil, labels label_selector : String = "", &) #

[View source]
def watch_persistentvolumeclaims(resource_version = "0", timeout : Time::Span = 1.hour, namespace : String | Nil = nil, labels label_selector : String = "", &) #

[View source]
def watch_pods(resource_version = "0", timeout : Time::Span = 1.hour, namespace : String | Nil = nil, labels label_selector : String = "", &) #

[View source]
def watch_services(resource_version = "0", timeout : Time::Span = 1.hour, namespace : String | Nil = nil, labels label_selector : String = "", &) #

[View source]
def watch_statefulsets(resource_version = "0", timeout : Time::Span = 1.hour, namespace : String | Nil = nil, labels label_selector : String = "", &) #

[View source]