Skip to content

aws-samples/eks-saas-gitops

GitOps SaaS for Multi-Tenancy

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.

🛠 Pre-requisites

  • 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.

🚀 Deployment Steps

Step 1: Clone the 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

Step 2: Navigate to the Directory

Open your terminal and navigate to the directory where your CloudFormation template is saved.

cd eks-saas-gitops/

Step 3: Create the CloudFormation Stack

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/saas-gitops-cloudformation.yaml \
--parameters ParameterKey=C9EnvType,ParameterValue=self \
--capabilities "CAPABILITY_IAM" "CAPABILITY_NAMED_IAM"
  • YOUR_CHOICE_HERE: Use either self or event-engine based on your specific installation requirement.

Step 4: Verify Stack Creation

Once the command is executed, navigate to the AWS CloudFormation Console to monitor the stack's status.

⏳ Wait for Environment Setup

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.

🖥 Accessing Cloud9

To access your newly created Cloud9 environment:

  1. Go to the AWS Cloud9 Console.
  2. Find your Cloud9 instance listed under "Your environments."
  3. Click "Open IDE" to start working in your Cloud9 environment.

Removing the stack

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"

Security

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.

About

Source repo of Building SaaS applications on Amazon EKS using GitOps workshop

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published