I have Kubernetes Master listening on Internal Openstack network address 192.168.6.6:6443. This machine has a floating IP associated for ssh based access (x.x.x.x) from my home. SSH received on the floating IP is sent to the internal IP. But this does not work for 6443 forwarding.
How do I access the K8S API server from my home when I can access the floating IP associated with the K8S master but not the internal IP on which the API server is listening.
I know the method of copying config file to your local machine but config files have the ip address on which master is listening and that ip is not accessible from outside Openstack.
Thanks for any help
You need to replace the API server ip in the KUBE_CONFIG file with the floating IP.
Then, you need to add ingress rule which allows TCP 6443 port to the security group of the master node interface.
I managed to solve this by reinstantiating the k8s cluster on OpenStack and providing the floating ip as "--apiserver-cert-extra-sans" parameter to kubeadm.
kubeadm init --apiserver-cert-extra-sans=<floating-ip>