fix(ingress): add service alias for CoreDNS compatibility
CoreDNS rewrites *.riotpiao.com → ingress-nginx-controller but bootstrap deployed as ingress-nginx-bootstrap-controller. Service alias makes both work.
This commit is contained in:
@@ -0,0 +1,22 @@
|
|||||||
|
# Service alias for CoreDNS compatibility
|
||||||
|
# CoreDNS rewrites *.riotpiao.com → ingress-nginx-controller.ingress-nginx.svc
|
||||||
|
# But bootstrap deployed as ingress-nginx-bootstrap-controller
|
||||||
|
# This alias makes both names work
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: ingress-nginx-controller
|
||||||
|
namespace: ingress-nginx
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: ingress-nginx
|
||||||
|
app.kubernetes.io/instance: ingress-nginx-bootstrap
|
||||||
|
app.kubernetes.io/component: controller
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 80
|
||||||
|
targetPort: http
|
||||||
|
- name: https
|
||||||
|
port: 443
|
||||||
|
targetPort: https
|
||||||
@@ -2,5 +2,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
|||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
# No top-level namespace - resources declare their own namespaces
|
# No top-level namespace - resources declare their own namespaces
|
||||||
resources:
|
resources:
|
||||||
- riotpiao-com-cert.yaml # Certificate for *.riotpiao.com (ingress-nginx namespace)
|
- ingress-nginx-controller-alias.yaml # Service alias for CoreDNS compatibility
|
||||||
- ingress.yaml # Ingress rules for all services (multiple namespaces)
|
- riotpiao-com-cert.yaml # Certificate for *.riotpiao.com (ingress-nginx namespace)
|
||||||
|
- ingress.yaml # Ingress rules for all services (multiple namespaces)
|
||||||
|
|||||||
Reference in New Issue
Block a user