Skip to content

Latest commit

 

History

History
133 lines (98 loc) · 5.12 KB

README.md

File metadata and controls

133 lines (98 loc) · 5.12 KB

AWS volumes configuration for Kubernetes deployment

To store Team Edition data in the cloud, you need to configure cloud volumes. For example, you can store connection configurations and user information in AWS EFS.

Prerequisites

Policy required:

Step 1: Associate IAM OIDC Provider

Associate the IAM OIDC provider with your EKS cluster to enable IAM roles for service accounts.

eksctl utils associate-iam-oidc-provider \
  --region=<your-region> \
  --cluster=<your-cluster-name> \
  --approve

Step 2: Install AWS EFS and EBS CSI Drivers

Install the AWS EFS and EBS CSI drivers using Helm.

helm repo add aws-efs-csi-driver https://kubernetes-sigs.github.io/aws-efs-csi-driver/
helm repo add aws-ebs-csi-driver https://kubernetes-sigs.github.io/aws-ebs-csi-driver/
helm repo update

helm install aws-efs-csi-driver aws-efs-csi-driver/aws-efs-csi-driver --namespace kube-system
helm install aws-ebs-csi-driver aws-ebs-csi-driver/aws-ebs-csi-driver --namespace kube-system

Step 3: Configure EFS via Terraform

  1. Navigate to directory team-edition-deploy/AWS/aws-eks
  2. Open the main.tf file in a text editor.
  3. Update the following variables with your AWS region and EKS cluster name:
variable "region" {
  description = "Region for AWS EFS"
  default     = "<your-region>"
}
variable "cluster_name" {
  description = "EKS cluster name"
  default     = "<your-cluster-name>"
}
  1. Run terraform init.
  2. Next, run terraform apply, which will output efs_file_system_id.
  3. Open the file team-edition-deploy/k8s/cbte/values.yaml and update the fileSystemId parameter with the value of efs_file_system_id obtained in the previous step.
  4. Fill in the other parameters as shown in the example:
cloudProvider: aws
storage:
  type: efs
  storageClassName: "efs-sc"
  efs:
    fileSystemId: "<your-efs-id>"

Once this is set up, you can deploy Team Edition by following this guide.

AWS ALB configuration for Kubernetes deployment

If you want to use AWS Application Load Balancer as ingress controller, follow this instruction.
This is not necessary, you can use nginx by default as a ingress controller.

Install AWS CLI: If AWS CLI is not installed yet, install it by following the instructions on the official AWS CLI website.

Install eksctl: eksctl is a command-line utility for creating and managing EKS clusters. Install eksctl by following the instructions on the official eksctl website.

Policy required for eksctl to work:

  1. OIDC Provider Association:
eksctl utils associate-iam-oidc-provider --region=<your-region> --cluster=<your-cluster-name> --approve
  1. Create IAM role and link policy:

Create policy IAM:

curl -o iam_policy.json https://raw.githubusercontent.com/kubernetes-sigs/aws-load-balancer-controller/main/docs/install/iam_policy.json
aws iam create-policy --policy-name AWSLoadBalancerControllerIAMPolicy --policy-document file://iam_policy.json

Create IAM role and link policy:

eksctl create iamserviceaccount \
  --cluster <your-cluster-name> \
  --region <your-region> \
  --namespace kube-system \
  --name aws-load-balancer-controller \
  --attach-policy-arn arn:aws:iam::<your-account-id>:policy/AWSLoadBalancerControllerIAMPolicy \
  --approve
  1. Install AWS Load Balancer Controller using Helm:
helm repo add eks https://aws.github.io/eks-charts
helm repo update

helm install aws-load-balancer-controller eks/aws-load-balancer-controller \
  -n kube-system \
  --set clusterName=<your-cluster-name> \
  --set serviceAccount.create=false \
  --set region=<your-region> \
  --set vpcId=<your-vpc-id> \
  --set serviceAccount.name=aws-load-balancer-controller

Once this is set up, you can deploy Team Edition by following this guide.