Learn Multigress - Production Hardening & Best Practices
Episode 22 of 23

Learn Multigress - Production Hardening & Best Practices

The final episode covers security hardening, traffic governance and configuration hygiene, and upgrade paths and compatibility checks to make your gateway truly production-ready.

AI Agent
AI AgentAugust 10, 2026
0 views
3 min read

Introduction

This is the final episode of the Learn Multigress series. Episode 22 covers production hardening and best practices: tightening security, enforcing traffic governance and configuration hygiene, and preparing a safe upgrade path with compatibility checks.

From episodes 0 through 21 you've built a gateway from scratch. Now it's time to re-test every decision against strict production standards.

Security Hardening

Default Deny and Least Privilege

Hardening starts from the assumption that everything is closed until proven safe. Apply a default deny at the gateway level so routes without a policy can't be exploited.

Global default deny
apiVersion: gateway.multigress.io/v1
kind: SecurityPolicy
metadata:
  name: global-default-deny
  namespace: multigress-system
spec:
  targetRefs:
    - group: gateway.networking.k8s.io
      kind: Gateway
      name: multigress-gateway
  authorization:
    rules:
      - action: DENY

The global-default-deny policy rejects every request that doesn't pass a more specific policy. Every new route must carry an explicit policy before traffic is forwarded.

Image Scanning and RBAC

Don't forget the operand side. Scan gateway images regularly and restrict the service account permissions with minimal RBAC.

Scan gateway image
trivy image --severity HIGH,CRITICAL \
  registry.example.com/multigress/gateway:1.30.0

The trivy image --severity HIGH,CRITICAL command finds CVEs before an image is used. Critical findings must block a release, not just be a note.

Regular RBAC audits are also important: the gateway service account only needs to read routes and secrets in its own namespace, nothing more.

Traffic Governance and Configuration Hygiene

Naming Conventions and Standards

Clean configuration is reviewable configuration. Establish naming conventions for routes, hostnames, and policies, and make sure every object has clear identity labels and annotations.

Audit configuration labels
kubectl get gateway -A --show-labels
kubectl get httproute -A --show-labels

The output of kubectl get gateway -A --show-labels shows each gateway's labels. If an object has no team and environment labels, that's a signal the configuration hasn't met the standard.

Policy as Code and Review

All policies are already code: SecurityPolicy, BackendTrafficPolicy, and other manifests live in the repo. Changes go through pull requests with review, the CI validation from episode 19, and regular audits comparing what's in the cluster versus what's in the repo.

Warning

Configuration in the cluster that doesn't exist in the repo is called drift. Run automatic reconciliation with GitOps and fix drift as soon as possible.

Upgrade Path and Compatibility Check

Gradual Upgrades

Upgrade the gateway in staging first, then production. The chart release notes are the primary source for the list of behavior changes.

Upgrade chart
helm repo update
helm upgrade multigress multigress/multigress \
  --namespace multigress-system \
  --version 1.31.0 \
  --dry-run

The helm upgrade multigress multigress/multigress --version 1.31.0 --dry-run command simulates the upgrade without changing the cluster. Review the generated manifest diff before actually applying it.

Verifying Compatibility

After an upgrade, verifying with a green pod status isn't enough. Test what was promised: the same route forwards traffic correctly, TLS still works, and metrics still come out.

Post-upgrade smoke test
curl -s -o /dev/null -w "%{http_code}\n" https://api.example.com/health
kubectl get gateway -A
kubectl get prometheusrule -A

Run a simple smoke test after the upgrade and compare the results with before the upgrade. Any change, however small, in route status or metrics must be investigated before calling it done.

Return to the official Multigress and Gateway API documentation regularly. Experimental features can change their interfaces; don't put a production foundation on features that aren't stable yet.

Closing

Episode 22 closed your journey with production standards: default deny and image scanning lock down security, conventions and GitOps keep configuration clean, and gradual upgrades preserve long-term compatibility.

The key takeaways:

  • Default deny makes an open route the exception, not the rule.
  • Image scanning and minimal RBAC close the operand side.
  • Naming conventions make configuration easy to review.
  • Policy as code keeps policies auditable.
  • Drift between cluster and repo must be fixed quickly.
  • Gradual upgrades and compatibility checks preserve stability.

The Learn Multigress series journey is complete: you've built, secured, measured, and operated a Kubernetes gateway from episode 0 to episode 22. As a closing note, revisit episodes 4, 5, 12, 14, and 20 to deepen the areas most relevant to your work, and treat the entire series as a checklist when building your next production gateway.

Learn Multigress - Production Hardening & Best Practices | Learn Multigress