adamant-kite-43734
10/30/2023, 1:28 PMsalmon-city-57654
10/31/2023, 2:25 AMhundreds-easter-25520
10/31/2023, 3:07 AMlocal.yaml
that downloads a cluster cert that has the Subject line of Subject: O = dynamiclistener-org, CN = dynamiclistener-ca@1698527436
and no SANs. When attempting to use the downloaded file as a kubeconfig I get
$ k get pod --kubeconfig ~/Downloads/local.yaml <aws:saas-development-admin>
I1030 22:06:37.965645 58405 versioner.go:58] Get "<https://harvester.domain.local/k8s/clusters/local/version?timeout=5s>": x509: certificate is not valid for any names, but wanted to match harvester.domain.local
E1030 22:06:38.072280 58405 memcache.go:265] couldn't get current server API group list: Get "<https://harvester.domain.local/k8s/clusters/local/api?timeout=32s>": tls: failed to verify certificate: x509: certificate is not valid for any names, but wanted to match harvester.domain.local
E1030 22:06:38.089072 58405 memcache.go:265] couldn't get current server API group list: Get "<https://harvester.domain.local/k8s/clusters/local/api?timeout=32s>": tls: failed to verify certificate: x509: certificate is not valid for any names, but wanted to match harvester.domain.local
E1030 22:06:38.106775 58405 memcache.go:265] couldn't get current server API group list: Get "<https://harvester.domain.local/k8s/clusters/local/api?timeout=32s>": tls: failed to verify certificate: x509: certificate is not valid for any names, but wanted to match harvester.domain.local
E1030 22:06:38.125057 58405 memcache.go:265] couldn't get current server API group list: Get "<https://harvester.domain.local/k8s/clusters/local/api?timeout=32s>": tls: failed to verify certificate: x509: certificate is not valid for any names, but wanted to match harvester.domain.local
E1030 22:06:38.141503 58405 memcache.go:265] couldn't get current server API group list: Get "<https://harvester.domain.local/k8s/clusters/local/api?timeout=32s>": tls: failed to verify certificate: x509: certificate is not valid for any names, but wanted to match harvester.domain.local
Unable to connect to the server: tls: failed to verify certificate: x509: certificate is not valid for any names, but wanted to match harvester.domain.local
hundreds-easter-25520
10/31/2023, 3:14 AMlocal.yaml
file and it’ll work, but that would be inconvenient for the automation, and has never been needed with any other cluster, harvester or otherwise.red-king-19196
10/31/2023, 6:56 AMssl-certificates
setting and provide any custom SSL certificate on the Harvester dashboard? The PEM format cert you saw in the local.yaml
is the CA. It does not contain the SAN extension. The SAN extension is in the certificate on the server side. You can grab it by the following command:
echo | openssl s_client -connect <vip-of-harvester-cluster>:443 -showcerts | openssl x509 -noout -text
So the downloaded local.yaml
seems fine. And I’m curious about the domain name in the log: harvester.domain.local
. Is it resolved to the VIP address? If yes, did you modify the value of the .clusters[0].cluster.server
field to the custom domain name in local.yaml
?hundreds-easter-25520
10/31/2023, 11:43 AMharvester.domain.local
is a made up domain, but yes, the real name resolves to the VIP address. I do not have a custom SSL cert on the dashboard.hundreds-easter-25520
10/31/2023, 11:43 AMred-king-19196
10/31/2023, 12:42 PMkubectl
will keep complaining that the domain name requested does not match any names in the certificate. The default certificate only has the VIP and other internal IP addresses in the SAN extension.
However, as a workaround, you can still provide the --insecure-skip-tls-verify=true
flag to kubectl
. Or instead, provide the --tls-server-name=<vip-of-harvester-cluster>
flag.red-king-19196
10/31/2023, 12:43 PMlocal.yaml
is not of interest due to automation concerns. I guess the latter one is not a good fit for you.hundreds-easter-25520
10/31/2023, 1:14 PMhundreds-easter-25520
10/31/2023, 1:14 PMred-king-19196
10/31/2023, 2:07 PMhundreds-easter-25520
10/31/2023, 2:08 PMs/1.2.0/1.2.1/
on the installation configuration file. I’ll report back on what I findhundreds-easter-25520
10/31/2023, 3:01 PMharvester.domain.local
in it, while the 1.2.0 copy has 192.168.10.202
red-king-19196
11/01/2023, 2:53 AMhundreds-easter-25520
11/01/2023, 2:54 AMhundreds-easter-25520
11/01/2023, 2:55 AMred-king-19196
11/01/2023, 2:57 AMred-king-19196
11/01/2023, 3:57 AMhundreds-easter-25520
11/01/2023, 3:59 AMred-king-19196
11/01/2023, 4:01 AMred-king-19196
11/01/2023, 4:01 AMhundreds-easter-25520
11/01/2023, 4:02 AMred-king-19196
11/01/2023, 4:04 AMvip
ConfigMap in the harvester-system
namespace? The downloaded kubeconfig is constructed using that as a source.hundreds-easter-25520
11/01/2023, 4:06 AMred-king-19196
11/01/2023, 4:07 AMhundreds-easter-25520
11/01/2023, 4:13 AMred-king-19196
11/01/2023, 8:39 AMapiVersion: v1
kind: Config
clusters:
- name: "local"
cluster:
server: "<https://10.84.132.32/k8s/clusters/local>"
certificate-authority-data: "<redacted>"
users:
- name: "local"
user:
token: "kubeconfig-user-7dxlrgmwgn:<redacted>"
contexts:
- name: "local"
context:
user: "local"
cluster: "local"
current-context: "local"
And the vip
ConfigMap:
apiVersion: v1
data:
enabled: "true"
hwAddress: <redacted>
ip: 10.84.132.32
loadBalancerIP: ""
mode: dhcp
serviceType: LoadBalancer
kind: ConfigMap
metadata:
annotations:
<http://meta.helm.sh/release-name|meta.helm.sh/release-name>: harvester
<http://meta.helm.sh/release-namespace|meta.helm.sh/release-namespace>: harvester-system
<http://objectset.rio.cattle.io/id|objectset.rio.cattle.io/id>: default-mcc-harvester-cattle-fleet-local-system
creationTimestamp: "2023-11-01T04:30:21Z"
labels:
<http://app.kubernetes.io/managed-by|app.kubernetes.io/managed-by>: Helm
<http://objectset.rio.cattle.io/hash|objectset.rio.cattle.io/hash>: e852fa897f5eae59a44b4bfe186aad80b10b94b3
name: vip
namespace: harvester-system
resourceVersion: "4401"
uid: 67873575-64ce-4af4-962a-acc6843279c6
hundreds-easter-25520
11/01/2023, 1:09 PMhundreds-easter-25520
11/01/2023, 1:12 PMvip
CM. The one thing I noticed at a glance is that you redacted your HW address, while I didn’t have one, it was just the empty string.hundreds-easter-25520
11/01/2023, 1:17 PMred-king-19196
11/02/2023, 8:01 AMred-king-19196
11/02/2023, 8:09 AMharvester.domain.local
, in your case resolved to the node IP or the cluster VIP?red-king-19196
11/02/2023, 8:13 AMred-king-19196
11/02/2023, 8:22 AMhundreds-easter-25520
11/02/2023, 1:17 PMharvester.domain.local
is the VIP, not the node. The VIP actually does have a PTR record. I’ll create the ticket later this morninghundreds-easter-25520
11/03/2023, 3:53 AMred-king-19196
11/03/2023, 3:58 AMred-king-19196
11/03/2023, 4:14 AM