Replies: 1 comment
-
Another potential way this or a very similar capability could be leveraged would be to use Docker image tags to fetch Docker image digests from an image repository (or local lock file), for deploying images into Kubernetes pinned to a specific digest shasum. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Kubernetes applications often leverage cloud infrastructure for their operation. For example, a CronJob may perform some periodic computation and persist the results in an S3 bucket. We want customers to be able to easily define such applications with the various CDKs. In case the bucket name is explicitly defined, i.e known as synth time, this is already possible. For example, with the AWS CDK:
This application will synthesize a CloudFormation template, and a Kubernetes manifest:
At this point, customers can deploy each of these independently, with whatever engine they like. Conceptually, running
cdk deploy && kubectl
apply will suffice.However, AWS CDK best practices actually advise against explicitly naming resources since it introduces limitations on resource replacements. In this case, our application will look like this:
The Kubernetes manifest will now be:
Now though, this manifest isn’t deployable, because it references an AWS CDK token, representing the
bucketName
attribute of the S3 Bucket resource. To bypass this problem, customers need to run a 3 phase deployment pipeline:cdk deploy
.boto
.cdk8s synth
(via env variables or a file) to generate a manifest with concrete values.Phase 2 is tricky to implement because it is inherently decoupled from the application, which means it doesn’t know which attributes need to be fetched, or which identifier to use to fetch them. Maintaining it requires constant manual coordination with the app, which is an error prone mechanism.
We propose to add capabilities into cdk8s that will enable it to interpret deploy time tokens, and then fetch their concrete values during cdk8s synthesis. We would like to support both AWS CDK and CDK For Terraform. These capabilities will allow customers a simple and straightforward workflow to deploy their entire application:
cdk deploy
)cdk8s synth
)kubectl apply
)Beta Was this translation helpful? Give feedback.
All reactions