Giter VIP home page Giter VIP logo

k8s-route53's Introduction

k8s-route53

Tags

Current
  • latest, 1, 1.0, 1.0.2
Previous
  • 1.0.1
  • 1.0.0

Creates an Amazon Route53 DNS entry for a Kubernetes service which uses an AWS load balancer.

When using services in kubernetes with AWS load balancers, the load balancer DNS name is unfriendly. This image is designed to be run as a job in kubernetes and will create an AWS Route53 record for the FQDN you specify, which points to the AWS ELB for the kubernetes service you specify.

IMPORTANT: This uses the AWS CLI to look up the available hosted zones in Route53 and matches the domain against the FQDN you provide. If you provide an FQDN and don't have a matching zone in Route53 with that domain then the job will fail.

AWS credentials

As the image uses the AWS CLI your kubernetes worker instances must either have an IAM role associated with them or credentials will need to be provided to the container. The following rules are needed:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "elasticloadbalancing:DescribeLoadBalancers",
        "route53:ListHostedZones",
        "route53:ChangeResourceRecordSets"
      ],
      "Resource": [
        "*"
      ]
    }
  ]
}

Example kubernetes definition

apiVersion: batch/v1
kind: Job
metadata:
  name: kubernetes-dashboard-dns
spec:
  completions: 1
  template:
    metadata:
      name: kubernetes-dashboard-dns
    spec:
      restartPolicy: Never
      containers:
      - name: kubernetes-dashboard-dns
        image: antonosmond/k8s-route53:latest
        env:
        - name: SERVICE_NAME
          value: kubernetes-dashboard          
        - name: SERVICE_NAMESPACE # optional - defaults to 'default'
          value: kube-system
        - name: FQDN
          value: kubernetes-dashboard.example.com
        - name: EVALUATE_TARGET_HEALTH # optional - defaults to 'true'
          value: "true"

The result from the example above would be a Route53 alias record with the FQDN kubernetes-dashboard.example.com which points to the AWS load balancer for the kubernetes service named kubernetes-dashboard.

k8s-route53's People

Contributors

antonosmond avatar ltamaster avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.