From 01ad44ff13116f9aa3ef691bdeaf976015f7d9d1 Mon Sep 17 00:00:00 2001 From: Carrie Date: Tue, 12 Nov 2024 11:10:57 -0500 Subject: [PATCH 1/3] feat: adding multi-account for aws --- .vscode/settings.json | 5 ++ docs/aws/advanced/multi-account.mdx | 77 +++++++++++++++++++++ docs/aws/partials/common/_prerequisites.mdx | 2 + 3 files changed, 84 insertions(+) create mode 100644 .vscode/settings.json create mode 100644 docs/aws/advanced/multi-account.mdx diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..9b160e79 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "cSpell.words": [ + "Kubefirst" + ] +} diff --git a/docs/aws/advanced/multi-account.mdx b/docs/aws/advanced/multi-account.mdx new file mode 100644 index 00000000..8c3bc12b --- /dev/null +++ b/docs/aws/advanced/multi-account.mdx @@ -0,0 +1,77 @@ +--- +title: AWS Multi-Account Support +description: Install and explore details about using Kubefirst with AWS multi-account +--- + +## 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](https://github.com/konstructio/aws-arn/tree/main/examples/kubefirst-pro-role) locally with the following steps. + +1. Create a `terraform.tfvars` file with the OIDC endpoint from management cluster and cluster name. + + ```text + oidc_endpoint = "value" + mgmt_cluster_name = "value" + ``` + +2. Run `terraform init` to download the AWS provider and configure the local state file. + + ```bash + terraform init + ``` + +3. Run `terraform apply` to create an identity provider and role. This allows crossplane and Kubefirst to access the downstream account in `us-east-1`. + + ```bash + terraform apply + ``` + +4. To view your new role ARN run the following + + ```bash + terraform output + ``` + +## Installing AWS Multi-Account Support + +Refer to the following steps to install this feature. + +1. Clone the repository. + + ```bash + git clone https://github.com/konstructio/aws-arn.git + cd aws-arn/examples/kubefirst-pro-role + ``` + +2. Install Terraform with [their instructions here.](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli) + +3. Configure your AWS credentials by setting your environment variables as follows (update the example with your values): + + ```bash + export AWS_ACCESS_KEY_ID= + export AWS_SECRET_ACCESS_KEY= + ``` + +4. Gather the required information for installatio, 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. + +5. Plan the Terraform deployment by running this command and reviewing the changes Terraform will make. + + ```bash + terraform plan + ``` + +6. Apply the Terraform configuration by running the following commmand to apply the configuration and create the IAM role. + + ``` bash + 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. diff --git a/docs/aws/partials/common/_prerequisites.mdx b/docs/aws/partials/common/_prerequisites.mdx index 02e26c4a..8dbe4ffa 100644 --- a/docs/aws/partials/common/_prerequisites.mdx +++ b/docs/aws/partials/common/_prerequisites.mdx @@ -9,4 +9,6 @@ If you are not sure how to generate the role that will be assume, you can use [this Terraform plan](https://github.com/kubefirst/kubefirst/blob/main/tools/aws-create-role.tf). Please read the comments before proceeding. If you want to easily assume the role from your terminal, you can use [this bash script](https://github.com/kubefirst/kubefirst/blob/main/tools/aws-assume-role.sh). + +For users interested in AWS Multi-Account support, check out [additional details here.](/docs/aws/advanced/multi-account.mdx) ::: From b51fd130f3c2cd865b8861b11c037ba98f96963b Mon Sep 17 00:00:00 2001 From: Carrie Date: Tue, 12 Nov 2024 11:14:47 -0500 Subject: [PATCH 2/3] chore: regenerate 2.7 docs --- .../aws/advanced/multi-account.mdx | 77 +++++++++++++++++++ .../aws/partials/common/_prerequisites.mdx | 2 + 2 files changed, 79 insertions(+) create mode 100644 versioned_docs/version-2.7/aws/advanced/multi-account.mdx diff --git a/versioned_docs/version-2.7/aws/advanced/multi-account.mdx b/versioned_docs/version-2.7/aws/advanced/multi-account.mdx new file mode 100644 index 00000000..8c3bc12b --- /dev/null +++ b/versioned_docs/version-2.7/aws/advanced/multi-account.mdx @@ -0,0 +1,77 @@ +--- +title: AWS Multi-Account Support +description: Install and explore details about using Kubefirst with AWS multi-account +--- + +## 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](https://github.com/konstructio/aws-arn/tree/main/examples/kubefirst-pro-role) locally with the following steps. + +1. Create a `terraform.tfvars` file with the OIDC endpoint from management cluster and cluster name. + + ```text + oidc_endpoint = "value" + mgmt_cluster_name = "value" + ``` + +2. Run `terraform init` to download the AWS provider and configure the local state file. + + ```bash + terraform init + ``` + +3. Run `terraform apply` to create an identity provider and role. This allows crossplane and Kubefirst to access the downstream account in `us-east-1`. + + ```bash + terraform apply + ``` + +4. To view your new role ARN run the following + + ```bash + terraform output + ``` + +## Installing AWS Multi-Account Support + +Refer to the following steps to install this feature. + +1. Clone the repository. + + ```bash + git clone https://github.com/konstructio/aws-arn.git + cd aws-arn/examples/kubefirst-pro-role + ``` + +2. Install Terraform with [their instructions here.](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli) + +3. Configure your AWS credentials by setting your environment variables as follows (update the example with your values): + + ```bash + export AWS_ACCESS_KEY_ID= + export AWS_SECRET_ACCESS_KEY= + ``` + +4. Gather the required information for installatio, 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. + +5. Plan the Terraform deployment by running this command and reviewing the changes Terraform will make. + + ```bash + terraform plan + ``` + +6. Apply the Terraform configuration by running the following commmand to apply the configuration and create the IAM role. + + ``` bash + 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. diff --git a/versioned_docs/version-2.7/aws/partials/common/_prerequisites.mdx b/versioned_docs/version-2.7/aws/partials/common/_prerequisites.mdx index 02e26c4a..8dbe4ffa 100644 --- a/versioned_docs/version-2.7/aws/partials/common/_prerequisites.mdx +++ b/versioned_docs/version-2.7/aws/partials/common/_prerequisites.mdx @@ -9,4 +9,6 @@ If you are not sure how to generate the role that will be assume, you can use [this Terraform plan](https://github.com/kubefirst/kubefirst/blob/main/tools/aws-create-role.tf). Please read the comments before proceeding. If you want to easily assume the role from your terminal, you can use [this bash script](https://github.com/kubefirst/kubefirst/blob/main/tools/aws-assume-role.sh). + +For users interested in AWS Multi-Account support, check out [additional details here.](/docs/aws/advanced/multi-account.mdx) ::: From 95be5f21b9d2c850c072c52adc90d242be4a3b46 Mon Sep 17 00:00:00 2001 From: Carrie Date: Tue, 12 Nov 2024 11:17:34 -0500 Subject: [PATCH 3/3] fix: typos --- docs/aws/advanced/multi-account.mdx | 4 ++-- versioned_docs/version-2.7/aws/advanced/multi-account.mdx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/aws/advanced/multi-account.mdx b/docs/aws/advanced/multi-account.mdx index 8c3bc12b..d302f302 100644 --- a/docs/aws/advanced/multi-account.mdx +++ b/docs/aws/advanced/multi-account.mdx @@ -58,7 +58,7 @@ Refer to the following steps to install this feature. export AWS_SECRET_ACCESS_KEY= ``` -4. Gather the required information for installatio, you will need: +4. 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. @@ -68,7 +68,7 @@ Refer to the following steps to install this feature. terraform plan ``` -6. Apply the Terraform configuration by running the following commmand to apply the configuration and create the IAM role. +6. Apply the Terraform configuration by running the following command to apply the configuration and create the IAM role. ``` bash terraform apply --auto-approve diff --git a/versioned_docs/version-2.7/aws/advanced/multi-account.mdx b/versioned_docs/version-2.7/aws/advanced/multi-account.mdx index 8c3bc12b..d302f302 100644 --- a/versioned_docs/version-2.7/aws/advanced/multi-account.mdx +++ b/versioned_docs/version-2.7/aws/advanced/multi-account.mdx @@ -58,7 +58,7 @@ Refer to the following steps to install this feature. export AWS_SECRET_ACCESS_KEY= ``` -4. Gather the required information for installatio, you will need: +4. 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. @@ -68,7 +68,7 @@ Refer to the following steps to install this feature. terraform plan ``` -6. Apply the Terraform configuration by running the following commmand to apply the configuration and create the IAM role. +6. Apply the Terraform configuration by running the following command to apply the configuration and create the IAM role. ``` bash terraform apply --auto-approve