Get Microk8s configuration in client pc

Login into K8s master node and save Microk8s configuration

microk8s config > k8s_config

Copy config filet to client pc

scp christopher@master:/home/christopher/k8s_config ~/.kube/config

Edit config file in client pc to change remote public IP address

vim ~/.kube/config

Change IP address

# From:
...UVORCBDRVJUSUZJQ0FURS0tLS0tCg==
    server: https://192.168.0.2:16443
  name: microk8s-cluster
...

# To:
...UVORCBDRVJUSUZJQ0FURS0tLS0tCg==
    server: https://111.98.21.93:16443
  name: microk8s-cluster
...

Leave a Comment

Scroll to Top