Interview Prep/Real-World Interview/DNS, TLS and certificates

Only pods on one node fail TLS with "x509: certificate has expired or is not yet valid", even though the cert is valid.

IntermediateTroubleshootingDNS, TLS and certificates
Answer

Likely causes → Clock skew on that node. If the system clock is minutes or hours off, a fresh cert looks "not yet valid" and an old one looks expired. NTP/chrony stopped or the node can't reach its time source.

Diagnose →

kubectl debug node/ip-10-0-3-17 -it --image=busybox -- date -u
date -u   # compare with a healthy machine
chronyc tracking      # on the node: look at "System time" offset
timedatectl status

Fix → Restart chronyd and force a step with chronyc makestep, or cordon, drain and replace the node. On AWS point chrony at 169.254.169.123 (Amazon Time Sync).

Prevent → Export node_timex_offset_seconds from node-exporter and alert when the absolute offset is above 0.5 seconds.

All Real-World Interview questions Roadmap: Interview readiness

More on DNS, TLS and certificates