AWS Multi-Account Support
Summary
Kubefirst supports AWS Multi-account to deploy and manage workload clusters across multiple AWS accounts. Using multi-account you can manage and deploy workloads in multiple AWS accounts without the need to log in and configure each account individually. In addition, take advantage of consolidated billing to improve budgeting and resource allocation for your AWS footprint.
Prerequisites
This installation assumes you already have Kubefirst installed. In addition, before getting started you will need to have Terraform installed and generate a Role ARN.
You can run this Terraform script locally with the following steps.
-
Create a
terraform.tfvars
file with the OIDC endpoint from management cluster and cluster name.oidc_endpoint = "value"
mgmt_cluster_name = "value" -
Run
terraform init
to download the AWS provider and configure the local state file.terraform init
-
Run
terraform apply
to create an identity provider and role. This allows crossplane and Kubefirst to access the downstream account inus-east-1
.terraform apply
-
To view your new role ARN run the following
terraform output
Installing AWS Multi-Account Support
Refer to the following steps to install this feature.
-
Clone the repository.
git clone https://github.com/konstructio/aws-arn.git
cd aws-arn/examples/kubefirst-pro-role -
Install Terraform with their instructions here.
-
Configure your AWS credentials by setting your environment variables as follows (update the example with your values):
export AWS_ACCESS_KEY_ID=<your-access-key-id>
export AWS_SECRET_ACCESS_KEY=<your-secret-access-key> -
Gather the required information for installation, you will need:
- OIDC Endpoint: The OIDC endpoint for the management cluster. You can find this in the AWS console under the EKS cluster details.
- Management Cluster Name: The name of your management cluster.
-
Plan the Terraform deployment by running this command and reviewing the changes Terraform will make.
terraform plan
-
Apply the Terraform configuration by running the following command to apply the configuration and create the IAM role.
terraform apply --auto-approve
When you've completed these steps you should have a Role ARN that you can use to provision physical clusters across multiple AWS accounts.