Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terraform layer for a simple kubernetes cluster deployment #557

Open
borland667 opened this issue Feb 29, 2024 · 0 comments
Open

Terraform layer for a simple kubernetes cluster deployment #557

borland667 opened this issue Feb 29, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@borland667
Copy link
Contributor

Describe the Feature

We propose the introduction of a new Terraform layer designed to deploy a single-node Kubernetes cluster. This setup will leverage an AWS EC2 instance for the Kubernetes node, coupled with a local provisioner for managing persistent volumes. The aim is to provide a streamlined, efficient Kubernetes environment suitable for smaller-scale applications, development, or testing purposes.

Expected Behavior

Upon implementation, this Terraform layer will:

  • Automatically provision an EC2 instance configured as a Kubernetes node.
  • Install and configure all necessary Kubernetes components on the EC2 instance.
  • Set up a local provisioner on the node for persistent volume management.
  • Optionally allocate an AWS Elastic IP (EIP) to the EC2 instance, ensuring a stable public IP address.
  • Configure DNS entries for easy access to services deployed within the Kubernetes cluster, specifically including a DNS entry for the Kubernetes API server to facilitate secure and straightforward cluster management.
  • Ensure the Kubernetes environment is fully operational for application deployment, with accessible control and management interfaces.

Use Case

This feature is particularly useful in scenarios where the overhead of a full-scale EKS cluster is not justified, including:

  • Development and testing environments needing rapid provisioning and deprovisioning.
  • Small-scale production deployments where simplicity and cost-effectiveness are key.
  • Experimental projects requiring minimal Kubernetes infrastructure.

Describe Ideal Solution

The Terraform configuration should:

  • Provision an EC2 instance optimized for the intended workload, considering CPU, memory, and networking requirements.
  • Automate the Kubernetes setup process on the EC2 instance, ensuring ease of access and use.
  • Include an option to allocate an Elastic IP to the instance for a stable, public IP address.
  • Facilitate the configuration of DNS entries, specifically including a dedicated DNS entry for the Kubernetes API server, enabling secure and convenient access for management and automation tools.
  • Include comprehensive documentation on cluster management, application deployment, volume management, DNS configuration, and Kubernetes API access.
  • Offer scalability and upgrade paths to eks while maintaining the simplicity of the initial setup.

Alternatives Considered

Utilization of EKS for all Kubernetes needs, which may not be cost-effective or necessary for smaller projects.

  • Adoption of lightweight Kubernetes distributions (like k3s or Minikube), which might lack the desired level of AWS integration or control.

Additional Context

This proposal arises from the need to optimize for both operational efficiency and cost, targeting use cases where a full EKS deployment is not needed. Emphasis is placed on providing a viable, simplified Kubernetes solution that aligns with security best practices and operational requirements.

@borland667 borland667 added the enhancement New feature or request label Feb 29, 2024
@borland667 borland667 changed the title Terraform Layer for Single-Node Kubernetes Cluster with EC2 and Local Volume Provisioning Terraform layer for a simple kubernetes cluster deployment Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant