Using fabric8 kubernetes client, I received a different certificate than with curl on the same endpoint.
Specifically, I received the ingress self-signed certificate (CN=Kubernetes Ingress Controller Fake Certificate) instead of the specified one.
Ingress configuration (result of kubectl edit ingress
)
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
creationTimestamp: "2020-08-07T09:33:18Z"
generation: 1
labels:
app: dummy
app.kubernetes.io/component: dummy-component
app.kubernetes.io/instance: dummy-instance
app.kubernetes.io/managed-by: Dummy
app.kubernetes.io/name: dummy
app.kubernetes.io/part-of: dummy-sample
app.kubernetes.io/version: 1.12.0-SNAPSHOT
managedFields:
- apiVersion: extensions/v1beta1
fieldsType: FieldsV1
fieldsV1:
f:metadata:
f:labels:
.: {}
f:app: {}
f:app.kubernetes.io/component: {}
f:app.kubernetes.io/instance: {}
f:app.kubernetes.io/managed-by: {}
f:app.kubernetes.io/name: {}
f:app.kubernetes.io/part-of: {}
f:app.kubernetes.io/version: {}
f:spec:
f:rules: {}
f:tls: {}
manager: okhttp
operation: Update
time: "2020-08-07T09:33:18Z"
- apiVersion: networking.k8s.io/v1beta1
fieldsType: FieldsV1
fieldsV1:
f:status:
f:loadBalancer:
f:ingress: {}
manager: nginx-ingress-controller
operation: Update
time: "2020-08-07T09:33:19Z"
name: dummy-instance
namespace: dummy-namespace
resourceVersion: "1887"
selfLink: /apis/extensions/v1beta1/namespaces/dummy-namespace/ingresses/dummy-instance
uid: 2b7839fa-da65-45f3-9f1f-8169cf1325d8
spec:
rules:
- host: minikube
http:
paths:
- backend:
serviceName: dummy-instance
servicePort: 9999
path: /dummy-instance
pathType: ImplementationSpecific
tls:
- hosts:
- minikube
secretName: minikube-tls-3
status:
loadBalancer:
ingress:
- ip: 172.17.0.3
I cannot see a reason where the Ingress would return a different certificate for the same host, on the same endpoint, with a different client.
My only guess was that the certificate contain in the secret was not compatible (or was having a lower priority on the cipher?) with the fabric8 ClientHello (okhttp3 here), but it's not the case.
I'm running out of debugging idea, so if you have a guess on that, it would be welcome!
Client doesn't send the SNI extension on the ClientHello.