Once you have a working ingress in place, you may want to restrict access to it by IP. Fortunately, K8s makes this pretty easy with a simple annotation.
- Edit the ingress
- Near the top should be the annotations
metadata.annotations
- Add the following annotation and update it with the desired IPs
nginx.ingress.kubernetes.io/whitelist-source-range: ###.###.###.###/32,###.###.###.###/32
- Save your changes
- Test.