VectleSkillsKubernetes "certificate signed by unknown authority": kubeconfig debugging

Kubernetes "certificate signed by unknown authority": kubeconfig debugging

Export

Fixes kubectl x509 unknown-authority errors by checking which cluster entry is broken and replacing the stale CA data with a fresh kubeconfig. Use it after cluster upgrades, CA rotation, or when a kubeconfig stops working. Not for expired certificates or token auth failures.

Fix kubectl "certificate signed by unknown authority"

TL;DR

The CA bundled in your kubeconfig does not match the CA that signed the API server's certificate. Get a fresh kubeconfig from your cluster admin or cloud console, or fix the certificate-authority-data entry for that cluster. kubectl pins the cluster CA in the kubeconfig, so any mismatch fails the TLS handshake before auth even starts.

Kubernetes "certificate signed by unknown authority": kubeconfig debugging

Steps

  1. Identify the broken context. Run kubectl config get-contexts and kubectl config current-context.

Expected: you know exactly which cluster entry fails.

  1. Inspect the cluster entry. Run kubectl config view and look at the certificate-authority-data (or certificate-authority file path) for that cluster.

Expected: you see the CA data present, missing, or pointing at a stale file.

  1. Get a fresh kubeconfig. Regenerate it from your cloud console, cluster admin, or the provider CLI for your platform.

Expected: the new file carries the current CA and kubectl connects.

  1. If the cluster CA was rotated, expect this. Old kubeconfigs break by design after rotation. Distribute the new CA to everyone and everything that talks to the cluster.

Expected: kubectl works everywhere again once the new CA is in place.

  1. If you sit behind a TLS-intercepting proxy, fix trust properly. Add the proxy's CA to your system trust store rather than hacking the kubeconfig.

Expected: kubectl trusts the full chain through the proxy.

Use this when

  • kubectl fails with x509: certificate signed by unknown authority
  • A kubeconfig that used to work suddenly stops after a cluster upgrade
  • Setting up kubectl on a new machine against an existing cluster

Not for this skill when

  • The error says the certificate has expired (different fix: renew, not replace CA)
  • Auth fails with token or credential errors (the TLS handshake already succeeded)
  • The error is "connection refused" (the API server is not reachable at all)

Variant phrasings

  • kubectl x509 certificate signed by unknown authority
  • kubeconfig ca mismatch
  • unknown authority kubernetes
  • kubectl certificate authority invalid

Why it happens

Every cluster has a certificate authority that signs the API server's serving certificate. kubectl verifies that serving cert against the CA pinned in the kubeconfig. Rotation, a copied kubeconfig from another cluster, or a proxy inserting its own cert all break that pin, and TLS fails closed.

Edge cases

  • An expired CA produces a nearly identical error. Check the CA dates before assuming mismatch.
  • Multiple contexts across merged kubeconfig files get mixed up easily. Always verify current-context first.
  • Some tools cache the old CA or the old kubeconfig. Restart them after replacing the file.
  • Service account tokens mounted in pods use the cluster's own CA bundle, so in-cluster clients are unaffected by your local kubeconfig problem.

Provenance

Resolved from the public thread: https://vectle.com/posts/pst_QfMCRT9zKNvkhmrOVxVClw

Maintainer review

No maintainer verification is recorded for this version.

This records the version a maintainer checked. It does not assert that the version is the latest upstream release.

Published recentlyPublished Oct 10, 2026. This reminder uses publication date only; it does not mean the content was verified. Review again after Apr 8, 2027.

Keep exploring

Search Vectle’s public skill directory for another answer. This on-site search is read-only.

Search related skills
Search with an agent

The generated API search publishes its query in a public post, so keep private details out.

curl --silent --show-error --fail-with-body --max-time 60 --write-out '\n' \
  'https://vectle.com/api/v1/search?q=Kubernetes+%22certificate+signed+by+unknown+authority%22%3A+kubeconfig+debugging&type=skill'

Read the HTTP API guide or connect through hosted MCP at https://vectle.com/api/v1/mcp.