Skip to content

Commit b6c1be7

Browse files
committed
docs: update README with installation instructions and expected output
1 parent de55a5a commit b6c1be7

File tree

1 file changed

+39
-13
lines changed

1 file changed

+39
-13
lines changed

README.md

Lines changed: 39 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
11
# k3s-aws-cdk
2+
This is a CDK project to deploy a k3s cluster on AWS. After running the CDK stack, you will have a k3s cluster running on an EC2 instance in AWS. The k3s cluster will be deployed using the user data script in the `src/user_data.sh` file. The user data script will install k3s on the EC2 instance and configure it as a server node.
23

3-
This is a CDK project to deploy a k3s cluster on AWS.
4+
## What is k3s?
5+
k3s is a lightweight Kubernetes distribution that is easy to install and run. It is designed for edge computing, IoT, and CI/CD pipelines. For more information, visit the [k3s website](https://docs.k3s.io/).
46

57
## Prerequisites
68

79
- Python 3.8+
810
- Pip 24.0+
911
- AWS CLI (Installation guide [here](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html))
10-
- AWS CDK Toolkit (Installation guide [here](https://docs.aws.amazon.com/cdk/latest/guide/cli.html))
12+
- AWS CDK Toolkit (Instalwith your AWS account credentials. You can do this by running `aws configure` and entering your AWS Access Key ID, AWS Secret Access Key, default region name, and default output format.
1113

12-
## Setup
14+
## Confugure AWS CLI
15+
Before you can deploy the CDK stack, you need to configure the AWS CLI with your AWS account credentials. You can do this by running `aws configure` and entering your AWS Access Key ID, AWS Secret Access Key, default region name, and default output format.
16+
```bash
17+
aws configure
18+
```
19+
20+
## Installation
1321

1422
```bash
1523
# Create virtualenv
@@ -30,23 +38,33 @@ python --version #My version is 3.13.1
3038
pip install -r requirements.txt
3139
```
3240

41+
## Usage
3342

34-
At this point you can now synthesize the CloudFormation template for this code.
43+
At this point, you can now synthesize the CloudFormation template for this code.
3544

36-
```
37-
$ cdk synth
45+
```bash
46+
cdk synth
3847
```
3948

40-
You can now begin exploring the source code, contained in the hello directory.
41-
There is also a very trivial test included that can be run like this:
49+
If the CloudFormation template looks good, you can now deploy the stack.
4250

51+
```bash
52+
cdk deploy
4353
```
44-
$ pytest
54+
55+
Before deploying the stack, you can also run a diff to see the changes that will be made to your AWS account.
56+
```bash
57+
cdk diff
4558
```
4659

47-
To add additional dependencies, for example other CDK libraries, just add to
48-
your requirements.txt file and rerun the `pip install -r requirements.txt`
49-
command.
60+
## Expected Output
61+
62+
After deploying the stack, you will have a k3s cluster running on an EC2 instance in AWS. The expected output includes:
63+
64+
- A security group allowing SSH, HTTP, HTTPS, and Kubernetes API access.
65+
- An IAM role with policies for EC2 read-only access, SSM managed instance core, and ECR pull-only access.
66+
- An EC2 instance running the k3s cluster with the specified user data script.
67+
- Public IP address and instance ID of the deployed EC2 instance.
5068

5169
## Useful commands
5270

@@ -56,4 +74,12 @@ command.
5674
* `cdk diff` compare deployed stack with current state
5775
* `cdk docs` open CDK documentation
5876

59-
Enjoy!
77+
## Contributing
78+
79+
Contributions are welcome! Please feel free to submit a Pull Request.
80+
81+
## License
82+
83+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
84+
85+
Enjoy!

0 commit comments

Comments
 (0)