Skip to main content

More Info:

Use Google-managed SSL certificates on Ingress resources so TLS certificates are automatically provisioned and rotated. This avoids expired or mismanaged manual certificates and exposed LoadBalancer services.

Risk Level

Medium

Address

Security

Compliance Standards

  • CIS GKE

Triage and Remediation

Remediation

Manual Steps

  1. On any machine with gcloud and kubectl access, list external LoadBalancer Services and candidate apps to migrate to Ingress:
  2. For each HTTP/HTTPS LoadBalancer Service you want to protect with managed certs, create or reuse a DNS name that points to the GKE Ingress IP (will be known after step 5). Ensure you control the DNS zone in Cloud DNS or another DNS provider.
  3. On any machine with gcloud/kubectl access, create a ManagedCertificate for each domain you want Google to manage (replace values with your real domain and namespace):
  4. Migrate the existing external Service to Ingress by:
    • Changing the Service to ClusterIP (so it is only internal to the cluster), for example:
    • Creating an Ingress that:
      • Routes to that Service
      • Uses the Google HTTP(S) Load Balancer gce controller
      • References the ManagedCertificate via annotation:
  5. After the Ingress is created, obtain its external IP and point your DNS records at it (run on any machine with kubectl):
    Create/modify A (and/or CNAME) records for example.com and www.example.com to target the Ingress IP. Wait for DNS to propagate and for the ManagedCertificate to become Active:
  6. Verify overall compliance from any machine with kubectl and jq:
kubectl cannot remediate this finding because it requires configuring Google-managed SSL certificates and Ingress behavior at the GKE / cloud provider configuration and IaC layer. Make the changes through the Google Cloud Console, gcloud, or your IaC (per the Manual Steps section), then re-run the audit command from any machine with kubectl access to confirm the issue is resolved.