NAME

Kubernetes::Comb::Client::Sync - Synchronous Comb client on Kubernetes::REST, returning done Futures

VERSION

version 0.001

SYNOPSIS

use Kubernetes::Comb::Client::Sync;

my $k8s = Kubernetes::Comb::Client::Sync->new;                    # current context
my $k8s = Kubernetes::Comb::Client::Sync->new(context => 'dev');
my $k8s = Kubernetes::Comb::Client::Sync->new(rest => $rest);     # your own client

my $pods = $k8s->list('Pod', namespace => 'platform')->get->items;

DESCRIPTION

The default client of a Comb. Every method of Kubernetes::Comb::Role::Client runs the request right away through Kubernetes::REST and returns an already-done Future -- or an already-failed one: whatever Kubernetes::REST croaks with becomes the failure, nothing is thrown. So ->get on a result never waits for an event loop.

kubeconfig

Path of the kubeconfig to read. Defaults to what Kubernetes::REST::Kubeconfig finds: $KUBECONFIG, then ~/.kube/config, then the in-cluster service account.

context

Kube context to use. Defaults to the kubeconfig's current context.

rest

The Kubernetes::REST instance. Built on first use from "kubeconfig" and "context", with Kubernetes::Comb::CRD registered so the Kind Comb resolves. A failure building it -- no kubeconfig, an unknown context -- fails the Future of the request that needed it. Pass your own to control everything else.

get

list

ensure

delete

update

patch

update_status

patch_status

log

The request methods of Kubernetes::Comb::Role::Client, each passing its arguments to the Kubernetes::REST method of the same name and returning an already-done or already-failed Future.

server_url

The API server URL of "rest".

for_context

my $dev = $k8s->for_context('dev');

The client for another context of the same "kubeconfig" (the default one when none was given), made on first use and kept: asking again returns the same one. Nothing is read until its first request.

SEE ALSO

SUPPORT

Issues

Please report bugs and feature requests on GitHub at https://github.com/Getty/p5-kubernetes-comb/issues.

IRC

Join #kubernetes on irc.perl.org or message Getty directly.

CONTRIBUTING

Contributions are welcome! Please fork the repository and submit a pull request.

AUTHOR

Torsten Raudssus <getty@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2026 by Torsten Raudssus <torsten@raudssus.de> https://raudssus.de/.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.