(EKS): camelcase is converted to snake case in undesired scenarios in CDK Python API Ref
Describe the issue
Using "api_version" as shown in the documentation for KubernetesManifests throws errors upon CDK deployment.
namespace = cluster.add_manifest("my-namespace", { "api_version": "v1", <--------------------------------------------------- Wrong way to specify apiVersion "kind": "Namespace", "metadata": {"name": "my-app"} })
Correct/working argument is "apiVersion". Please replace the above in the documentation with the following:
namespace = cluster.add_manifest("my-namespace", { "apiVersion": "v1", <-------------------------------------------------- Here is the change "kind": "Namespace", "metadata": {"name": "my-app"} })
AWS CDK - 2.4.5
Addendum: Other fields like container_port also throw errors unless specified as "containerPort"
Links
https://docs.aws.amazon.com/cdk/api/v2/python/aws_cdk.aws_eks/KubernetesManifest.html
This is a problem with the Python doc generator. The correct usage is found in the Typescript docs ( https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_eks.KubernetesManifest.html )
This is an issue with JSII, transferring to JSII repo