Linkerd2: Go 1.15: Running linkerd on 1.19 results in Certificate error

Created on 27 Aug 2020  ยท  6Comments  ยท  Source: linkerd/linkerd2

Bug Report

What is the issue?

Running linkerd tap on kubernetes 1.19 throws this error.

unexpected API response: error trying to reach service: x509: certificate relies on legacy Common Name field, use SANs or temporarily enable Common Name matching with GODEBUG=x509ignoreCN=0

Using the dashboard > Live Calls also shows the error.

How can it be reproduced?

Install linkerd on Kubernetes 1.19

Logs, error output, etc

unexpected API response: error trying to reach service: x509: certificate relies on legacy Common Name field, use SANs or temporarily enable Common Name matching with GODEBUG=x509ignoreCN=0

linkerd check output

kubernetes-api
--------------
โˆš can initialize the client
โˆš can query the Kubernetes API

kubernetes-version
------------------
โˆš is running the minimum Kubernetes API version
โˆš is running the minimum kubectl version

linkerd-existence
-----------------
โˆš 'linkerd-config' config map exists
โˆš heartbeat ServiceAccount exist
โˆš control plane replica sets are ready
โˆš no unschedulable pods
โˆš controller pod is running
โˆš can initialize the client
โˆš can query the control plane API

linkerd-config
--------------
โˆš control plane Namespace exists
โˆš control plane ClusterRoles exist
โˆš control plane ClusterRoleBindings exist
โˆš control plane ServiceAccounts exist
โˆš control plane CustomResourceDefinitions exist
โˆš control plane MutatingWebhookConfigurations exist
โˆš control plane ValidatingWebhookConfigurations exist
โˆš control plane PodSecurityPolicies exist

linkerd-identity
----------------
โˆš certificate config is valid
โˆš trust anchors are using supported crypto algorithm
โˆš trust anchors are within their validity period
โˆš trust anchors are valid for at least 60 days
โˆš issuer cert is using supported crypto algorithm
โˆš issuer cert is within its validity period
โˆš issuer cert is valid for at least 60 days
โˆš issuer cert is issued by the trust anchor

linkerd-identity-data-plane
---------------------------
โˆš data plane proxies certificate match CA

linkerd-api
-----------
โˆš control plane pods are ready
โˆš control plane self-check
โˆš [kubernetes] control plane can talk to Kubernetes
โˆš [prometheus] control plane can talk to Prometheus
โˆš tap api service is running

linkerd-version
---------------
โˆš can determine the latest version
โ€ผ cli is up-to-date
    is running version 2.8.0 but the latest stable version is 2.8.1
    see https://linkerd.io/checks/#l5d-version-cli for hints

linkerd-data-plane
------------------
โˆš data plane namespace exists
โˆš data plane proxies are ready
โˆš data plane proxy metrics are present in Prometheus
โ€ผ data plane is up-to-date
    Some data plane pods are not running the current version:
    * linkerd/linkerd-destination-767bcfbf4-xxqxq (stable-2.8.0)
    * linkerd/linkerd-prometheus-6699dfbc44-tcq9j (stable-2.8.0)
    * linkerd/linkerd-sp-validator-d5fc9845c-ggknv (stable-2.8.0)
    * linkerd/linkerd-tap-6b9dc77844-4kpz5 (stable-2.8.0)
    * linkerd/linkerd-identity-8585d57c49-fqzmm (stable-2.8.0)
    * linkerd/linkerd-controller-5d6bbdb8b5-4j4d9 (stable-2.8.0)
    * linkerd/linkerd-web-67db674d86-lmd4l (stable-2.8.0)
    * linkerd/linkerd-proxy-injector-9bd885986-d67wj (stable-2.8.0)
    * linkerd/linkerd-grafana-84d56f5794-btq4t (stable-2.8.0)
    see https://linkerd.io/checks/#l5d-data-plane-version for hints
โˆš data plane and cli versions match

linkerd-addons
--------------
โˆš 'linkerd-config-addons' config map exists

linkerd-grafana
---------------
โˆš grafana add-on service account exists
โˆš grafana add-on config map exists
โˆš grafana pod is running

Status check results are โˆš

Environment

  • Kubernetes Version: 1.19
  • Cluster Environment: MicroK8s
  • Host OS: Ubuntu 20.04
  • Linkerd version: 2.8.0
arecontroller

Most helpful comment

@balchua It should land in 2.9, which is planned for early October!

All 6 comments

Working on this currently. Looks like it was because K8s updated its go version to 1.15 (i.e latest) which changed how it reads certificates https://github.com/golang/go/issues/39568#issuecomment-671424481

It looks http://masterminds.github.io/sprig/crypto.html references a new function, genSelfSignedCert can replace genCA to support alternateDNS names

4919 address this issue, and it makes tap, etc work on kubernetes 1.19

But if we updated our linkerd2 repo, and images to use go 1.15, the identity component fails to startup as the trustanchorCerts we generate in the CLI, don't set alternateDNS names and hence the identity component fails to startup with the same error above.
Updating the binary to generate certs with alternateDNS fields should be the solution there, and should be a separate PR I guess.

I've tested the latest edge 20.9.1 all good. I am just wondering if this is also coming to 2.8?
Thanks

@balchua It should land in 2.9, which is planned for early October!

Ok thanks.

Was this page helpful?
0 / 5 - 0 ratings