After switching to a slim base image, the service fails every outbound HTTPS call with "x509: certificate signed by unknown authority".
BeginnerTroubleshootingDNS, TLS and certificates
Answer
Likely causes → The new image has no CA bundle. scratch, some distroless variants and minimal Alpine builds don't ship /etc/ssl/certs/ca-certificates.crt, so the TLS client can't verify any public certificate.
Diagnose →
kubectl exec deploy/api -- ls /etc/ssl/certs/ 2>&1 | head
kubectl exec deploy/api -- wget -qO- https://api.stripe.com 2>&1 | head -3
Fix → Install or copy the bundle:
FROM alpine:3.20 AS certs
RUN apk add --no-cache ca-certificates
FROM scratch
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
For internal CAs, add your corporate root to the bundle too, never set InsecureSkipVerify.
Prevent → A smoke test in CI that makes one real outbound HTTPS call from the built image before it can be promoted.
More on DNS, TLS and certificates
Monday morning every browser shows "NET::ERR_CERT_DATE_INVALID" for app.example.com; the cert is from Let's Encrypt via cert-manager.BeginnerYou changed the A record for api.example.com to a new load balancer an hour ago, but some users still reach the old server.BeginnerA cert-manager Certificate is stuck at "Issuing"; the Challenge says "Waiting for HTTP-01 challenge propagation: wrong status code '404', expected '200'".IntermediateBrowsers load the site fine, but Android apps and `curl` from servers fail with "unable to verify the first certificate" or "unable to get local issuer certificate".Intermediate`https://example.com` works, but `https://www.example.com` shows "NET::ERR_CERT_COMMON_NAME_INVALID".BeginnerPods across the cluster log "dial udp 10.96.0.10:53: i/o timeout" and "getaddrinfo EAI_AGAIN" during peak traffic.Intermediate