I'd like to recreate this functionality in CDK
eksctl create cluster \
--name <<cluster-name>> \
--region <<region>> \
--with-oidc \
--nodes=3
My cdk cluster creation looks like this (in python)
cluster = eks.Cluster(
self, "my-cluster",
cluster_name="my-cluster",
version=eks.KubernetesVersion.V1_21,
)
When I try to add an iamserviceaccount to the cluster I get this error
Error: unable to create iamserviceaccount(s) without IAM OIDC provider enabled
I then have to add OIDC via eksctl, but I'd like to be able to do it in CDK, I couldn't find anything in the documentation to help me do this, was wondering if anyone had some advice?