NAME
Kubernetes::REST - A Perl REST Client for the Kubernetes API
SYNOPSIS
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
DESCRIPTION
This module implements the Kubernetes REST API
STATUS
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
ORGANIZATION
The root Kubernetes::REST
module sets up the data needed to connect to the Kubernetes server
ATTRIBUTES
Attributes can be set in the constructor
server
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 => '...', ... }
endpoint
A string containing the URL to the Kubernetes API
ssl_verify_server
Configures the client to verify SSL properties. Defaults to 1.
ssl_cert_file
If ssl_verify_server is true, path to the client certificate to use
ssl_key_file
If ssl_verify_server is true, path to the client certificate key
ssl_ca_file
If ssl_verify_server is true, path to the CA file
credentials
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.
api_version
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.
METHODS
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(...);
Admissionregistration
Access to the Admissionregistration group of API calls. See Kubernetes::REST::Admissionregistration for more info.
Apiextensions
Access to the Apiextensions group of API calls. See Kubernetes::REST::Apiextensions for more info.
Apiregistration
Access to the Apiregistration group of API calls. See Kubernetes::REST::Apiregistration for more info.
Apis
Access to the Apis group of API calls. See Kubernetes::REST::Apis for more info.
Apps
Access to the Apps group of API calls. See Kubernetes::REST::Apps for more info.
Auditregistration
Access to the Auditregistration group of API calls. See Kubernetes::REST::Auditregistration for more info.
Authentication
Access to the Authentication group of API calls. See Kubernetes::REST::Authentication for more info.
Authorization
Access to the Authorization group of API calls. See Kubernetes::REST::Authorization for more info.
Autoscaling
Access to the Autoscaling group of API calls. See Kubernetes::REST::Autoscaling for more info.
Batch
Access to the Batch group of API calls. See Kubernetes::REST::Batch for more info.
Certificates
Access to the Certificates group of API calls. See Kubernetes::REST::Certificates for more info.
Coordination
Access to the Coordination group of API calls. See Kubernetes::REST::Coordination for more info.
Core
Access to the Core group of API calls. See Kubernetes::REST::Core for more info.
Events
Access to the Events group of API calls. See Kubernetes::REST::Events for more info.
Extensions
Access to the Extensions group of API calls. See Kubernetes::REST::Extensions for more info.
Logs
Access to the Logs group of API calls. See Kubernetes::REST::Logs for more info.
Networking
Access to the Networking group of API calls. See Kubernetes::REST::Networking for more info.
Policy
Access to the Policy group of API calls. See Kubernetes::REST::Policy for more info.
RbacAuthorization
Access to the RbacAuthorization group of API calls. See Kubernetes::REST::RbacAuthorization for more info.
Scheduling
Access to the Scheduling group of API calls. See Kubernetes::REST::Scheduling for more info.
Settings
Access to the Settings group of API calls. See Kubernetes::REST::Settings for more info.
Storage
Access to the Storage group of API calls. See Kubernetes::REST::Storage for more info.
Version
Access to the Version group of API calls. See Kubernetes::REST::Version for more info.
AUTHOR
Jose Luis Martinez
CPAN ID: JLMARTIN
CAPSiDE
jlmartinez@capside.com
SEE ALSO
https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.13/
BUGS and SOURCE
The source code is located here: https://github.com/pplu/kubernetes-rest
Please report bugs to: https://github.com/pplu/kubernetes-rest/issues
COPYRIGHT and LICENSE
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.