I have setup a Kubernetes cluster on my home server (using LXD containers) with Juju.
I can control the cluster with kubectl from the server itself. What I am struggling with however, is how to setup kubectl on a remote machine, in order to control my cluster remotely.
$ kubectl cluster-info
Kubernetes master is running at https://10.124.170.69:443
Heapster is running at https://10.124.170.69:443/api/v1/namespaces/kube-system/services/heapster/proxy
KubeDNS is running at https://10.124.170.69:443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
kubernetes-dashboard is running at https://10.124.170.69:443/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy
Grafana is running at https://10.124.170.69:443/api/v1/namespaces/kube-system/services/monitoring-grafana/proxy
InfluxDB is running at https://10.124.170.69:443/api/v1/namespaces/kube-system/services/monitoring-influxdb:http/proxy
$ kubectl get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
default-http-backend ClusterIP 10.152.183.51 80/TCP 5h
kubernetes ClusterIP 10.152.183.1 443/TCP 5h
I assume that I need to expose kubernetes to the internet by assigning the server’s IP as kubernetes’ external IP and turn on port forwarding on my physical router.
Any pointers would be appreciated.