It looks like cdk8s gets synthesized only to Kubernetes manifest files. CDK can manage AWS resources directly, such as EKS clusters, security groups and IAM roles and policies. Is it possible to have only a single file with code that manages both AWS resources and Kubernetes objects?
Asked
Active
Viewed 202 times
2 Answers
1
Unfortunately, at the moment it is not possible to manage AWS resources directly from cdk8s. You would need to write CDK code for AWS resources and CDK8s code for kube resources.
Current way that I have tried creating a single place for both types of resources is to have a cfn directory with CDK app and a k8s directory with a k8s app as. And then glue them together via means of a pipeline. High level structure is like below
1
Yes, using Crossplane.
https://github.com/crossplane/crossplane
https://github.com/crossplane-contrib/provider-aws
Sample cdk8s.yaml
language: typescript
app: npx ts-node main.ts
imports:
- k8s
- github:crossplane/crossplane
- github:crossplane-contrib/provider-aws

ahhhhhhhhhhhhhhhhhhhhhhhhhhhhh
- 1,076
- 1
- 12
- 10