sroze / kubernetes-client
Installs: 3 073
Dependents: 0
Suggesters: 0
Security: 0
Stars: 12
Watchers: 3
Forks: 7
Open Issues: 1
Requires
- guzzlehttp/guzzle: ^6.2
- jms/serializer: ^1.0.0
- symfony/serializer: ^2.7|^3.0
Requires (Dev)
- behat/behat: ^3.0
- phpspec/phpspec: ~2.2
- phpunit/phpunit: ^5.6
- symfony/http-foundation: ^3.2
README
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, AuthenticationMiddleware::USERNAME_PASSWORD, '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