Open
Description
I've got a custom resource description and I need to create custom resource for it. I've been able to create it using client.CustomObjectsApi(api_client).create_namespaced_custom_object(...)
and using kubectl apply -f
. I tried using the utils.create_from_yaml but it fails with a traceback:
utils.create_from_yaml(self._api_client, f.name)
File "/usr/lib/python3.6/site-packages/kubernetes/utils/create_from_yaml.py", line 53, in create_from_yaml
k8s_api = getattr(client, fcn_to_call)(k8s_client)
AttributeError: module 'kubernetes.client' has no attribute 'Brantlk.comV1Api'
yaml is like:
apiVersion: brantlk.com/v1
kind: MyCustomResource
metadata:
name: brant-instance
namespace: default
spec:
repositories: []
Pretty obvious what the problem is from the code.