[Support] How can I get resources other than types defined in RenokiCo\PhpK8s\Kinds\?
Closed this issue · 1 comments
amacrobert-meq commented
Hi, first of all thank you to the contributors for making and maintaining this library. I have a question about how to use it that I couldn't find in the docs.
A K8s cluster that I need to interact with uses Istio to set up VirtualService resources.
The KubernetesCluster::getAll[Resource]()
methods work when [Resource]
is one of the types defined in the RenokiCo\PhpK8s\Kinds\
namespace. Since VirtualResource is not one of them, that approach does not work:
/** @var RenokiCo\PhpK8s\KubernetesCluster $cluster */
$cluster;
// Gets all Deployment resources (where kind = Deployment)
$cluster->getAllDeployments();
// Does not return VirtualService resources (where kind = VirtualService)
$cluster->getAllVirtualServices();
How can I use this client to get resources of other types?
This would be the equivalent of kubectl get VirtualServices
on the command line.
declum commented