Answer: All of the ACK controllers watch for specific CRs and you can generate those resources using cdk8s. The two projects complement each other. cdk8s can create the Kubernetes resources and ACK uses those resources to create the AWS infrastructure.
This post gives example of generating kubernetes manifest of ACK using cdk8s typescript
โก $ cdk8s import https://raw.githubusercontent.com/aws-controllers-k8s/s3-controller/main/helm/crds/s3.services.k8s.aws_buckets.yaml --output src/imports/
Importing resources, this may take a few moments...
s3.services.k8s.aws
s3.services.k8s.aws/bucket
rds-controller crds, rename file from rds.services.k8s.aws.ts to rds.services.db.instance.k8s.aws.ts after import due to that name is assigned for all CRDS with in the rds-controller crds
โก $ cdk8s import https://raw.githubusercontent.com/aws-controllers-k8s/rds-controller/main/helm/crds/rds.services.k8s.aws_dbinstances.yaml --output src/imports/
Importing resources, this may take a few moments...
rds.services.k8s.aws
rds.services.k8s.aws/dbinstance
โก $ mv src/imports/rds.services.k8s.aws.ts src/imports/rds.services.db.instance.k8s.aws.ts
RDS subnet group, rename file from rds.services.k8s.aws.ts to rds.services.subnet.group.k8s.aws.ts
โก $ cdk8s import https://raw.githubusercontent.com/aws-controllers-k8s/rds-controller/main/helm/crds/rds.services.k8s.aws_dbsubnetgroups.yaml --output src/imports/
Importing resources, this may take a few moments...
rds.services.k8s.aws
rds.services.k8s.aws/dbsubnetgroup
โก $ mv src/imports/rds.services.k8s.aws.ts src/imports/rds.services.subnet.group.k8s.aws.ts
DBInstance requires subnet group which contains private subnets in EKS VPC (subnet-group.ts) and secret keys to hold user credential. The k8s secret is not generated through code here.
Top comments (1)
thank you :D