This repository offers a sample pattern to manage multi-tenancy in a Kubernetes cluster using GitOps with Flux. The provided CloudFormation template automates the deployment of necessary AWS resources and sets up an environment ready for GitOps practices.
- AWS CLI: Ensure you have the AWS CLI installed and configured with the necessary permissions.
- Git: Make sure Git is installed for cloning this repository.
Clone this repository to your local machine to get the CloudFormation template and other helper scripts.
git clone https://github.com/aws-samples/eks-saas-gitops.git
Open your terminal and navigate to the directory where your CloudFormation template is saved.
cd eks-saas-gitops/
Execute the following AWS CLI command to deploy the stack. Make sure to replace placeholders accordingly.
aws cloudformation create-stack \
--stack-name eks-saas-gitops \
--template-body file://helpers/cloudformation.yaml \
--parameters ParameterKey=C9EnvType,ParameterValue=self \
--capabilities "CAPABILITY_IAM" "CAPABILITY_NAMED_IAM"
YOUR_CHOICE_HERE
: Use eitherself
orevent-engine
based on your specific installation requirement.
Once the command is executed, navigate to the AWS CloudFormation Console to monitor the stack's status.
Post stack deployment, it might take a few minutes for the environment to become operational. This is mainly because the Terraform setup includes provisioning a Cloud9 instance and running the install.sh
script. To check the progress, you can visit the SSM Run Command Console.
Note: Make sure you're operating in the region where the stack was deployed.
To access your newly created Cloud9 environment:
- Go to the AWS Cloud9 Console.
- Find your Cloud9 instance listed under "Your environments."
- Click "Open IDE" to start working in your Cloud9 environment.
To remove the resources that have been created for this workshop, execute the following AWS CLI command:
aws cloudformation delete-stack --stack-name "eks-saas-gitops"
See CONTRIBUTING for more information.
This library is licensed under the MIT-0 License. See the LICENSE file.