digitalocean / digitalocean/DOKS
Connection to load balancer HTTPS port from within cluster does not terminate TLS
- Dominant language
- No language data
- Stars
- 86
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
When a pod within the cluster connects to a load balancer HTTPS port that is configured to perform TLS termination (i.e. has a certificate configured), TLS is not terminated and the connection is forwarded to the pod HTTP port as-is. This causes traffic from within the cluster to fail.
The Service definition:
```
kind: Service
apiVersion: v1
metadata:
name: traefik
annotations:
service.beta.kubernetes.io/do-loadbalancer-protocol: http
service.beta.kubernetes.io/do-loadbalancer-tls-ports: "443"
service.beta.kubernetes.io/do-loadbalancer-certificate-id: XXX
spec:
type: LoadBalancer
selector:
app: traefik
ports:
- name: http
port: 80
- name: https
port: 443
targetPort: 80
```
(See also the [https-with-cert-nginx.yml](https://github.com/digitalocean/digitalocean-cloud-controller-manager/blob/45ca8cba9ab3aa0e54a667b77fd5da5c2bbd0fac/docs/controllers/services/examples/https-with-cert-nginx.yml) example.)
Connection flow:
External -> LB proto HTTPS port 443 -> Service proto HTTP port 443 -> Pod proto HTTP port 80
Internal -> LB proto HTTPS port 443 -> Service proto HTTPS port 443 -> Pod proto HTTPS port 80
(For DigitalOcean engineers, I posted debugging information in support ticket 3402891.)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.