In this brief article we’ll see how to setup a Kubernetes nginx ingress to redirect HTTP traffic from example.com
to www.example.com
.
Prerequisites here are a cluster with an nginx ingress controller and a route to the cluster. This relies on your domain routing example.com
and www.example.com
to your cluster, usually through some form of load-balancer. We’re not going to cover these aspect of the solution, just the ingress definition you need.