'How to redirect traffic between subdomains if one doesn't have a valid certificate?
I had an issue with a Kubernetes cluster that made the letsecrypt reach the certificate limit for a week in one of our subdomains. I created a temporary new subdomain for the service but I would like to redirect the traffic to avoid changing the URL in all other services.
Basically I would like that whenever accessing staging.domain.com (the one that is not working), traffic would be redirected to something like staging2.domain.com. Is this possible with ingress or do I need a valid certificate for both domains?
spec:
rules:
- host: staging.domain.com
http:
paths:
- backend:
service:
name: staging-service
port:
number: 80
path: /*
pathType: ImplementationSpecific
- host: staging2.domain.com
http:
paths:
- backend:
service:
name: staging-service
port:
number: 80
path: /
pathType: ImplementationSpecific
tls:
- hosts:
- staging2.domain.com
secretName: letsencrypt-staging-service
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
