Yes, hayward is the openstack on which the kubernetes was deployed. I also added it with the juju add-cloud command, so when I execute juju list-clouds it shows up.
The bootstrap command was just as you stated: juju bootstrap juju-cluster k8s
Ok, so having the “region” of the k8s be based on the openstack isn’t quite right. To the client bootstraping to k8s it shouldn’t need to worry about that I don’t think. add-k8s will find the .kube/config I believe so I’m curious if the command I put up there works for you?
I have been always piping the .kube/config to the add-k8s command just in case.
If I try just with --local without region I get an error telling me to provide the --region.
I also tried --local and --region together and I get the same result as in the beginning. It starts bootstraping, it gets stuck in the " Creating k8s resources for controller " phase and times out with the Error of the first post of this thread.
Supplying a region with juju add-k8s was introduced in Juju 2.6 to allow Juju to perform necessary checks for recommended storage and other housekeeping things. Unfortunately, this was done as a mandatory argument and so doesn’t work with clouds where region may not be configured.
The soon to be released Juju 2.6.3 (any day now) will have a fix for this issue - region will be optional for clouds such as Openstack.
I just tried it out with the new Juju 2.6.3 release and I still get the same error. I added the recommended Cinder storage that one of the error messages tells me to, just in case, but the error continues to be the following:
ubuntu@osm-kuber:~$ juju bootstrap juju-cluster
Creating Juju controller "juju-cluster" on juju-cluster
Creating k8s resources for controller "controller-juju-cluster"
ERROR failed to bootstrap model: creating controller stack for controller: creating service for controller: attempt count exceeded: controller service address not provisioned
Are there some additional requirements that my Kubernetes install may need for it to work? I know in microk8s I need to enable storage and dns. But I think this stuff should be enabled in a standard kubernetes-core install right?
A standard kubernetes-core install will not set up any k8s storage class on the cluster; that’s usually done via deploying the cloud specific (openstack in this case) integrator charm and relating to the master/worker charms.
Can you confirm that your cluster has a StorageClass set up and annotated as cluster default storage? Also, what’s in the config block when you juju show-cloud <yourk8scluster>? When you bootstrap, is there a PVC created in the cluster? If so, what does kubectl say about its status? Can you try bootstrapping with --debug to get some extra output?
Afterwards I connected kubectl to the k8s by copying the config file in kubernetes-master to ~/.kube/config.
Then I executed the script in the section"Creating a pod with a PersistentDisk-backed volume" of the examples that are in your provided link.
The created storage class was also set to default so I got the following result:
ubuntu@kuber:~$ kubectl get storageclasses
NAME PROVISIONER AGE
openstack-standard (default) kubernetes.io/cinder 34m
For those following along, it appears that the k8s service created for the Juju controller is not getting an externally accessible IP address assigned to it. We need to dig into the reason why.
Hey there, naively trying to bump this one. I have the same issue having my bootstrap process hanging at Contacting Juju controller at 10.152.183.53 to verify accessibility…
I have deployed a juju controller on local Maas cloud and then using juju I have deployed kubernetes-core bundle. Now trying to bootstrap the new k8s cloud. (Im not even sure this is the way to go. I seem to be jujujing in circles.)
So I guess there’s something important missing in my setup regarding networking. Tips, tricks and googling suggestions welcome, will dump configs & logs on demand as I dont want to spam too much.
Thanks a lot for your fast responses, sorry for the late reply.
I’ve worked around this by sshing into the kubernetes master and bootstraping a controller there but that probably isn’t … is not what it should look like
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.
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
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.