Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Php K8S Laravel Package

renoki-co/php-k8s

PHP K8s is a Kubernetes client for PHP and Laravel. Manage pods, deployments, services, and custom resources with a fluent API for CRUD, scaling, logs, exec, and watches—no kubectl required.

View on GitHub
Deep Wiki
Context7

Unofficial PHP client for Kubernetes. It supports any form of authentication, the exec API, and it has an easy implementation for CRDs.

Frequently asked questions about Php K8S
What is renoki-co/php-k8s used for in a Laravel application?
It is an unofficial PHP client for Kubernetes that gives Laravel and PHP applications a fluent API for CRUD operations on pods, deployments, services, custom resources, scaling, logs, exec, and watches. It fits internal admin panels, tenant or namespace provisioning, CRD-backed configuration, batch jobs, support tooling, and CI/CD helpers. It is a poor fit for cluster-critical controllers or high-frequency reconciliation loops that need native informer and watch semantics.
How do I install and configure php-k8s in Laravel?
Install it with Composer and wire it through the Laravel service container, which is straightforward for teams on modern PHP. Use configuration for cluster and context selection, and keep Kubernetes credentials in environment variables or a secret manager rather than in code. Wrap the package behind an internal KubernetesClient interface instead of injecting it throughout controllers so you can test and swap implementations later.
Which authentication methods does php-k8s support?
The package advertises support for any form of authentication, including in-cluster service account tokens, client certificates, bearer or OIDC tokens, and cloud exec plugins such as aws, gcloud, and kubelogin. Exec-based auth requires those provider CLIs to be present inside your runtime image, and in-cluster tokens need rotation handling. Client-certificate auth requires careful secret hygiene and TLS or CA rotation planning.
Does php-k8s support Laravel 10, Laravel 11, and current PHP versions?
Do not assume compatibility just because the package is on Packagist: the last release was April 2023, so support for current PHP, Laravel, and Kubernetes versions must be proven rather than taken for granted. Pin the package, PHP, Laravel, and Kubernetes versions explicitly and build a compatibility matrix. Run a time-boxed spike with contract tests against your target stack before committing to adoption.
How do I manage custom resources and CRDs with PHP K8s?
The package has an easy implementation for CRDs and custom resources, which makes it useful for CRD-backed feature flags, tenant configuration, and similar app-driven resources. CRD support is often dynamically typed, so schema validation, defaulting, and error handling remain your responsibility. Define DTOs for CRD payloads and validate them before sending requests to the Kubernetes API.
Can php-k8s run pod exec and stream logs?
Yes, the package supports the exec API as well as reading logs, scaling, and watches, so support-facing pod exec and debugging workflows are possible. Exec is operationally sensitive because it expands the blast radius of compromised application credentials and may depend on external provider binaries. Avoid long-lived watches in PHP-FPM request paths and prefer Laravel commands or queue jobs for bounded, idempotent operations.
Is php-k8s safe for production Kubernetes automation?
For production, proceed with a time-boxed spike for internal, non-critical automation and CRD management rather than adopting it immediately for control-plane-critical workflows. Give Kubernetes credentials to a dedicated service or least-privilege service account instead of the main Laravel app. Do not rely on it in production without a named owner, a version-support matrix, and a fork or exit plan.
How does php-k8s compare with kubectl, Helm, Terraform, or a Kubernetes operator?
PHP K8s is an API client for bounded, idempotent operations from application code, not a replacement for tools that own cluster state and reconciliation. Helm, Terraform, and operators are better for declarative cluster management, while php-k8s is useful for app-driven namespace provisioning, CRD configuration, and support tooling. Keep a fallback path to kubectl or Helm for emergency operations until the package proves stable in your environment.
Is renoki-co/php-k8s actively maintained and what are the risks?
It is an unofficial client with a last release in April 2023 and limited community redundancy, so maintenance staleness and Kubernetes API deprecation or version skew are the main technical risks. There is no vendor SLA, although the Apache-2.0 license permits forking if needed. Inventory existing kubectl shell-outs and direct Guzzle calls, then migrate read-only operations first behind your own interface.
How should I test php-k8s integrations before adopting it?
Use contract tests against disposable kind or k3d clusters at the oldest and newest Kubernetes versions you intend to support. Validate API group and version availability, CRD schema handling, exec-plugin availability in the runtime image, and TLS or CA rotation behavior. Pin package, PHP, Laravel, and Kubernetes versions, and keep each migrated operation covered by tests before removing your kubectl fallback.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource