|
| 1 | +# CloudBeaver Enterprise Edition - AWS EKS Deployment |
| 2 | + |
| 3 | +## Prerequisites |
| 4 | + |
| 5 | +- [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html) installed and configured |
| 6 | +- [eksctl](https://eksctl.io/installation/) installed |
| 7 | +- [Helm](https://helm.sh/docs/intro/install/) installed |
| 8 | +- [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/) installed |
| 9 | +- [Terraform](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli) installed |
| 10 | +- Access to an existing **EKS cluster** |
| 11 | + |
| 12 | +Policy required: |
| 13 | +- [AmazonElasticFileSystemFullAccess](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AmazonElasticFileSystemFullAccess.html) |
| 14 | + |
| 15 | +## AWS volumes configuration for Kubernetes deployment |
| 16 | + |
| 17 | +To store CloudBeaver EE data in the cloud, you need to configure cloud volumes. For example, you can store connection configurations and user information in AWS EFS. |
| 18 | + |
| 19 | +### Step 1: Associate IAM OIDC Provider |
| 20 | + |
| 21 | +Associate the IAM OIDC provider with your EKS cluster to enable IAM roles for service accounts. |
| 22 | + |
| 23 | +```bash |
| 24 | +eksctl utils associate-iam-oidc-provider \ |
| 25 | + --region=<your-region> \ |
| 26 | + --cluster=<your-cluster-name> \ |
| 27 | + --approve |
| 28 | +``` |
| 29 | + |
| 30 | +### Step 2: Install AWS EFS and EBS CSI Drivers |
| 31 | + |
| 32 | +Install the AWS EFS and EBS CSI drivers using Helm. |
| 33 | + |
| 34 | +```bash |
| 35 | +helm repo add aws-efs-csi-driver https://kubernetes-sigs.github.io/aws-efs-csi-driver/ |
| 36 | +helm repo add aws-ebs-csi-driver https://kubernetes-sigs.github.io/aws-ebs-csi-driver/ |
| 37 | +helm repo update |
| 38 | + |
| 39 | +helm install aws-efs-csi-driver aws-efs-csi-driver/aws-efs-csi-driver --namespace kube-system |
| 40 | +helm install aws-ebs-csi-driver aws-ebs-csi-driver/aws-ebs-csi-driver --namespace kube-system |
| 41 | +``` |
| 42 | + |
| 43 | +### Step 3: Configure EFS via Terraform |
| 44 | + |
| 45 | +1. Navigate to directory `cloudbeaver-deploy/AWS/aws-eks` |
| 46 | +2. Open the `main.tf` file in a text editor. |
| 47 | +3. Update the following variables with your AWS region and EKS cluster name: |
| 48 | +``` |
| 49 | +variable "region" { |
| 50 | + description = "Region for AWS EFS" |
| 51 | + default = "<your-region>" |
| 52 | +} |
| 53 | +variable "cluster_name" { |
| 54 | + description = "EKS cluster name" |
| 55 | + default = "<your-cluster-name>" |
| 56 | +} |
| 57 | +``` |
| 58 | +4. Run `terraform init`. |
| 59 | +5. Next, run `terraform apply`, which will output `efs_file_system_id`. |
| 60 | +6. Open the file `cloudbeaver-deploy/k8s/values.yaml` and update the `fileSystemId` parameter with the value of `efs_file_system_id` obtained in the previous step. |
| 61 | +7. Fill in the other parameters as shown in the example: |
| 62 | + |
| 63 | +```yaml |
| 64 | +cloudProvider: aws |
| 65 | +storage: |
| 66 | + type: efs |
| 67 | + storageClassName: "efs-sc" |
| 68 | + efs: |
| 69 | + fileSystemId: "<your-efs-id>" |
| 70 | +``` |
| 71 | +
|
| 72 | +Once this is set up, you can deploy CloudBeaver EE by following [this guide](../../k8s/README.md). |
| 73 | +
|
| 74 | +## AWS ALB configuration for Kubernetes deployment |
| 75 | +
|
| 76 | +This deployment option can use Nginx, HAProxy, or AWS ALB as an ingress controller. If you want to use [AWS Application Load Balancer](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/introduction.html), follow the steps below. |
| 77 | +
|
| 78 | +Install `AWS CLI`: If `AWS CLI` is not installed yet, follow the instructions on the [official AWS CLI website](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html). |
| 79 | + |
| 80 | +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](https://eksctl.io/installation/). |
| 81 | + |
| 82 | +Policy required for eksctl to work: |
| 83 | + |
| 84 | +- [CloudFormation Full Access](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AWSCloudFormationFullAccess.html) |
| 85 | +- [EKS Full Access](https://docs.aws.amazon.com/eks/latest/userguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-console) |
| 86 | +- [EC2 and EC2 Auto Scaling Full Access](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AmazonEC2FullAccess.html) |
| 87 | +- [IAM Full Access](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/IAMFullAccess.html) |
| 88 | +- [Systems Manager](https://docs.aws.amazon.com/systems-manager/latest/userGuide/security_iam_id-based-policy-examples.html) |
| 89 | + |
| 90 | +1. OIDC Provider Association: |
| 91 | + |
| 92 | +```bash |
| 93 | +eksctl utils associate-iam-oidc-provider --region=<your-region> --cluster=<your-cluster-name> --approve |
| 94 | +``` |
| 95 | + |
| 96 | +2. Create IAM role and link policy: |
| 97 | + |
| 98 | +Create policy IAM: |
| 99 | +```bash |
| 100 | +curl -o iam_policy.json https://raw.githubusercontent.com/kubernetes-sigs/aws-load-balancer-controller/main/docs/install/iam_policy.json |
| 101 | +aws iam create-policy --policy-name AWSLoadBalancerControllerIAMPolicy --policy-document file://iam_policy.json |
| 102 | +``` |
| 103 | + |
| 104 | +Create IAM role and link policy: |
| 105 | +```bash |
| 106 | +eksctl create iamserviceaccount \ |
| 107 | + --cluster <your-cluster-name> \ |
| 108 | + --region <your-region> \ |
| 109 | + --namespace kube-system \ |
| 110 | + --name aws-load-balancer-controller \ |
| 111 | + --attach-policy-arn arn:aws:iam::<your-account-id>:policy/AWSLoadBalancerControllerIAMPolicy \ |
| 112 | + --approve |
| 113 | +``` |
| 114 | + |
| 115 | +3. Install AWS Load Balancer Controller using Helm: |
| 116 | + |
| 117 | +```bash |
| 118 | +helm repo add eks https://aws.github.io/eks-charts |
| 119 | +helm repo update |
| 120 | +
|
| 121 | +helm install aws-load-balancer-controller eks/aws-load-balancer-controller \ |
| 122 | + -n kube-system \ |
| 123 | + --set clusterName=<your-cluster-name> \ |
| 124 | + --set serviceAccount.create=false \ |
| 125 | + --set region=<your-region> \ |
| 126 | + --set vpcId=<your-vpc-id> \ |
| 127 | + --set serviceAccount.name=aws-load-balancer-controller |
| 128 | +``` |
| 129 | + |
| 130 | +Once this is set up, you can deploy CloudBeaver EE by following [this guide](../../k8s/README.md). |
0 commit comments