AWS, Cloud Computing

3 Mins Read

Securely Provide Public Access to Applications Hosted on an Amazon EKS Cluster

Voiced by Amazon Polly

Introduction

In modern cloud-based environments, hosting applications on Kubernetes clusters like Amazon Elastic Kubernetes Service (EKS) is preferred for managing scalability, reliability, and deployment efficiency. However, securely exposing these applications to the public is critical to mitigate potential threats while maintaining seamless access.

In this blog, we will explore how to securely grant public access to your application running on an Amazon EKS cluster by leveraging a bastion host architecture. We will break down the architecture, components, and step-by-step flow for a secure deployment.

Pioneers in Cloud Consulting & Migration Services

  • Reduced infrastructural costs
  • Accelerated application deployment
Get Started

Understanding the Architecture

AD

The diagram illustrates a secure access flow that enables public access to an application running on an Amazon EKS cluster while maintaining tight security controls.

  1. Shared Service Account:
    • Amazon VPC in the shared services account hosts the bastion server in a private subnet.
    • AWS Systems Manager (SSM) is configured to manage secure connections without exposing the bastion server to the internet.
  2. Transit Gateway (TGW):
    • The TGW securely bridges the shared services VPC and the production VPC.
  3. Production Account:
    • The production VPC contains the Amazon EKS cluster hosting the application within a private subnet.
    • Amazon EKS is integrated with private networking to ensure the Kubernetes API and node communication occur securely.

Key Security Enhancements

  1. No Direct Internet Access: The bastion server resides in a private subnet and is accessible only through SSM, eliminating the need for public IPs.
  2. Fine-Grained Access Control: Role-based access policies are applied to ensure that only authorized users from the operations team can access the bastion host.
  3. Encrypted Communication: All communication between the bastion host, TGW, and the Amazon EKS cluster is encrypted using AWS’s default and custom security groups and Amazon VPC configurations.
  4. Private Subnet for Amazon EKS: The Amazon EKS cluster is deployed in a private subnet, ensuring no direct exposure of application pods to the public internet.

Step-by-Step Deployment

  1. Configure the Bastion Host
  • Launch a bastion server in the shared services Amazon VPC’s private subnet.

step1

  • Creating subnets and Amazon VPC in shared service account.

step1b

  • Attach an SSM agent to the server to enable remote access using AWS Systems Manager Session Manager.
  1. Set Up Transit Gateway (TGW)
  • Establish a TGW connection between the shared services VPC and the production VPC.

step2

  • Configure routing tables to allow traffic only between the bastion host and the Amazon EKS cluster.
  1. Deploy the Application on Amazon EKS
  • Set up your Amazon EKS cluster in the production VPC’s private subnet.

step3

  • Use an Ingress controller, such as AWS ALB Ingress Controller or NGINX, to route external traffic to your application.
  1. Secure Application Access
  • Configure the ALB or NGINX ingress to expose the application using HTTPS.
  • Use a public-facing Application Load Balancer (ALB) with security groups restricting access to required IP ranges.
  1. Enable Secure Bastion Access
  • Use the AWS Systems Manager console or CLI to initiate a session with the bastion host.
  • Forward traffic from the bastion host to the Amazon EKS cluster for operational tasks like debugging or management.

Benefits of the Architecture

  1. Enhanced Security: This design minimizes the attack surface by eliminating public IPs for the bastion server and the Amazon EKS cluster.
  2. Scalability: Using a TGW allows for seamless scaling across multiple VPCs.
  3. Simplified Access: The SSM-managed bastion host provides a secure and straightforward access point for operational tasks without VPN complexities.
  4. Cost Efficiency: Private networking and serverless tools reduce infrastructure costs while providing security.

Conclusion

The combination of a bastion host, Transit Gateway, and private subnets ensures secure public access to applications running on Amazon EKS.

This architecture demonstrates a best-practice approach to balancing accessibility and security. Following these steps, you can confidently expose your applications to the public while protecting your infrastructure from potential threats.

Drop a query if you have any questions regarding Amazon EKS and we will get back to you quickly.

Making IT Networks Enterprise-ready – Cloud Management Services

  • Accelerated cloud migration
  • End-to-end view of the cloud environment
Get Started

About CloudThat

CloudThat is a leading provider of Cloud Training and Consulting services with a global presence in India, the USA, Asia, Europe, and Africa. Specializing in AWS, Microsoft Azure, GCP, VMware, Databricks, and more, the company serves mid-market and enterprise clients, offering comprehensive expertise in Cloud Migration, Data Platforms, DevOps, IoT, AI/ML, and more.

CloudThat is the first Indian Company to win the prestigious Microsoft Partner 2024 Award and is recognized as a top-tier partner with AWS and Microsoft, including the prestigious ‘Think Big’ partner award from AWS and the Microsoft Superstars FY 2023 award in Asia & India. Having trained 650k+ professionals in 500+ cloud certifications and completed 300+ consulting projects globally, CloudThat is an official AWS Advanced Consulting Partner, Microsoft Gold Partner, AWS Training PartnerAWS Migration PartnerAWS Data and Analytics PartnerAWS DevOps Competency PartnerAWS GenAI Competency PartnerAmazon QuickSight Service Delivery PartnerAmazon EKS Service Delivery Partner AWS Microsoft Workload PartnersAmazon EC2 Service Delivery PartnerAmazon ECS Service Delivery PartnerAWS Glue Service Delivery PartnerAmazon Redshift Service Delivery PartnerAWS Control Tower Service Delivery PartnerAWS WAF Service Delivery PartnerAmazon CloudFront and many more.

To get started, go through our Consultancy page and Managed Services PackageCloudThat’s offerings.

FAQs

1. What is the role of the bastion host in this architecture?

ANS: – The bastion host is a secure entry point for managing and accessing the Amazon EKS cluster. It resides in a private subnet and can only be accessed using AWS Systems Manager, ensuring no direct exposure to the internet.

2. Why is AWS Systems Manager (SSM) used instead of a public IP for the bastion host?

ANS: – AWS Systems Manager allows secure access to the bastion host without requiring a public IP. This eliminates the need for VPNs or direct internet exposure, reducing the attack surface.

WRITTEN BY Shridhar Vinchurkar

Share

Comments

    Click to Comment

Get The Most Out Of Us

Our support doesn't end here. We have monthly newsletters, study guides, practice questions, and more to assist you in upgrading your cloud career. Subscribe to get them all!