Home / Platform management / Clusters / Clusters / FAQ / EKS Cluster Deployment Prometheus Monitoring Component Network Related Configurations

EKS Cluster Deployment Prometheus Monitoring Component Network Related Configurations

Configure an AWS VPC

Procedure

To comply with the security specifications of AWS EKS, the next steps require the use of Cloud Shell.

  1. Enter the keyword ‘cloudshell’ in the search bar to open the Cloud Shell Feature Page( https://console.aws.amazon.com/cloudshell/home) .

  2. Check whether the current region is the region where the cluster is connected, and switch to the region where the cluster is located if necessary.

  3. Wait for the Cloud Shell to be ready, clear the command line, and run the following command:

        # Get a list of subnet IDs used by the EKS cluster you are plugging into
        IFS=$'\n' read -d "" -ra _subnets < \
            <(aws eks describe-cluster --name "< the name of the EKS cluster being connected>" \
            --query "cluster.resourcesVpcConfig.subnetIds" --output text \
            | tr '\t\r\n' ' ' | sed -E 's/ +/\n/g')
    
    declare -p _subnets
    
    # Add the necessary tags to all subnets
        cluster_import_to="<cluster name>"
    
    for _net in "${_subnets[@]}"; do
            aws ec2 create-tags --resources "$_net" \
                --tags "Key=kubernetes.io/role/elb,Value=1"
            aws ec2 create-tags --resources "$_net" \
                --tags "Key=kubernetes.io/cluster/${cluster_import_to},Value=shared"
        done