mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2025-08-06 17:46:57 +02:00
docs: update public-private-route53 example for ingress-class filtering
This commit is contained in:
parent
15f27aafd3
commit
f76382a5ad
@ -213,7 +213,7 @@ spec:
|
|||||||
|
|
||||||
Consult [AWS ExternalDNS setup docs](aws.md) for installation guidelines.
|
Consult [AWS ExternalDNS setup docs](aws.md) for installation guidelines.
|
||||||
|
|
||||||
In ExternalDNS containers args, make sure to specify `annotation-filter` and `aws-zone-type`:
|
In ExternalDNS containers args, make sure to specify `aws-zone-type` and either `ingress-class` or `annotation-filter` (depending on whether your cluster makes use of `ingressClassName`):
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
apiVersion: apps/v1beta2
|
apiVersion: apps/v1beta2
|
||||||
@ -241,7 +241,9 @@ spec:
|
|||||||
- --provider=aws
|
- --provider=aws
|
||||||
- --registry=txt
|
- --registry=txt
|
||||||
- --txt-owner-id=external-dns
|
- --txt-owner-id=external-dns
|
||||||
- --annotation-filter=kubernetes.io/ingress.class in (external-ingress)
|
- --ingress-class=external-ingress
|
||||||
|
# ... or, if you use annotations for ingress classes
|
||||||
|
# - --annotation-filter=kubernetes.io/ingress.class in (external-ingress)
|
||||||
- --aws-zone-type=public
|
- --aws-zone-type=public
|
||||||
image: k8s.gcr.io/external-dns/external-dns:v0.7.6
|
image: k8s.gcr.io/external-dns/external-dns:v0.7.6
|
||||||
name: external-dns-public
|
name: external-dns-public
|
||||||
@ -251,7 +253,7 @@ spec:
|
|||||||
|
|
||||||
Consult [AWS ExternalDNS setup docs](aws.md) for installation guidelines.
|
Consult [AWS ExternalDNS setup docs](aws.md) for installation guidelines.
|
||||||
|
|
||||||
In ExternalDNS containers args, make sure to specify `annotation-filter` and `aws-zone-type`:
|
In ExternalDNS containers args, make sure to specify `aws-zone-type` and either `ingress-class` or `annotation-filter` (depending on whether your cluster makes use of `ingressClassName`):
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
apiVersion: apps/v1beta2
|
apiVersion: apps/v1beta2
|
||||||
@ -279,7 +281,9 @@ spec:
|
|||||||
- --provider=aws
|
- --provider=aws
|
||||||
- --registry=txt
|
- --registry=txt
|
||||||
- --txt-owner-id=dev.k8s.nexus
|
- --txt-owner-id=dev.k8s.nexus
|
||||||
- --annotation-filter=kubernetes.io/ingress.class in (internal-ingress)
|
- --ingress-class=internal-ingress
|
||||||
|
# ... or, if you use annotations for ingress classes
|
||||||
|
# - --annotation-filter=kubernetes.io/ingress.class in (internal-ingress)
|
||||||
- --aws-zone-type=private
|
- --aws-zone-type=private
|
||||||
image: k8s.gcr.io/external-dns/external-dns:v0.7.6
|
image: k8s.gcr.io/external-dns/external-dns:v0.7.6
|
||||||
name: external-dns-private
|
name: external-dns-private
|
||||||
@ -287,20 +291,23 @@ spec:
|
|||||||
|
|
||||||
## Create application Service definitions
|
## Create application Service definitions
|
||||||
|
|
||||||
For this setup to work, you've to create two Service definitions for your application.
|
For this setup to work, you need to create two Ingress definitions for your application.
|
||||||
|
|
||||||
At first, create public Service definition:
|
At first, create public Ingress definition (make sure to un-comment either the `annotations` or `ingressClassName` lines):
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
apiVersion: networking.k8s.io/v1
|
apiVersion: networking.k8s.io/v1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
annotations:
|
# uncomment if you use annotations for ingress classes
|
||||||
kubernetes.io/ingress.class: "external-ingress"
|
# annotations:
|
||||||
|
# kubernetes.io/ingress.class: "external-ingress"
|
||||||
labels:
|
labels:
|
||||||
app: app
|
app: app
|
||||||
name: app-public
|
name: app-public
|
||||||
spec:
|
spec:
|
||||||
|
# uncomment if you use ingressClassName
|
||||||
|
# ingressClassName: external-ingress
|
||||||
rules:
|
rules:
|
||||||
- host: app.domain.com
|
- host: app.domain.com
|
||||||
http:
|
http:
|
||||||
@ -310,18 +317,21 @@ spec:
|
|||||||
servicePort: 80
|
servicePort: 80
|
||||||
```
|
```
|
||||||
|
|
||||||
Then create private Service definition:
|
Then create private Ingress definition (again, make sure to un-comment either the `annotations` or `ingressClassName` lines):
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
apiVersion: networking.k8s.io/v1
|
apiVersion: networking.k8s.io/v1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
annotations:
|
# uncomment if you use annotations for ingress classes
|
||||||
kubernetes.io/ingress.class: "internal-ingress"
|
# annotations:
|
||||||
|
# kubernetes.io/ingress.class: "internal-ingress"
|
||||||
labels:
|
labels:
|
||||||
app: app
|
app: app
|
||||||
name: app-private
|
name: app-private
|
||||||
spec:
|
spec:
|
||||||
|
# uncomment if you use ingressClassName
|
||||||
|
# ingressClassName: internal-ingress
|
||||||
rules:
|
rules:
|
||||||
- host: app.domain.com
|
- host: app.domain.com
|
||||||
http:
|
http:
|
||||||
|
Loading…
Reference in New Issue
Block a user