Back to site

Case study · Open source

A Kubernetes controller for AWS Cloud Map

A custom controller that syncs headless Kubernetes Services to AWS Cloud Map and Route 53, with TTLs and audit logs.

Author · Personal project

EKS
Services → Cloud Map

The problem

Workloads split between ECS and Kubernetes need to find each other. Headless Services are not visible to Cloud Map out of the box.

Architecture

Before

  • Headless Service
  • Invisible outside the cluster

After

  • Headless Service
  • Controller
  • Cloud Map / Route 53

The cluster’s services become discoverable from AWS.

What I did

  1. 01

    Watch Services

    The controller watches headless Services in the cluster.

  2. 02

    Register in Cloud Map

    It syncs them into AWS Cloud Map and Route 53, applying TTLs.

  3. 03

    Keep a record

    Every change is written to an audit log.

Result

  • Service discovery between EKS and ECS workloads.
  • TTLs and audit logs on every record.

Stack

Kubernetes
AWS Cloud Map
Route 53
EKS
ECS
github.com/kioskOG/EKS-cloudmap-controller