Enabling Control Plane logging in EKS cluster is only possible by calling EKS API after cluster is created. Doing it in CDK requires to create Custom Resource with code that calls the API. It would be nice to have it as an argument for creating EKS cluster from CDK.
Since EKS is created from python lambda when kubectlEnabled flag is enabled there is a simple way to create the EKS cluster with logging enabled. Currently the lambda code uses boto3 method eks.create_cluster() where we can pass arguments to enable logging on created cluster. (https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/eks.html#EKS.Client.create_cluster).
The lambda uses config as an argument for this method :
The config is passed as a properties of custom resource and is created here:
So I suggest to expose a way to include logging properties in the config so it should be passed to eks.create_cluster() method without any more changes. That should result in enabling logging on newly created EKS cluster.
This is a :rocket: Feature Request
Hi @stefanolczak, thanks for submitting a feature request! We will update this issue when there is any progress.
Any updates on this? Waiting for this feature as well.
This is not highly prioritized at the moment, but more than happy to take contributions.
Note that there is an abandoned PR for this: https://github.com/aws/aws-cdk/pull/8497
Consider resurrecting it once we pick this up again.
Any update on this feature?
@rameshmimit We are discussing this issue internally, we'll update here soon.
Most helpful comment
Note that there is an abandoned PR for this: https://github.com/aws/aws-cdk/pull/8497
Consider resurrecting it once we pick this up again.