Skip to content

leaf tls cert does not work on rustls #1767

@goenning

Description

@goenning

Current and expected behavior

I have a k8s cluster using a Let's Encrypt cert, and when connecting to it via kube-rs it does not with the leaf tls cert.

kube-rs + fullchain cert = OK
kube-rs + intermediate cert = OK
kube-rs + leaf cert = NOK

Error: ServiceError: client error (Connect)

Caused by:
    0: client error (Connect)
    1: invalid peer certificate: UnknownIssuer

kubectl + fullchain cert = OK
kubectl + intermediate cert = OK
kubectl + leaf cert = OK

Possible solution

I'm not sure where the issue is, I'm opening this issue hoping someone will have an idea what could be the issue

Additional context

related aptakube/aptakube#445

Environment

Client Version: v1.28.2
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.29.0

Configuration and features

I was able to replicate this using the HEAD + cargo run --example kubectl -- get nodes

Affected crates

kube-client

Would you like to work on fixing this bug?

yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingclientkube Client relatedrustlsrustls-tls related

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions