This is a CDK project to deploy a k3s cluster on AWS.
# Create virtualenv
python -m venv .venv
# Activate virtualenv
source .venv/bin/activate
# Upgrade pip
python -m pip install --upgrade pip
# Check pip version
pip --version #My version is 25.0.1
# Check Python version
python --version #My version is 3.13.1
# Install requirements
pip install -r requirements.txt
At this point you can now synthesize the CloudFormation template for this code.
$ cdk synth
You can now begin exploring the source code, contained in the hello directory. There is also a very trivial test included that can be run like this:
$ pytest
To add additional dependencies, for example other CDK libraries, just add to
your requirements.txt file and rerun the pip install -r requirements.txt
command.
cdk ls
list all stacks in the appcdk synth
emits the synthesized CloudFormation templatecdk deploy
deploy this stack to your default AWS account/regioncdk diff
compare deployed stack with current statecdk docs
open CDK documentation
Enjoy!