Closed jdblack closed 1 year ago
The reason may be version inconsistency ?
I believe that the resource I was using was wrong, I was using the kind of resource, but I should have been using the name instead. The following worked for me:
gvr := schema.GroupVersionResource{
Group: "cert-manager.io",
Version: "v1",
Resource: "certificates",
}
I am attempting to use go-client to create a custom resource without success. Below is attached sample code that shows an attempt to use a dynamic resource with unstructured data to create a certificate that cert-manager will use to create a secret.
However, trying to use go-client results in an inability to find the crd. I have verified the CRD exists (attached after the code sample) and that a kubectl of an equivilant yaml works (also attached).
Versions
clietn-go: k8s.io/client-go v0.26.0 Kubernetes: v1.26.0 cert-manager: v1.10.1
Code output
code sample
Validation that CRD exists
Performing a manual kubectl apply works as expected