cd ../blog
AWS InfrastructureSeptember 24, 202613 min read

EKS CA Rotation: Keeping Argo CD, CI Runners, and Worker Nodes Connected

A practical readiness gate for EKS CA rotation: compare complete trust bundles, verify Argo CD and node refresh, and separate TLS failures from IAM and Kubernetes authorization.

Roger Vasconcelos
Roger Vasconcelos
AWS DevOps Architect
EKS CA Rotation: Keeping Argo CD, CI Runners, and Worker Nodes Connected

AI-generated editorial illustration; technical diagrams by NeuralOps

Imagine a deployment window where the application still serves traffic, the EKS control plane is healthy, and Argo CD suddenly cannot reconcile. Its destination-cluster connection reports an unknown certificate authority. A CI job fails the same way, while an engineer with a freshly generated kubeconfig connects successfully.

That is a plausible CA rotation failure: different clients hold different versions of the cluster's trust configuration. Restarting the application will not repair it. Neither will refreshing an IAM token if the connection fails before authentication.

The operational challenge is proving that every important API consumer has received—and actually loaded—the successor CA before the API server starts presenting certificates signed by it. Treat that proof as a release gate.

Put the deadline on the client inventory

AWS introduced its managed EKS CA rotation lifecycle in August 2026. Original cluster CAs have ten-year validity; successor CAs have five-year validity. A cluster created in 2018 therefore deserves attention before 2028, but its actual certificate dates—not that arithmetic—belong in the change record. AWS launch deep dive, EKS rotation guide

The lifecycle separates adding trust from changing the signer. Appending a successor creates an overlap period; activation changes which CA signs certificates. AWS distributes trust to its managed components before permitting activation. CreateCertificateAuthority API

AWS's normal schedule appends a successor around two years before expiry and activates it around six months before expiry. A final activation, following rollback, occurs 45 days before expiry and cannot be rolled back. Clusters created in 2018–2019 have adjusted notifications. Read the actual schedule rather than constructing dates from a spreadsheet formula. EKS rotation guide

An effective inventory identifies a trust store, its owner, how it is updated, and evidence of consumption. “GitHub Actions” is too broad. “Production deploy workflow, kubeconfig generated on each run, owned by delivery engineering” is actionable. Include infrequent release jobs, disaster-recovery automation, vendor integrations, and administrative workstations. Their silence during a normal working day proves little.

Ownership follows the implementation

AWS handles the control plane, EKS Auto Mode, and Fargate. Customer responsibilities include managed node groups, self-managed nodes, Karpenter-controlled nodes, hybrid nodes, and external clients. The word “managed” in managed node groups does not transfer rotation preparation to AWS. AWS rotation deep dive

There is also an important Argo CD distinction: AWS updates the managed Argo CD capability within EKS Capabilities. That does not cover an Argo CD installation your team operates. EKS rotation guide

Map ownership at the connection level. A central Argo CD installation can connect to many destination clusters, each with a different CA lifecycle. Updating the management cluster's kubeconfig says nothing about those destination registrations. Likewise, an ephemeral runner can still consume an old kubeconfig from a durable secret. Short-lived compute does not guarantee fresh configuration.

Diagnose the layer that failed

Before changing trust material, identify which connection failed. An AWS CLI AccessDeniedException from DescribeCluster concerns AWS API permissions. A Kubernetes client reporting an unknown certificate authority concerns its verification of the API server. A Kubernetes HTTP response means the connection progressed further, although a proxy can complicate that interpretation.

For the usual IAM-backed EKS client, separate three questions: does the client trust the server certificate, can it present an accepted identity, and may that identity perform the requested operation? Kubernetes authentication establishes identity before authorization evaluates access. A 401 generally directs investigation toward credentials or authentication configuration; a 403 directs it toward the identity and authorization decision, including the possibility of anonymous access. Neither status alone justifies replacing the CA. Kubernetes authentication

EKS authorization can involve access policies as well as Kubernetes RBAC. Those policies express Kubernetes permissions; they are not IAM permission policies. Inspect the configured authorization path rather than assuming every forbidden request needs a RoleBinding. EKS access policy permissions

Capture the endpoint, runner identity, kubeconfig path, and exact error before remediation. Compare them with a known working consumer of the same cluster. An engineer's successful command is a useful control only if it reaches the same destination. Avoid changing IAM roles and CA bundles together: the resulting success would tell you little about the original fault.

Append first; record asynchronous completion

The following examples assume Bash, jq, a current AWS CLI v2 with the CA commands, and an authenticated AWS identity authorized for the relevant EKS operations. The cluster must be active. Select a change directory and set your own cluster and Region; keep these variables in the same shell for subsequent examples.

export CLUSTER='replace-with-cluster-name'
export REGION='replace-with-region'
export AWS_PAGER=''
aws sts get-caller-identity
aws eks list-certificate-authorities \
  --cluster-name "$CLUSTER" --region "$REGION" --output json

Inspect the list before creating anything. EKS allows at most two CAs; if a successor already exists, work with that rotation. The following command starts a change and saves its response. Its update identifier is update.id, not a top-level updateId. AWS CLI create-certificate-authority reference

aws eks create-certificate-authority \
  --cluster-name "$CLUSTER" --region "$REGION" \
  --output json > ca-create.json

UPDATE_ID=$(jq -er '.update.id' ca-create.json)
SUCCESSOR_CA_ID=$(jq -er '.certificateAuthority.id' ca-create.json)

aws eks describe-update --name "$CLUSTER" --region "$REGION" \
  --update-id "$UPDATE_ID" \
  --query 'update.{Status:status,Errors:errors}' --output json

aws eks describe-certificate-authority \
  --cluster-name "$CLUSTER" --region "$REGION" \
  --certificate-authority-id "$SUCCESSOR_CA_ID" --output json

Repeat the read commands until the update reports Successful and distribution reports COMPLETE; investigate Failed or Cancelled instead of continuing. DescribeUpdate exposes status and error details. Distribution status describes AWS-managed components, not your external-client inventory. DescribeUpdate API, CertificateAuthority API object

Record the outgoing CA ID too. Capture validity and the successor's scheduled events in the change record. The API distinguishes the earliest automatic activation from the final automatic activation deadline. Scheduled-events API object

Four stages of CA rotation: append, AWS distribution, customer readiness, and activation, with separate AWS and platform-team responsibilities.
AWS distribution and customer readiness are separate gates. Activation follows both.

Distribute the complete bundle

During overlap, preserve both PEM certificates. Retrieve the cluster's combined bundle through describe-cluster; do not substitute the individual successor certificate returned by a CA detail request. EKS rotation guide

For CI that generates kubeconfig, make retrieval part of each execution. This example creates a dedicated file, avoiding changes to an engineer's normal current context. The runner needs AWS credentials, cluster endpoint access, kubectl, and Kubernetes authorization to read nodes.

CI_KUBECONFIG="$PWD/rotation-kubeconfig"
aws eks update-kubeconfig --name "$CLUSTER" --region "$REGION" \
  --kubeconfig "$CI_KUBECONFIG"
kubectl --kubeconfig "$CI_KUBECONFIG" get nodes

update-kubeconfig populates the endpoint and CA data. If cluster authentication requires a role, supply your established --role-arn; cross-account retrieval uses the distinct --assume-role-arn option. Preserve that distinction when adapting a working pipeline. AWS CLI kubeconfig reference

For self-managed Argo CD, destination credentials live in cluster Secrets. Their JSON config contains tlsClientConfig.caData, a base64-encoded PEM value. That is separate from repository TLS configuration. Update the owning GitOps or secret-management source while preserving authentication settings such as awsAuthConfig. Argo CD declarative cluster configuration

Do not replace the entire JSON configuration with a minimal CA example. That can remove the IAM role or other connection settings and introduce a second failure. Inspect the rendered destination configuration, exercise reconciliation, and confirm the controller consumed the change. A manifest merged into Git is delivery intent; the running controller is the consumer.

Also test your own bundle handling. Parsers that retain only the first PEM block can make a successful configuration rollout misleading. Compare certificate fingerprints as a set rather than treating certificate ordering as meaningful. Keep TLS verification enabled throughout the transition.

Compare certificates, not encoded strings

The following read-only checker retrieves the full cluster bundle and compares SHA-256 fingerprints of every complete PEM certificate. It accepts either a kubeconfig's current context or an exported consumer PEM file. For kubeconfig, it also checks the endpoint and rejects disabled TLS verification. It prints fingerprints and counts, never credentials.

Save it as compare_eks_ca.py. Requirements are Python 3, the AWS CLI, permission for eks:DescribeCluster, and kubectl for kubeconfig mode. Run it after AWS distribution completes, against a trusted local configuration file. kubectl config view supports flattening file references and selecting the current context; --raw is necessary for certificate data, so the command deliberately selects only the cluster stanza instead of printing the complete configuration. kubectl config view, DescribeCluster CLI

#!/usr/bin/env python3
import argparse
import base64
import hashlib
import json
import os
from pathlib import Path
import re
import ssl
import subprocess
import sys

PEM = re.compile(
    rb"-----BEGIN CERTIFICATE-----\s+"
    rb"[A-Za-z0-9+/=\s]+?"
    rb"-----END CERTIFICATE-----"
)

def command_json(command):
    result = subprocess.run(
        command, check=True, capture_output=True, text=True,
        env=dict(os.environ, AWS_PAGER=""),
    )
    return json.loads(result.stdout)

def decode(value):
    return base64.b64decode(value, validate=True)

def fingerprints(bundle):
    blocks = PEM.findall(bundle)
    if not blocks or PEM.sub(b"", bundle).strip():
        raise ValueError("Expected complete PEM certificate blocks only")
    values = set()
    for block in blocks:
        pem = block.decode("ascii")
        # Parse each certificate as well as checking its PEM envelope.
        context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
        context.load_verify_locations(cadata=pem)
        der = ssl.PEM_cert_to_DER_cert(pem)
        values.add(hashlib.sha256(der).hexdigest())
    if len(values) != len(blocks):
        raise ValueError("Duplicate certificates in bundle")
    return values

def main():
    parser = argparse.ArgumentParser()
    parser.add_argument("--cluster", required=True)
    parser.add_argument("--region", required=True)
    source = parser.add_mutually_exclusive_group(required=True)
    source.add_argument("--kubeconfig")
    source.add_argument("--pem")
    args = parser.parse_args()

    cluster = command_json([
        "aws", "eks", "describe-cluster",
        "--name", args.cluster, "--region", args.region,
        "--output", "json",
    ])["cluster"]
    expected = fingerprints(decode(cluster["certificateAuthority"]["data"]))

    if args.kubeconfig:
        config = command_json([
            "kubectl", "--kubeconfig", args.kubeconfig,
            "config", "view", "--raw", "--minify", "--flatten",
            "-o", "jsonpath={.clusters[0].cluster}",
        ])
        if config.get("insecure-skip-tls-verify", False):
            raise ValueError("TLS verification is disabled")
        if config.get("server") != cluster["endpoint"]:
            raise ValueError("Kubeconfig endpoint differs from EKS endpoint")
        actual = fingerprints(decode(config["certificate-authority-data"]))
    else:
        actual = fingerprints(Path(args.pem).read_bytes())

    missing, extra = expected - actual, actual - expected
    print("Expected certificate count:", len(expected))
    print("Consumer certificate count:", len(actual))
    print("Missing fingerprints:", sorted(missing))
    print("Extra fingerprints:", sorted(extra))
    if missing or extra:
        print("MISMATCH: review consumer trust configuration")
        return 1
    print("MATCH: configured certificate sets are identical")
    return 0

if __name__ == "__main__":
    try:
        sys.exit(main())
    except (OSError, ValueError, KeyError, ssl.SSLError,
            subprocess.CalledProcessError) as error:
        # Do not print subprocess stdout/stderr: configuration is private.
        print("Check failed:", type(error).__name__, file=sys.stderr)
        sys.exit(2)

python3 compare_eks_ca.py --cluster "$CLUSTER" --region "$REGION" \
  --kubeconfig "$CI_KUBECONFIG"

# Alternative: an already-exported PEM bundle from a consumer.
python3 compare_eks_ca.py --cluster "$CLUSTER" --region "$REGION" \
  --pem ./consumer-ca.pem

Hashing decoded DER removes PEM whitespace and ordering differences from the comparison. The implementation uses Python's certificate conversion, strict base64 decoding, and SHA-256 interfaces. Python TLS documentation, base64 decoding, hashlib

An extra certificate causes a conservative mismatch, even if the consumer could connect. Review intentional additional roots separately. PEM mode cannot verify destination identity, and neither mode inspects a running process's memory. This is a configuration comparison, not certificate-chain validation against a future API-server response. It also does not execute kubeconfig authentication plugins or send Kubernetes API requests.

Trust matrix across before activation, after activation, and eligible rollback: outgoing-only clients pass, fail, pass; dual-trust clients pass in all three phases; successor-only clients fail, pass, fail.
CA-trust checks only, assuming otherwise valid certificates. The figure does not establish network access, IAM authentication, or authorization. Preserve both roots during overlap.

Refresh nodes without smuggling in an outage

Node replacement deserves its own capacity and disruption review. Before approving a rollout, ask whether replacement nodes can launch, become ready, and take traffic while old nodes drain. Check subnet capacity, workload placement constraints, and disruption budgets. A CA change is a poor time to discover that the fleet cannot replace a node.

Managed node updates have multiple phases and configurable availability behavior; draining can fail because of pod eviction constraints. Avoid treating a rolling update as an unconditional no-downtime guarantee. EKS managed-node update behavior

For custom bootstrapping, review the rendered launch configuration alongside the replacement result. A new instance launched from stale trust material is still stale. For Karpenter, inspect actual NodeClaims and replacement progress. Disruption budgets, blocking pod disruption budgets, and disruption annotations can constrain voluntary disruption; “Karpenter is installed” is not evidence that every node has rotated. Karpenter disruption documentation

Terraform also needs a precise claim. The AWS provider exposes the cluster certificate-authority data as an attribute. That does not imply every downstream consumer refreshes itself continuously. If your configuration derives launch-template user data or a Kubernetes Secret from that output, inspect the refreshed plan and rendered values for those resources. Do not generalize a CA lifecycle operation into “nothing can change in Terraform.” AWS provider cluster resource

Evidence that survives a review

For a custom launch template, retain the approved template ID and version, the rendered bootstrap CA fingerprints, and an instance inventory after replacement. Correlate instance IDs with Kubernetes node provider IDs. Every serving instance should resolve to the approved configuration; remaining old instances need an explicit explanation. A node creation timestamp alone does not establish which bundle its bootstrap used.

EKS documents that updating a managed node group to a new launch-template version recycles its nodes. Its rolling strategy respects pod disruption budgets, while force updates bypass them. Choose the update mechanism and workload safeguards before starting; do not use a force flag simply to make the CA checklist green. Managed node group updates

For each pool, attach three artifacts: the intended bootstrap input, evidence that replacement instances use it, and a current node-health observation. After activation, add fresh node communication and scheduling evidence. A pre-activation Ready condition cannot prove successor trust because the outgoing signer is still sufficient at that point.

Inventory in-cluster API consumers separately: operators, controllers, and custom automation can maintain their own TLS configuration. Updating a projected CA file or replacing a node does not establish that every surviving process reloaded its certificate pool. Inspect the actual client library, transport construction, and reload behavior for the deployed version. Where reloading is uncertain, use a controlled restart and verify fresh API operations; do not assume all clients behave like the latest client-go.

Make readiness an evidence review

Before activation, a successful API request still encounters the outgoing signer. It proves current connectivity; by itself, it cannot demonstrate acceptance of a certificate the server has not yet presented. That distinction should shape the approval evidence.

Use three complementary checks:

  • Configuration: every identified consumer contains the complete intended bundle, including the successor fingerprint.
  • Consumption: the running process or replacement node loaded that configuration, with a recorded refresh mechanism and version.
  • Operation: representative workflows work with the updated configuration, including a fresh CI execution and Argo CD reconciliation.
  • These are an engineering gate, not an EKS readiness API. Record exceptions by owner and impact. An untested quarterly recovery job deserves an explicit decision, not an empty checkbox interpreted as success.

    Activate with a working recovery path

    Activation is asynchronous too. Run this only after approving the readiness evidence; it changes the signer. Save and inspect the returned update before declaring completion. ActivateCertificateAuthority API

    aws eks activate-certificate-authority \
      --cluster-name "$CLUSTER" --region "$REGION" \
      --certificate-authority-id "$SUCCESSOR_CA_ID" \
      --output json > ca-activate.json
    
    ACTIVATION_UPDATE_ID=$(jq -er '.update.id' ca-activate.json)
    aws eks describe-update --name "$CLUSTER" --region "$REGION" \
      --update-id "$ACTIVATION_UPDATE_ID" \
      --query 'update.{Status:status,Errors:errors}' --output json
    

    After completion, verify the successor is IN_USE and repeat the real client workflows. Monitor fresh reconciliation and node communication, not just existing application traffic. An application can keep answering requests while the systems responsible for deploying and repairing it lose access.

    If rollback is needed, check rollbackAvailable on the active successor CA. EKS rollback reactivates the previous CA using activate-certificate-authority; retain both certificates in clients. CertificateAuthority API object, EKS rollback instructions

    Keep AWS management API access available independently of the Kubernetes connection under repair. Record the previous CA ID before the change. Rehearse who can invoke recovery and how they will observe its asynchronous result. A rollback instruction hidden inside an unreachable cluster is not an operational recovery path.

    Decide rollback criteria before the change

    Stop before activation if any critical consumer lacks an owner, a replacement rollout remains stalled, the configured bundle omits the successor, or recovery access has not been demonstrated. Exceptions should identify the affected workflow and a person authorized to accept its interruption. “Most clients passed” is not a useful approval threshold for a cluster's only deployment path.

    After activation, classify failures before choosing recovery. If newly failing clients report certificate-verification errors and their trust inventory confirms missing successor material, rollback may restore multiple dependent workflows faster than individual repairs. If the failure is an expired IAM session or a forbidden Kubernetes action, changing the signer is unlikely to address it.

    Proceed with rollback only when the API reports it available, the previous CA identity is confirmed, and the incident owner has chosen that recovery path. Track the resulting asynchronous update and repeat the failed operations. If rollback is unavailable, stop retrying it and repair consumers forward. Preserve incident evidence so the next activation resolves the missed dependency rather than repeating the experiment.

    Make the next rotation smaller

    For a fleet, maintain one record per cluster containing both CA identities, actual deadlines, AWS distribution status, client owners, and remaining exceptions. Group rollout waves by shared consumers: one central GitOps service may be the common dependency across otherwise independent clusters.

    The lasting improvement is eliminating unidentified static trust copies. Generate CI configuration at execution time, make destination-cluster trust an owned configuration input, and attach node replacement evidence to readiness approval. Start with one representative cluster and use its inventory to improve the next wave.

    CA rotation succeeds when the systems that operate EKS cross the trust transition with it. The useful work is making configuration ownership, consumption, and recovery visible enough to approve that operation confidently.

    Amazon EKSKubernetesArgo CDPlatform EngineeringTLS

    Share this article

    Roger Vasconcelos

    Roger Vasconcelos

    AWS DevOps Architect

    Senior AWS DevOps Architect with 10 AWS certifications and 20+ years of experience, running a boutique practice augmented by a fleet of AI agents.

    Learn more about me

    Need Help with Your Cloud Infrastructure?

    Let's discuss how I can help you implement these best practices in your organization.

    Get in Touch