Just a simple port of renoki-co/php-k8s for easier access in Laravel
inClusterConfiguration
(https://github.com/renoki-co/laravel-php-k8s/pull/22)registerCrd()
(https://github.com/renoki-co/laravel-php-k8s/commit/e95245f3b141c2e7e4b430ae124f2abaf1dc8ff2)^3.0
(https://github.com/renoki-co/laravel-php-k8s/pull/10)PHP K8s 3.x adds support for better authentication (code-speaking), templated YAMLs and IDE improvements.
Please read the renoki-co/php-k8s
3.x release notes before upgrading to this version.
variable
driver for the KUBECONFIG
driverYou can add the environment
driver in your config/k8s.php
file:
return [
// ...
/*
|--------------------------------------------------------------------------
| Environment Variable Driver
|--------------------------------------------------------------------------
|
| The environment variable driver leverages your current (possibly set)
| KUBECONFIG environment variable. The variable contains a list of paths
| towards multiple kubeconfig files that will be read, merged and based
| on the selected context from the configuration, it will connect
| to the cluster, just like the "kubeconfig" driver.
|
| Read more: https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/
|
*/
'environment' => [
'driver' => 'environment',
'context' => env('KUBECONFIG_CONTEXT', 'minikube'),
],
];