I currently have kubernetes dashboard installed and I can access the dashboard via http://ip-address:8080/ui and also https://ip-address:443/ui. The latter asks for a username and password and I'm able to log into the K8s dashboard.
Question: What do I have to change to lock down 8080? I do not want people be able to access the dashboard via port 8080.
I tried changing the kubernetes-dashboard.yaml file from port 80 to 443 and targetport: 9090 to 8443, but it tells me the dashboard service cannot be found if I try to access it via HTTPS (port 443). Any advice would be good.
You can change default ports with --insecure-port
flag as explained in documentation: https://kubernetes.io/docs/reference/access-authn-authz/controlling-access/