Private DNS + private topology on AWS: problems regarding the certificate #2032
Closed
Description
Hi there,
I created a new cluster on AWS:
- setting it to use a private zone on Route 53
- setting it to belong to a private subnet (
--topology private
)
As I'm using a private zone on Route 53, my laptop cannot resolve the server name (https://api.cluster.k8s) set on kubecfg.
apiVersion: v1
clusters:
- cluster:
certificate-authority-data: *****
server: https://api.cluster.k8s
[...]
Looking at Route 53 I noticed that https://api.cluster.k8s
is a alias to the load balancer api-cluster-k8s-177050000.us-east-1.elb.amazonaws.com
. Therefore I changed kubecfg to use this load balancer endpoint instead of the server name. When I do this change, whenever I run kubectl
I get an error regarding the certificate:
Unable to connect to the server: x509: certificate is valid for api.internal.cluster.k8s, api.cluster.k8s, kubernetes, kubernetes.default, kubernetes.default.svc, kubernetes.default.svc.cluster.local, not api-cluster-k8s-177050000.us-east-1.elb.amazonaws.com
So I need to use insecure-skip-tls-verify=true
to get it working.
Do you guys know how to overcome this issue? Is it possible to tell kops to generate the certificate without constraining domains, for instance?
Thanks in advance!