I have successfully created a kind
cluster on a remote virtual machine. My team would like to have access to cluster to learn k8s and play around a bit. I would like to expose the dashboard so that it can be reached on https://ip:20443
. For that I have installed a loadbalancer on kind following this, adjusting where needed. I've also created a new service for the dashboard with type: LoadBalancer
, and it was successfully assigned an IP 172.17.17.200, but the dashboard is still not reachable from the outside. I think the problem is that the traffic is not forwarded from the virtual machine to the docker container. I tried to apply a new IPTABLES rule, but I am not too familiar with IPTABLES, and it did not work:
iptables -t nat -A PREROUTING -p tcp -d <IP_ADDRESS> --dport 20443 -j DNAT --to 172.17.17.200:443
My Kubernetes Dashboard service:
apiVersion: v1
kind: Service
metadata:
name: kubernetes-dashboard
namespace: kubernetes-dashboard
spec:
ports:
- port: 443
protocol: TCP
targetPort: 8443
selector:
k8s-app: kubernetes-dashboard
type: LoadBalancer