You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If your environment doesnt have internet access via IGW/NATG, then the recommended approach is below
Make sure to launch EKS Control plane in private subnets which gives the lambda functions launched by CDK an ability to talk to helm registries
Make sure to launch EKS Data plane in isolated subnets which has no internet connectivity
Make sure to validate your isolated subnets has relevant Interface endpoints to talk to respective AWS APIs privately
Below is how deployment.yaml should look like
name: test-deploytoolchainRegion: eu-west-2groups:
- name: replicationpath: manifests/demo-isolated/replicator-modules.yaml
- name: corepath: manifests/demo-isolated/core-modules.yamltargetAccountMappings:
- alias: primaryaccountId: 1234567890default: true# parametersGlobal:regionMappings:
- region: eu-west-2default: trueparametersRegional:
dockerCredentialsSecret: aws-idf-docker-credentials# replace the below networking details with customer specific valuesvpcId: vpc-XXXXXXXXpublicSubnetIds:
- subnet-XXXXXXXX
- subnet-XXXXXXXXprivateSubnetIds:
- subnet-XXXXXXXX
- subnet-XXXXXXXXisolatedSubnetIds:
- subnet-XXXXXXXX
- subnet-XXXXXXXXsecurityGroupIds:
- sg-XXXXXXXX# these networking values will be used for seedfarmer's codebuild environmentnetwork:
vpcId:
valueFrom:
parameterValue: vpcId# Alternatively you can grab the networking values from SSM parameter store# valueFrom:# parameterStore: /idf/vpc-idprivateSubnetIds:
valueFrom:
parameterValue: privateSubnetIds# Alternatively you can grab the networking values from SSM parameter store# valueFrom:# parameterStore: /idf/private-idssecurityGroupIds:
valueFrom:
parameterValue: securityGroupIds# Alternatively you can grab the codebuild security group from SSM parameter store# valueFrom:# parameterStore: /idf/sg-ids
- The above will launch codebuild trigerred via seedfarmer inside the above configured VPC which would have ability to talk to EKS private API.
Deploy docker-image replications module which would replicate the docker images embedded inside the specified version of helm charts sourced from data folder. Sample declaration of docker-image replications module is below
name: replicationpath: modules/replication/dockerimage-replication/dataFiles:
- filePath: data/eks_dockerimage-replication/versions/<<EKS_VERSION>>.yaml #replace the EKS_VERSION with the right EKS Cluster version
- filePath: data/eks_dockerimage-replication/versions/default.yamlparameters:
- name: eks-versionvalue: 1.25# valueFrom:# envVariable: GLOBAL_EKS_VERSION
- The above would replicate the docker images from public registries into an AWS account private ECR.
- The replicated docker images inventory json is available under an s3 bucket path, which should be consumed in EKS module
Next, deploy EKS module using the below sample manifest
name: ekspath: modules/core/eks/dataFiles:
- filePath: data/eks_dockerimage-replication/versions/<<EKS_VERSION>>.yaml #replace the EKS_VERSION with the right EKS Cluster version
- filePath: data/eks_dockerimage-replication/versions/default.yamlparameters:
- name: replicated-ecr-images-metadata-s3-path # this parameter will load replicated images inventory from s3 bucketvalueFrom:
moduleMetadata:
group: replicationname: replicationkey: s3_full_path
- name: vpc-idvalue:
valueFrom:
parameterValue: vpcId
- name: controlplane-subnet-ids # the below would grab the subnet ids declared in deployment.yaml or you can declare inlinevalueFrom:
parameterValue: privateSubnetIds
- name: dataplane-subnet-ids # the below would grab the subnet ids declared in deployment.yamlvalueFrom:
parameterValue: isolatedSubnetIds
- name: codebuild-sg-id # the below would establish network connectivity between EKS API server and codebuildvalueFrom:
parameterValue: securityGroupIds
- name: eks-admin-role-namevalue: Admin
- name: eks-poweruser-role-namevalue: PowerUser
- name: eks-read-only-role-namevalue: ReadOnly
- name: eks-version# value: 1.25valueFrom:
envVariable: GLOBAL_EKS_VERSION
- name: eks-computevalue:
eks_nodegroup_config:
- eks_ng_name: ng1eks_node_quantity: 2eks_node_max_quantity: 5eks_node_min_quantity: 1eks_node_disk_size: 20eks_node_instance_type: "m5.large"
- eks_ng_name: ng2eks_node_quantity: 2eks_node_max_quantity: 5eks_node_min_quantity: 1eks_node_disk_size: 20eks_node_instance_type: "m5.xlarge"eks_node_spot: Falseeks_api_endpoint_private: Trueeks_secrets_envelope_encryption: True
- name: eks-addonsvalue:
deploy_aws_lb_controller: True # We deploy it unless set to Falsedeploy_external_dns: True # We deploy it unless set to Falsedeploy_aws_ebs_csi: True # We deploy it unless set to Falsedeploy_aws_efs_csi: True # We deploy it unless set to Falsedeploy_cluster_autoscaler: True # We deploy it unless set to Falsedeploy_metrics_server: True # We deploy it unless set to Falsedeploy_secretsmanager_csi: False # We deploy it unless set to Falsedeploy_external_secrets: Falsedeploy_cloudwatch_container_insights_metrics: True # We deploy it unless set to Falsedeploy_cloudwatch_container_insights_logs: Truecloudwatch_container_insights_logs_retention_days: 7deploy_amp: Truedeploy_grafana_for_amp: Truedeploy_kured: Truedeploy_calico: Falsedeploy_nginx_controller:
value: Falsenginx_additional_annotations:
nginx.ingress.kubernetes.io/whitelist-source-range: "100.64.0.0/10,10.0.0.0/8"deploy_kyverno:
value: Falsekyverno_policies:
validate:
- block-ephemeral-containers
If you want to launch app pods in the extended VPC CIDR, follow the below manifest
name: ekspath: modules/core/eks/dataFiles:
- filePath: data/eks_dockerimage-replication/versions/<<EKS_VERSION>>.yaml #replace the EKS_VERSION with the right EKS Cluster version
- filePath: data/eks_dockerimage-replication/versions/default.yamlparameters:
- name: replicated-ecr-images-metadata-s3-path # this parameter will load replicated images inventory from s3 bucketvalueFrom:
moduleMetadata:
group: replicationname: replicationkey: s3_full_path# the below would grab the vpc id declared in deployment.yaml
- name: vpc-idvalueFrom:
parameterValue: vpcId# the below would grab the vpc id declared inline# - name: vpc-id# value: "vpc-XXXXX"# the below would grab the subnet ids declared in deployment.yaml
- name: controlplane-subnet-ids valueFrom:
parameterValue: privateSubnetIds# the below would grab the subnet ids declared inline# - name: controlplane-subnet-ids # value: ["subnet-XXXXXXXXX", "subnet-XXXXXXXXX"]
- name: dataplane-subnet-ids # the below would grab the subnet ids declared in deployment.yamlvalueFrom:
parameterValue: isolatedSubnetIds
- name: custom-subnet-ids # Make sure to extend VPC CIDR before you launch EKS cluster and substitute the extended subnet IDS belowvalueFrom:
parameterValue: customSubnetIds
- name: codebuild-sg-id # the below would establish network connectivity between EKS API server and codebuildvalueFrom:
parameterValue: securityGroupIds
- name: eks-admin-role-namevalue: Admin
- name: eks-poweruser-role-namevalue: PowerUser
- name: eks-read-only-role-namevalue: ReadOnly
- name: eks-version# value: 1.25valueFrom:
envVariable: GLOBAL_EKS_VERSION
- name: eks-computevalue:
eks_nodegroup_config:
- eks_ng_name: ng1eks_node_quantity: 2eks_node_max_quantity: 5eks_node_min_quantity: 1eks_node_disk_size: 20eks_node_instance_type: "m5.large"
- eks_ng_name: ng2eks_node_quantity: 2eks_node_max_quantity: 5eks_node_min_quantity: 1eks_node_disk_size: 20eks_node_instance_type: "m5.xlarge"eks_node_spot: Falseeks_api_endpoint_private: Trueeks_secrets_envelope_encryption: True
- name: eks-addonsvalue:
deploy_aws_lb_controller: True # We deploy it unless set to Falsedeploy_external_dns: True # We deploy it unless set to Falsedeploy_aws_ebs_csi: True # We deploy it unless set to Falsedeploy_aws_efs_csi: True # We deploy it unless set to Falsedeploy_cluster_autoscaler: True # We deploy it unless set to Falsedeploy_metrics_server: True # We deploy it unless set to Falsedeploy_secretsmanager_csi: False # We deploy it unless set to Falsedeploy_external_secrets: Falsedeploy_cloudwatch_container_insights_metrics: True # We deploy it unless set to Falsedeploy_cloudwatch_container_insights_logs: Truecloudwatch_container_insights_logs_retention_days: 7deploy_amp: Truedeploy_grafana_for_amp: Truedeploy_kured: Truedeploy_calico: Falsedeploy_nginx_controller:
value: Falsenginx_additional_annotations:
nginx.ingress.kubernetes.io/whitelist-source-range: "100.64.0.0/10,10.0.0.0/8"deploy_kyverno:
value: Falsekyverno_policies:
validate:
- block-ephemeral-containers