Closed badaldavdatcpl closed 1 year ago
Hi @badaldavdatcpl
This construct should not generate any CronJob
objects, and looking at the Karpenter helm chart, it also does not generate any CronJob
s. Is there other parts of your CDK code that tries to deploy CronJob
s? If so, I would suggest that you upgrade the API version to match your version of Kubernetes. As far as I can tell that API has been stable since Kubernetes v1.21, and is called batch/v1
, and not batch/v1beta1
as indicated the logs provided.
Nope.. This is the only CDK code that I have. I am just trying to integrate the cluster example with karpenter example and that is what is causing the issue.
I also stumbled across your issue in the CDK repo, which contains more complete example. FWIW I believe that https://github.com/aws/aws-cdk/issues/24580 reflects your issue.
Could you try specifying the @aws-cdk/lambda-layer-kubectl-vXX as described in this comment? The integration test for this repository does that to mitigate similar issue, see here and here.
Yes. That seems to be a likely issue, I will try out the documented approaches. Thanks for prompt response on this.
Closing this since its not related to cdk-eks-karpenter
Tried deploying with the following -
""" karpenter = Karpenter(self, "karpenter", cluster=cluster)
"""
Received response status [FAILED] from custom resource. Message returned: Error: b'con figmap/aws-auth configured\nerror: error retrieving RESTMappings to prune: invalid res ource batch/v1beta1, Kind=CronJob, Namespaced=true: no matches for kind "CronJob" in v ersion "batch/v1beta1"\n'
Logs: /aws/lambda/MyEksBlueprintStack-awscdkawseksKu-Handler886CB40B-ni5iL3nrGKLh
at invokeUserFunction (/var/task/framework.js:102:19) at processTicksAndRejections (internal/process/task_queues.js:95:5) at async onEvent (/var/task/framework.js:22:27)
Kubernetes v1.25 cdk-eks-karpenter>=0.0.27 aws-cdk-lib==2.73.0