Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Execute k8s command directly #368

Open
ahmadabd opened this issue Jul 19, 2023 · 1 comment
Open

Execute k8s command directly #368

ahmadabd opened this issue Jul 19, 2023 · 1 comment

Comments

@ahmadabd
Copy link

Hi, How can i execute a kube command directly to get certificate status?

@stale stale bot added the wontfix This will not be worked on label Sep 17, 2023
@indyjonesnl
Copy link

Hi @ahmadabd

Late response, but maybe it'll help someone else.
You can create a CRD:

final class Certificate extends K8sResource implements InteractsWithK8sCluster
{
    use HasStatus;
    use HasAnnotations;

    protected static $kind = 'Certificate';
    protected static $defaultVersion = 'cert-manager.io/v1';
    protected static $namespaceable = true;
}

And then you can query certificates like so:

Certificate::register();
$certificates = $this->cluster->certificate()->whereNamespace('default')->all();

@stale stale bot removed the wontfix This will not be worked on label Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants