Trouble using add-k8s to access kubernetes-core cluster on Openstack created by another client

Hi @noobadmin
Not sure how the k8s cloud was added. The host-cloud-region was missing in your cloud.

When running add-k8s, Juju should have asked the cloud.

# cloud is required and it should be maas if the CK is running on maas.
# region is required as well but maas does not really have region, so just use any fake region.
juju add-k8s k8s-cloud --local --cloud=maas --region=<fake-region>

Then Juju knows current base cloud is maas, so it will create the Load Balancer service type for the controller.

If the kubeapi-load-balancer configured correctly, it should just work.

Ty @kelvin.liu!

Here are the results, unfortunately I didnā€™t manage to do any valuable progress.

more about my akward networking setup:
powerful but non-enterprise asus home router with dhcp off, custom dnsmasq to redirect pxe to maas. single ethernet each node.
ā€œmaster nodeā€ has static address, routerā€™s ip set as gateway and dns(!) - behind a corporate network, 8.8.8.8 is unreachable. Maas provides dhcp and dns is set as authoritative.
juju controller is running inside an lxd container. Iā€™ve added lxd with the add kvm button in maas after doing lxd init. That itself was pain, I got the containers sort of working with a custom bridge (Ubuntu Pastebin). Their behaviour is akward. If I launch a container with lxc, its ip address (assigned by maas) shows up in lxc, however if I launch an instance from maas dashboard, its ip only shows up in there. I can ssh to those containers and they have access outside. lxc profile: Ubuntu Pastebin

This is a new topic for me and at this point seems at least a little too broad. Where should I continue looking regarding networking? I would guess the dns might be mostly responsible, however I remember I needed to edit some of bind9 configs a couple years ago and I do not have very pleasant memories on thatā€¦ Guidance welcome :innocent:

Hi @noobadmin
Sorry, I am not very familiar with maas.
As I mentioned above, bootstrap should be just working if a normal LoadBalancer service works on the CK running on the maas.

You can have a test to see if the networking works or not.

#  https://kubernetes.io/docs/tasks/access-application-cluster/connecting-frontend-backend/
$ kubectl apply -f https://k8s.io/examples/service/access/frontend.yaml

If the load balancer didnā€™t work, freenode.net in #cdk8s could be a good place to ask questions of how to configure it.