MediumExploring SRE Production Incidents: API Server Access Denied | by SRE Thoughts | Medium
Sitemap

Exploring SRE Production Incidents: API Server Access Denied

2 min readOct 6, 2025

--

Hello everyone! After discussing the PV/PVC data loss incident, today I’m sharing another real production incident: API Server certificate expiration causing complete cluster management failure.

This incident taught me what “a single certificate can bring down an entire cluster” truly means.

Press enter or click to view image in full size

Incident Occurrence

On what seemed like a peaceful weekday morning, bad news suddenly started flooding our work chat:

⚡️ “Why is CI/CD completely down?”,

⚡️ “kubectl can’t connect to the cluster!”

⚡️ “What happened?”

My first reaction: “Is it a network issue?”

The harsh reality: Much worse than a network problem…

Fault Investigation

👉 All CI/CD pipelines failed, unable to connect to K8s cluster

👉 kubectl commands returned “unable to connect to server” errors

👉 API Server was completely inaccessible

👉 Found certificate expiration in error logs (x509: certificate has expired or is not valid yet) — my heart sank

Inner monologue: We’re in trouble, there goes my KPI 😭

Root Cause Analysis

The API Server’s client certificate had expired!

Failure chain: Certificate expiration → API Server rejects connections → kubectl fails → CI/CD interrupted → Complete loss of cluster control

Get SRE Thoughts’s stories in your inbox

Join Medium for free to get updates from this writer.

It’s like an employee’s ID badge expiring and security refusing building access:

👉 Employees can’t enter offices (kubectl fails)

👉 Managers can’t reach the control room (kubelet disconnected)

👉 The entire management system falls into chaos

Business Impact

👉 Complete loss of cluster observability

👉 Unable to perform any management operations

👉 CI/CD pipelines interrupted, preventing service updates

Along with assessing the business impact, an unavoidable question arose: Why was there no alert before the certificate expired?

Problem Resolution

👉 Confirmed certificate expiration as root cause

👉 Generated new client certificates

👉 Updated API Server configuration and restarted services

👉 Restored kubectl connectivity within 30 minutes

👉 Notified all teams that normal operations were restored

Improvement Measures

👉 Set up automatic alerts for certificate expiration at 30 days, 7 days, and 1 day before expiry

👉 Establish standard operating procedures (SOP) for certificate management

👉 Include certificate checks in daily inspection checklists

👉 Implement automatic certificate renewal mechanism (optional, depending on actual circumstances)

📖 This incident taught me a valuable lesson: Certificate expiration is like a “time bomb” — everything appears normal until it explodes and you lose all cluster control! Although Pods and services continued running normally and user services were unaffected, as an SRE I was completely locked out of cluster management!

In the K8s world, certificates aren’t just configuration files — they’re the “keys to the kingdom”! 🔑

--

--