Q: What is a ServiceAccount token and when does it expire?
In K8s 1.21+, ServiceAccount tokens are bound tokens — time-limited (default 1 hour), audience-specific, automatically rotated by the kub...
#Kubernetes #Additional Kubernetes Scenarios (Q101-Q200) #L2 #Container Orchestration #K8s
🎙️ Candidate Opening & Architectural Context
""In one of our high-traffic production clusters, our SRE team handled this incident using a standardized runbook. When addressing this question, I walk the interviewer through our production incident runbook: isolating the blast radius, checking diagnostic logs and metrics, and applying a safe fix.""
Advertisement
🛠️ Production Runbook & Step-by-Step Resolution
1️⃣
Production Solution & Architecture
In K8s 1.21+, ServiceAccount tokens are bound tokens — time-limited (default 1 hour), audience-specific, automatically rotated by the kubelet. Older clusters used long-lived JWTs stored as Secrets. Pods access the token at /var/run/secrets/kubernetes.io/serviceaccount/token. The kubelet refreshes it before expiry, so the mounted file is always valid.
💡 The Senior SRE Gold Nugget (Key Architectural Takeaway)
"Pro-Tip: In K8s 1.21+, ServiceAccount tokens are bound tokens — time-limited (default 1 hour), audience-specific, automatically rotated by ."
⚡ 60-Second Elevator Pitch Talking Points
- Immediate Triage: In K8s 1.21+, ServiceAccount tokens are bound tokens — time-limited (default 1 hour), audience-
- Run targeted verification commands before modifying configuration.
- Automate permanent guardrails (CI check, alerts, IaC policy) to prevent recurrence.
Advertisement