PHPackages                             prezly/kubernetes-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. prezly/kubernetes-client

ActiveLibrary[API Development](/categories/api)

prezly/kubernetes-client
========================

Minimalistic Kubernetes API client implementation

0.2.1(4y ago)112MITPHPPHP &gt;=7.4

Since Jun 3Pushed 4y ago2 watchersCompare

[ Source](https://github.com/prezly/kubernetes-client)[ Packagist](https://packagist.org/packages/prezly/kubernetes-client)[ RSS](/packages/prezly-kubernetes-client/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (4)Versions (4)Used By (0)

Prezly's Kubernetes Client
==========================

[](#prezlys-kubernetes-client)

Prezly's Kubernetes Client is a minimalistic Kubernetes API client implementation in PHP which allows you to list, fetch, update, delete and **watch** resources in your Kubernetes cluster.

[![Tests Status](https://github.com/prezly/kubernetes-client/actions/workflows/test.yml/badge.svg)](https://github.com/prezly/kubernetes-client/actions/workflows/test.yml/badge.svg)

Features
--------

[](#features)

- [Kubernetes Watch API](https://kubernetes.io/docs/reference/using-api/api-concepts/#efficient-detection-of-changes) support
- Unlimited authentication functionality
- No knowledge about any specific Kubernetes resources: it supports every resource or collection you have
- PHP 7.4+
- PHP 8.0
- Semver
- Tests

Installation
------------

[](#installation)

Use [Composer](https://getcomposer.org/) package manager to add *Prezly's Kubernetes Client* to your project:

```
composer require prezly/kubernetes-client

```

Authentication
--------------

[](#authentication)

*Prezly's Kubernetes Client* accepts a pre-configured Guzzle HTTP client as constructor argument, so you can configure it to any exotic connection, authentication or proxy setup you may have.

```
use GuzzleHttp\Client as HttpClient;
use Prezly\KubernetesClient\KubernetesClient;

$http = new HttpClient([
    'base_uri' => 'https://kubernetes.local/',
    'verify'   => false,
]);

$client = new KubernetesClient($http);
```

There's also a `KubernetesClientFactory` to provide a fluent API to configure a KubernetesClient for most common use-cases:

```
