Skip to content

Commit 6e71ca8

Browse files
committed
wip readme
1 parent b540030 commit 6e71ca8

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

README.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,34 @@ $ php artisan vendor:publish --provider="RenokiCo\LaravelK8s\LaravelK8sServicePr
3333

3434
## 🙌 Usage
3535

36+
The cluster configuration can be found in the `config/k8s.php` file. You can get started directly with the `/.kube/config` file you already have.
37+
38+
```php
39+
use RenokiCo\LaravelK8s\LaravelK8sFacade;
40+
41+
foreach (LaravelK8sFacade::getAllConfigMaps() as $cm) {
42+
// $cm->getName();
43+
}
44+
```
45+
46+
For further documentation, check [renoki-co/php-k8s](https://github.com/renoki-co/php-k8s).
47+
48+
## Multiple connections
49+
50+
The package supports multiple connections configurations. If you wish to select a specific one (not the default one), call `connection` before getting the cluster.
51+
52+
```php
53+
use RenokiCo\LaravelK8s\LaravelK8sFacade;
54+
55+
$cluster = LaravelK8sFacade::connection('http')->getCluster();
56+
```
57+
58+
## Getting the cluster instance
59+
60+
You can also call `getCluster()` to get the instance of `\RenokiCo\PhpK8s\KubernetesCluster`:
61+
3662
```php
37-
$ //
63+
$cluster = LaravelK8sFacade::getCluster();
3864
```
3965

4066
## 🐛 Testing

0 commit comments

Comments
 (0)