What Gets Deployed
This layer creates:- VPC & Networking: Virtual Private Cloud with public and private subnets, NAT gateways, and route tables
- EKS Cluster: Kubernetes cluster with managed node groups
- Tailscale Subnet Router: Secure VPN access to private resources
- Vault Infrastructure: KMS keys and DynamoDB backend for HashiCorp Vault
Environment Variables
Before deploying, set the required environment variables:Required Variables
| Variable | Description | How to Obtain |
|---|---|---|
TF_VAR_tailscale_auth_key | Tailscale authentication key | Create at Tailscale Admin Console |
TF_VAR_cloudflare_api_token | Cloudflare API token for DNS | Create in Cloudflare Dashboard under API Tokens |
Deployment Steps
Review the plan
- VPC with CIDR
10.0.0.0/16 - 3 public and 3 private subnets across availability zones
- NAT gateways for private subnet internet access
- EKS cluster with control plane and node groups
- EC2 instance for Tailscale subnet router
- KMS key and DynamoDB table for Vault
Post-Deployment Configuration
Configure kubectl Access
After the infrastructure is deployed, configure kubectl to access your EKS cluster:Configure Tailscale ACLs
To enable subnet routing through Tailscale, you need to update your Tailscale ACL configuration.Open Tailscale Admin Console
Navigate to https://login.tailscale.com/admin/acls
This configuration automatically approves subnet routes advertised by devices tagged with
tag:aws-router.Infrastructure Components
VPC Architecture
The VPC is configured with:- CIDR Block:
10.0.0.0/16 - Public Subnets: 3 subnets across different availability zones
- Used for NAT gateways, load balancers, and the Tailscale router
- Private Subnets: 3 subnets across different availability zones
- Used for EKS nodes and other private resources
- NAT Gateways: One per availability zone for high availability
- Internet Gateway: For public subnet internet access
EKS Configuration
The EKS cluster includes:- Control Plane: Managed by AWS
- API Endpoint: Private access only (accessible via Tailscale)
- Node Groups: Managed node groups in private subnets
- Default Node Size: t3.medium (configurable)
- Kubernetes Version: Latest stable version
Tailscale Subnet Router
The Tailscale subnet router:- Runs on a dedicated EC2 instance in a public subnet
- Advertises VPC CIDR blocks to your Tailscale network
- Enables secure access to private resources (EKS API, internal services)
- Uses ephemeral, pre-authorized auth key for automatic registration
Vault Infrastructure
Vault backend infrastructure includes:- KMS Key: For auto-unseal capability
- DynamoDB Table: For HA storage backend
The Vault server itself is deployed in the Platform Layer as a Helm chart.
Verification
Check EKS Cluster
Verify Tailscale Connection
Check the Tailscale admin console at https://login.tailscale.com/admin/machines:- Find your subnet router instance
- Verify it’s online and connected
- Check that subnet routes are advertised and approved
Test VPC Access
Once connected to Tailscale, test connectivity:Outputs
The infrastructure layer exports the following outputs for use by other layers:| Output | Description |
|---|---|
vpc_id | VPC identifier |
private_subnet_ids | List of private subnet IDs |
public_subnet_ids | List of public subnet IDs |
eks_cluster_endpoint | EKS API endpoint URL |
eks_cluster_name | Name of the EKS cluster |
eks_cluster_certificate_authority_data | Cluster CA certificate |
vault_kms_key_id | KMS key ID for Vault auto-unseal |
vault_dynamodb_table | DynamoDB table name for Vault storage |
Next Steps
With the infrastructure layer deployed, proceed to install platform components.Platform Layer
Deploy Kubernetes platform components and initialize Vault