mirror of https://github.com/kubernetes/kops.git
Merge pull request #1864 from itskingori/route53_dns_mapper_addon
Add Route53 Mapper Addon
This commit is contained in:
commit
cfc69b6ec2
|
|
@ -0,0 +1,64 @@
|
||||||
|
# Route53 Mapping Service
|
||||||
|
|
||||||
|
This is a Kubernetes service that polls services (in all namespaces) that are
|
||||||
|
configured with the label `dns=route53` and adds the appropriate alias to the
|
||||||
|
domain specified by the annotation `domainName=sub.mydomain.io`. Multiple
|
||||||
|
domains and top level domains are also supported:
|
||||||
|
`domainName=.mydomain.io,sub1.mydomain.io,sub2.mydomain.io`.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
### Deploy To Cluster
|
||||||
|
|
||||||
|
```
|
||||||
|
# Version 1.2.0
|
||||||
|
# https://github.com/wearemolecule/route53-kubernetes/tree/v1.2.0
|
||||||
|
$ kubectl apply -f https://raw.githubusercontent.com/kubernetes/kops/master/addons/monitoring-standalone/v1.2.0.yaml
|
||||||
|
```
|
||||||
|
|
||||||
|
### Service Configuration
|
||||||
|
|
||||||
|
Add the `dns: route53` label and your target DNS entry in a `domainName`
|
||||||
|
annotation. Example below:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: my-awesome-app
|
||||||
|
labels:
|
||||||
|
app: my-awesome-app
|
||||||
|
dns: route53
|
||||||
|
annotations:
|
||||||
|
domainName: "test.mydomain.tld"
|
||||||
|
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: |-
|
||||||
|
arn:aws:acm:us-east-1:659153740712:certificate/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
|
||||||
|
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http
|
||||||
|
service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "443"
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: my-awesome-app
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 80
|
||||||
|
protocol: TCP
|
||||||
|
- name: https
|
||||||
|
port: 443
|
||||||
|
protocol: TCP
|
||||||
|
type: LoadBalancer
|
||||||
|
```
|
||||||
|
|
||||||
|
An `A` record for `test.mydomain.tld` will be created as an alias to the ELB
|
||||||
|
that is configured by Kuberntes (see `service.beta.kubernetes.io/aws-load-
|
||||||
|
balancer` annotations). This assumes that a hosted zone exists in Route53 for
|
||||||
|
`mydomain.tld`. Any record that previously existed for that dns record will be
|
||||||
|
updated.
|
||||||
|
|
||||||
|
### Caveats
|
||||||
|
|
||||||
|
[Molecule Software][1] **DON'T currently sign their docker images**. So, please
|
||||||
|
use their images at your own risk.
|
||||||
|
|
||||||
|
[1]: https://github.com/wearemolecule
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
kind: Addons
|
||||||
|
metadata:
|
||||||
|
name: route53-mapper
|
||||||
|
spec:
|
||||||
|
addons:
|
||||||
|
- version: 1.2.0
|
||||||
|
selector:
|
||||||
|
k8s-addon: route53-mapper.addons.k8s.io
|
||||||
|
manifest: v1.2.0.yaml
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
---
|
||||||
|
apiVersion: extensions/v1beta1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: route53-mapper
|
||||||
|
namespace: kube-system
|
||||||
|
labels:
|
||||||
|
app: route53-mapper
|
||||||
|
k8s-addon: route53-mapper.addons.k8s.io
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: route53-mapper
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: route53-mapper
|
||||||
|
annotations:
|
||||||
|
scheduler.alpha.kubernetes.io/tolerations: '[{"key":"dedicated", "value":"master"}]'
|
||||||
|
spec:
|
||||||
|
nodeSelector:
|
||||||
|
kubernetes.io/role: master
|
||||||
|
containers:
|
||||||
|
- image: quay.io/molecule/route53-kubernetes:v1.2.0
|
||||||
|
name: route53-mapper
|
||||||
|
|
@ -35,3 +35,12 @@ Install using:
|
||||||
```
|
```
|
||||||
kubectl create -f https://raw.githubusercontent.com/kubernetes/kops/master/addons/monitoring-standalone/v1.2.0.yaml
|
kubectl create -f https://raw.githubusercontent.com/kubernetes/kops/master/addons/monitoring-standalone/v1.2.0.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Route53 Mapper
|
||||||
|
|
||||||
|
Automates creation and updating of entries on Route53 with `A` records pointing
|
||||||
|
to ELB-backed `LoadBalancer` services created by Kubernetes. Install using:
|
||||||
|
|
||||||
|
```
|
||||||
|
kubectl apply -f https://raw.githubusercontent.com/kubernetes/kops/master/addons/monitoring-standalone/v1.2.0.yaml
|
||||||
|
```
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue