Appearance

PKI, kubeadm, and safe upgrades

Trace certificate trust in the control plane and plan an upgrade through supported intermediate states.

What you will understand

  • Distinguish the service identity that a client verifies from the credentials used to authenticate the client.
  • Locate certificate expiration and verify that processes use renewed certificates.
  • Build an upgrade plan that checks version skew, add-on support, and health.

Builds on: Finalizers, garbage collection, and API evolution, HA, etcd quorum, and failure domains

Which identity each TLS connection verifies

Your kubeconfig points to the cluster API, but the client refuses the TLS connection. Before examining RBAC, ask whose identity failed to verify. A server certificate lets the client confirm it reached the expected endpoint and that the certificate chains to a trusted authority. Its subject alternative names must include the hostname or IP the client uses. The API server separately authenticates the caller, which can present a client certificate, a token, or another supported credential. Control-plane components and etcd have additional connections with their own trust and credentials.

Public key infrastructure (PKI) is how a cluster issues, trusts, and renews those certificates and protects their private keys. In the scene, distinguish the API serving identity, the client used for authentication, and an internal connection to another component.

Which identity is each connection verifying?

A client verifies the server certificate. The server then authenticates the caller. Internal component connections may use their own trust material.

  1. Verify the API server identity

    A client checks trust, validity and the endpoint identity on the serving certificate.

  2. Authenticate the requesting client

    The API validates the client credential independently from client-side server verification.

  3. Inspect internal certificates separately

    • kubectl / kubeletTrusts API serving CA
    • API serving certificateEndpoint SAN + valid dates
    • Client authenticationValidate client credential
    • etcd TLS identitySeparate trust path
    • Signing / encryption keysSeparate recovery assets

    etcd credentials, service-account signing keys and encryption keys have their own purposes and recovery needs.

The diagram groups several PKI directions; exact files and renewal responsibilities depend on cluster ownership.

Explore another case

Renew certificates and verify the served certificate

On a kubeadm-managed node, kubeadm certs check-expiration can help inspect locally managed credential lifetimes. The owner of an externally managed certificate follows its own renewal process. A certificate file can be renewed while a running process still has the previous certificate loaded. Identify how each component reloads credentials and confirm it presents or uses the renewed certificate afterwards. Keep private keys and kubeconfigs out of ConfigMaps, logs, and shared source directories.

apiVersion: v1
kind: ConfigMap
metadata:
  name: m18-maintenance
  namespace: kv-lab
  labels:
    lab: m18
data:
  approach: sequential-supported-minor-upgrades
  verify: api-readiness-workload-health-addon-compatibility
  credentialRule: never-store-private-keys-here

Check every stage of an upgrade

A cluster upgrade temporarily runs components at different versions. The version skew policy defines supported differences, and kubeadm and other distributions can impose further ordering constraints. Plan one supported minor upgrade at a time according to your tool’s guidance. Make an inventory of API servers, kubelets, kubectl, and add-ons. Check CNI, CSI, admissions, and controllers for compatibility. On a multi-control-plane cluster, verify that the intermediate versions of API servers behind the load balancer are also supported.

What should be healthy before the next upgrade step?

Check the supported version combinations at each stage, upgrade in the required order, and use health checks before moving on.

  1. Inventory component and add-on versions

    Record exact versions, removed APIs and add-on compatibility; verify usable backups.

  2. Plan the supported intermediate versions

    Use the documented supported minor-version sequence and inspect skew at each intermediate state.

  3. Verify workload and control-plane health

    Verify API readiness, critical controllers and workload behavior before continuing worker maintenance.

No specific live-cluster upgrade command is prescribed; kind, kubeadm and managed providers have different lifecycle procedures.

kubectl --context kind-kv-lab version
kubectl --context kind-kv-lab get nodes -o custom-columns=NAME:.metadata.name,KUBELET:.status.nodeInfo.kubeletVersion
kubectl --context kind-kv-lab get --raw='/readyz?verbose'
# Host-side commands below are read-only checks on a kubeadm-managed node.
# They are not instructions to upgrade the kind node image in place.
# sudo kubeadm certs check-expiration
# sudo kubeadm upgrade plan

The control-plane recovery lab provides read-only checks on the local environment. Practice by writing down a current version, next intermediate state, and health checks. Running kubeadm upgrade plan belongs on an appropriate kubeadm-managed node. Upgrading a kind teaching cluster in place is outside that exercise.

Plan recovery before changing versions

An upgrade can affect storage formats, removed APIs, and add-on behavior. A viable recovery may require restoring a backup rather than installing old binaries. Verify API readiness, node readiness, and representative workload requests after each stage, and establish how to recover before starting the next stage.

Check your understanding

After certificate renewal a client still sees an expired serving certificate. What would you check first?

Check the certificate actually presented by the endpoint. Verify that the server loaded the renewed file and, behind a load balancer, check every API-server instance that can answer the connection.

Go to the source

Reviewed 2026-10-27 · Kubernetes 1.37 · Related local exercise

Search the book

Search loads when you open it.

Keyboard shortcuts

Ctrl + K / ⌘ + K
Search the book
?
Open this guide
Tab / Shift + Tab
Move between controls
Enter / Space
Activate a focused button or disclosure
← / →
Focused visual timeline · previous or next step
Home / End
Focused visual timeline · first or last point
Esc
Close the open dialog or menu