Aws-cdk: [aws-eks] Enable Control Plane logs in EKS cluster

Created on 19 Sep 2019  路  6Comments  路  Source: aws/aws-cdk

Use Case

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.

Proposed Solution

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 :

https://github.com/aws/aws-cdk/blob/c3b3c935b2086288dd79f559a49c3b5304a8e40f/packages/%40aws-cdk/aws-eks/lib/cluster-resource/index.py#L69

The config is passed as a properties of custom resource and is created here:

https://github.com/aws/aws-cdk/blob/c3b3c935b2086288dd79f559a49c3b5304a8e40f/packages/%40aws-cdk/aws-eks/lib/cluster.ts#L364-L379

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

@aws-cdaws-eks efformedium feature-request p1

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.

All 6 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sudoforge picture sudoforge  路  3Comments

v-do picture v-do  路  3Comments

ababra picture ababra  路  3Comments

eladb picture eladb  路  3Comments

peterdeme picture peterdeme  路  3Comments