Skip to content

Get VPC after EksBlueprints builder

0

I create a simple cluster with the EksBlueprints. Everything works fine. But how I can get the generated VPC to use it in other Stacks?

const stack = blueprints.EksBlueprint.builder()
    .account(account)
    .region(region)
    .version(version)  
    .resourceProvider(hostedZoneName, new blueprints.LookupHostedZoneProvider(hostedZoneName))
    .resourceProvider(blueprints.GlobalResources.Certificate, new blueprints.ImportCertificateProvider(myCertArn, "cert1-id"))   
    .addOns(...addOns)
    .useDefaultSecretEncryption(true)
    .teams(platformTeam) // set to false to turn secret encryption off (non-production/demo cases)
    .build(app, 'eks-blueprint'); 

asked 2 years ago177 views

1 Answer
0

1. Double-Check NTP and Timezone Settings

Make sure that the NTP service is running correctly, and the timezone on the server is set correctly. Even if the server time appears to be synced, issues can arise if the timezone is misconfigured. AWS uses UTC time for requests, so the system's time should match UTC properly.

  • Check your timezone with:

    timedatectl

    If it's not set to UTC, you can change it using:

    sudo timedatectl set-timezone UTC
  • Verify that NTP is working:

    timedatectl status

    Ensure the NTP synchronized line says "yes."

  • If the NTP service is not synchronized, restart it:

    sudo systemctl restart systemd-timesyncd

2. Sync System Time with NTP

Even if the timedatectl shows the NTP service is active, you can manually force a time sync using the ntpdate tool (if it's installed):

sudo ntpdate -u pool.ntp.org

If the ntpdate tool is not installed, install it:

sudo apt-get install ntpdate

3. Check AWS Region and Time Offset

Ensure the AWS credentials in your GitLab configuration (e.g., AWS access keys in gitlab.rb) are valid, and check the region you're uploading the backups to. The RequestTimeTooSkewed error can occur if there is a significant time mismatch between the client and the region you're accessing.

  • Check the AWS region in the gitlab.rb backup configuration. Ensure it matches the region you're uploading to in AWS S3:
    backup_upload_connection = {
      "provider" => "AWS",
      "aws_access_key_id" => "your-access-key",
      "aws_secret_access_key" => "your-secret-key",
      "region" => "us-west-1",  # Ensure this matches your actual AWS S3 region
      "bucket" => "your-bucket-name"
    }

4. AWS CLI Time Synchronization

If your system's time is correct and you're still seeing issues, try configuring the AWS CLI on your server to ensure AWS request times are synchronized correctly.

  • Install AWS CLI if it's not installed:

    sudo apt-get install awscli
  • Run this to make sure AWS CLI is using the correct time configuration:

    aws s3 ls

If the CLI works correctly and shows the same error, the issue might be with AWS itself.

5. Check for AWS S3 Maintenance or Issues

Occasionally, AWS services might experience issues or maintenance that could affect time synchronization, though this is rare. You can check the AWS Service Health Dashboard for any ongoing issues.

Service Health Dashboard

6. Restart GitLab and Docker Container

Sometimes, services or containers may not reflect the updated system time immediately. Restart the GitLab service or the Docker container to ensure it picks up the latest system time:

# Restart Docker container
docker restart gitlab

# Or restart the GitLab service directly
sudo gitlab-ctl restart

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.