0

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?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62

2 Answers2

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

enter image description here

Dharman
  • 30,962
  • 25
  • 85
  • 135
pnyak_
  • 359
  • 1
  • 6
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