Skip to content

Infrastructure as Code on AWS using Crossplane and Kubernetes (Minikube). Provisions S3, VPC, and EKS with IAM and OIDC integration using declarative YAML.

Notifications You must be signed in to change notification settings

Bisharsh/crossplane

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AWS Infrastructure Provisioning with Crossplane and Kubernetes

This project provisions a complete AWS infrastructure stack β€” including an S3 bucket, VPC, and EKS cluster β€” using Crossplane from within a local Kubernetes cluster running on Minikube.

πŸ“Œ Features

  • Local Kubernetes setup via Minikube
  • Crossplane installed using Helm
  • AWS S3 bucket with versioning enabled
  • VPC with:
    • Public and private subnets in multiple AZs
    • NAT Gateway + Internet Gateway
    • Elastic IPs and custom route tables
  • EKS Cluster provisioned via Crossplane’s AWS provider
  • IAM roles and OIDC setup for secure Kubernetes-to-AWS integration

πŸ“¦ Tech Stack

  • Kubernetes (Minikube)
  • Crossplane
  • Helm
  • AWS (VPC, EKS, IAM, S3)
  • YAML (K8s manifests)

πŸ›  Folder Structure

.
β”œβ”€β”€ aws-credentials.txt
β”œβ”€β”€ crossplane
β”‚   β”œβ”€β”€ provider-aws-config.yaml
β”‚   β”œβ”€β”€ provider-aws-ec2.yaml
β”‚   β”œβ”€β”€ provider-aws-eks.yaml
β”‚   β”œβ”€β”€ provider-aws-iam.yaml
β”‚   └── provider-aws-s3.yaml
β”œβ”€β”€ eks
β”‚   β”œβ”€β”€ eks-iam-role.yaml
β”‚   β”œβ”€β”€ eks.yaml
β”‚   β”œβ”€β”€ nodes-iam.yaml
β”‚   └── nodes.yaml
β”œβ”€β”€ readme.MD
β”œβ”€β”€ s3
β”‚   β”œβ”€β”€ bucket-versioning.yaml
β”‚   └── my-bucket.yaml
└── vpc
    β”œβ”€β”€ igw.yaml
    β”œβ”€β”€ nat.yaml
    β”œβ”€β”€ routes.yaml
    β”œβ”€β”€ subnets.yaml
    └── vpc.yaml

πŸš€ Getting Started

  1. Set up Minikube and Helm
  2. Clone this repository
  3. Configure AWS credentials as a Kubernetes Secret
  4. Apply the manifests in order using kubectl apply -f

Note: This setup is designed for learning/demo purposes and uses hardcoded values. For production, consider using Crossplane Compositions and Kustomize.

🧠 Learnings

This project helped me:

  • Understand Kubernetes-native Infrastructure as Code
  • Work with Crossplane’s reconciliation model
  • Explore AWS resource provisioning without leaving K8s

πŸ“Ž References


πŸ’¬ Feedback

Feel free to open issues or connect if you're working on something similar!

About

Infrastructure as Code on AWS using Crossplane and Kubernetes (Minikube). Provisions S3, VPC, and EKS with IAM and OIDC integration using declarative YAML.

Resources

Stars

Watchers

Forks