richardmiller-zz / kubernetes-client

PHP client for the Kubernetes API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kubernetes client

Build Status

A library that provide a client for the Kubernetes API client.

Getting started

To create an anonymous client, you can:

$httpClient = new GuzzleHttpClient(
    new Client(),
    'baseUrl',
    'version'
);

$client = new Client(
    new HttpAdapter($httpClient, new Serializer())
);

To had user authentication, you can decorate the http client:

$authenticatedHttpClient = new AuthenticationMiddleware(
    $httpClient,
    'username',
    'password'
);

Serializer

If you use JMS serializer, the serializer adapter already exists in the src/Serializer directory. There is also an handler for the RollingUpdateDeployment object type used by Kubernetes that uses integerOrString types.

Development

Install application dependencies:

composer install

Tests

Tests are specifications written with PhpSpec.

./bin/phpspec run

About

PHP client for the Kubernetes API


Languages

Language:PHP 97.9%Language:Gherkin 1.7%Language:Shell 0.4%