Kubernetes::REST - A Perl REST Client for the Kubernetes API
use Kubernetes::REST; my $api = Kubernetes::REST->new( credentials => { }, server => { endpoint => 'https://..../', ssl_cert_file => '', ssl_key_file => '', ssl_ca_file => '' }, ); my $result = $api->Core->ListPodForAllNamespaces; use Data::Dumper; print Dumper($result); # hashref with the result for
This module implements the Kubernetes REST API
These are very first versions, so please take into account that this module is subject to change. Review the Changes file in the dists to see what has changed or has been explicitly broken
The root Kubernetes::REST module sets up the data needed to connect to the Kubernetes server
Kubernetes::REST
Attributes can be set in the constructor
Is a Kubernetes::REST::Server object. If you pass a HashRef with it's attributes it will be coerced into the object for you.
server => { endpoint => '...', ... }
A string containing the URL to the Kubernetes API
Configures the client to verify SSL properties. Defaults to 1.
If ssl_verify_server is true, path to the client certificate to use
If ssl_verify_server is true, path to the client certificate key
If ssl_verify_server is true, path to the CA file
credentials => { token => '' }
This can be any object with a token method. The token will be used as the Bearer token to the Kubernetes API. You can also pass a hashref with a token key.
token
This controls the API version of Kuberntes that the client is using. By default it is v1, but you can set it to v1alpha1, for example to access v1 methods in alpha stage.
v1
v1alpha1
The Kubernetes::REST object give you access to grouped method calls, following the API groups of Kubernetes.
my $api = Kubernetes::REST->new(...); $api->Core->ListNamespacedPod(...);
Access to the Admissionregistration group of API calls. See Kubernetes::REST::Admissionregistration for more info.
Access to the Apiextensions group of API calls. See Kubernetes::REST::Apiextensions for more info.
Access to the Apiregistration group of API calls. See Kubernetes::REST::Apiregistration for more info.
Access to the Apis group of API calls. See Kubernetes::REST::Apis for more info.
Access to the Apps group of API calls. See Kubernetes::REST::Apps for more info.
Access to the Auditregistration group of API calls. See Kubernetes::REST::Auditregistration for more info.
Access to the Authentication group of API calls. See Kubernetes::REST::Authentication for more info.
Access to the Authorization group of API calls. See Kubernetes::REST::Authorization for more info.
Access to the Autoscaling group of API calls. See Kubernetes::REST::Autoscaling for more info.
Access to the Batch group of API calls. See Kubernetes::REST::Batch for more info.
Access to the Certificates group of API calls. See Kubernetes::REST::Certificates for more info.
Access to the Coordination group of API calls. See Kubernetes::REST::Coordination for more info.
Access to the Core group of API calls. See Kubernetes::REST::Core for more info.
Access to the Events group of API calls. See Kubernetes::REST::Events for more info.
Access to the Extensions group of API calls. See Kubernetes::REST::Extensions for more info.
Access to the Logs group of API calls. See Kubernetes::REST::Logs for more info.
Access to the Networking group of API calls. See Kubernetes::REST::Networking for more info.
Access to the Policy group of API calls. See Kubernetes::REST::Policy for more info.
Access to the RbacAuthorization group of API calls. See Kubernetes::REST::RbacAuthorization for more info.
Access to the Scheduling group of API calls. See Kubernetes::REST::Scheduling for more info.
Access to the Settings group of API calls. See Kubernetes::REST::Settings for more info.
Access to the Storage group of API calls. See Kubernetes::REST::Storage for more info.
Access to the Version group of API calls. See Kubernetes::REST::Version for more info.
Jose Luis Martinez CPAN ID: JLMARTIN CAPSiDE jlmartinez@capside.com
https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.13/
The source code is located here: https://github.com/pplu/kubernetes-rest
Please report bugs to: https://github.com/pplu/kubernetes-rest/issues
Copyright (c) 2018 by CAPSiDE
This code is distributed under the Apache 2 License. The full text of the license can be found in the LICENSE file included with this module.
To install Kubernetes::REST, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Kubernetes::REST
CPAN shell
perl -MCPAN -e shell install Kubernetes::REST
For more information on module installation, please visit the detailed CPAN module installation guide.