Microk8s is installed on default port 16443. I want to change it to 6443. I am using Ubuntu 16.04. I have installed microk8s using snapd and conjure-up.
None of the following options I have tried worked.
- Tried to edit the port in
/snap/microk8s/current/kubeproxy.config
. As the volume is read-only, I could not edit it. - Edited the
/home/user_name/.kube/config
and restarted the cluster. - Tried using the command and restarted the cluster
sudo kubectl config set clusters.microk8s-cluster.server https://my_ip_address:6443
. - Tried to use
kubectl proxy --port=6443 --address=0.0.0.0 --accept-hosts=my_ip_address &
. It listens on 6443, but only HTTP, not HTTPS traffic.