NOTE: Use a load balancer instead.
A lightweight daemon used to update Route53 records with the IP addresses of your ingress services, as well as perform health checks on desired hosts.
- Configure
ingressd
with list of Route53 host records. - Query EC2 for nodes with a specific tag, and return their public IP addresses.
- Make several health checks against each ingress service IP address with specific host header (
curl -H "Host: example.com" http://192.168.0.1
). - Update Route53 records with IP addresses that have passed all health checks.
As ingressd
is currently configured to use AWS Instance Roles, the host will need to have a role with at least AmazonEC2ReadOnlyAccess
and a Route53 policy with the following actions:ChangeResourceRecordSets
, ListResourceRecordSets
, ListHostedZones
.
The service can be configured by setting the following environment variables:
Name | Type | Description |
---|---|---|
AWS_EC2_TAG |
string | key:value of EC2 tag to query for instances |
AWS_REGION |
string | AWS region of EC2 instances to query |
AWS_ROUTE53_RECORDS |
string slice | Comma separated list of Route53 records to be updated |
POLL_INTERVAL |
string | Poll interval for Route53 updates |
PORT |
int | Port to bnd the local HTTP server to |
A simple single container Pod spec:
apiVersion: v1
kind: Pod
metadata:
name: ingressd
labels:
app.kubernetes.io/name: ingressd
spec:
securityContext:
runAsUser: 2000
runAsGroup: 2000
fsGroup: 2000
containers:
- name: ingressd
image: quay.io/syscll/ingressd:v0.1.0
command:
- ingressd
livenessProbe:
httpGet:
path: /healthz
port: 8081
initialDelaySeconds: 5
periodSeconds: 3
ports:
- containerPort: 8081
env:
- name: AWS_EC2_TAG
value: "Name:haproxy"
- name: AWS_REGION
value: "eu-west-1"
- name: AWS_ROUTE53_RECORDS
value: "syscll.org,ingress.syscll.org,haproxy.syscll.org"
- name: POLL_INTERVAL
value: "10s"
- Allow host health check configuration