Skip to main content
Foundations: web, servers, containersLesson 5 of 13

HTTPS and Certificates

An HTTPS connection starts by using a certificate to check "is this really that server?". Follow how a browser trusts a certificate, why internal networks often show warnings, and what happens when a certificate expires.

Issuer—
Domain match—
Validity—
ResultNot checked
BrowserUser PCTrust storeTrusted CA listCert authorityCACertificateDomain · expiryPortal serverHolds the certPrivate CAIssued in-houseWorker nodePulls imagesHarborImage registryHTTPS connect
RequestResponse / reportAppears in a later step

What you will learn

  • A certificate proves "I own this domain"
  • The browser checks the issuer against its trust store
  • Why private certificates trigger warnings
  • Server-to-server traffic also needs trust registration
  • Why expiry becomes a "sudden" outage

What to do for each warning or error​

SymptomCauseWhat to do
"Not secure" warning (first internal visit)Private certificate, so the issuer is not trustedRegister the company private CA in the PC trust store
Address mismatch warningCertificate domain differs from the address used (e.g. direct IP access)Connect using the domain on the certificate
Connections suddenly fail one dayCertificate expiredRenew the certificate. Automate renewal and set up expiry alerts
Node cannot pull images from HarborNode does not trust Harbor's private certificateRegister the private certificate in the node trust store

Try it yourself​

openssl s_client -connect <domain>:443 -servername <domain> -showcerts </dev/null # Certificate chain the server shows
openssl s_client -connect <domain>:443 -servername <domain> </dev/null 2>/dev/null | openssl x509 -noout -subject -issuer -dates # Domain, issuer, validity
curl -v -o /dev/null https://<domain>/ # Does the trust check pass?
kubectl get secret -A --field-selector type=kubernetes.io/tls # TLS certificates stored in the cluster
kubectl get certificate -A # Renewal status (if cert-manager is installed)

Check yourself

  1. The first visit to an internal system shows "Not secure", and its certificate was issued by the company's private CA. What is going on?
  2. Pods fail because a node cannot pull images from Harbor, which uses a private certificate. What is the fix?
  3. A system that ran fine for a year suddenly refuses all HTTPS connections, with no config change. What should you suspect first?

Further reading: Ingress TLS (Kubernetes docs) · Certificate management with kubeadm · cert-manager