Can't bootstrap k8s controller
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
After deploying a kubernetes-core cluster with NFS charm on Juju 2.7.6 and running add-k8s command successfully, juju hangs when trying to bootstrap the controller on new k8s cloud:
$ juju add-k8s newcore
This operation can be applied to both a copy on this client and to the one on a controller.
Do you want to add k8s cloud newcore to:
1. client only (--client)
2. controller "core" only (--controller core)
3. both (--client --controller core)
Enter your choice, or type Q|q to quit: 3
k8s substrate added as cloud "newcore" with storage provisioned
by the existing "default" storage class.
You can now bootstrap to this cloud by running 'juju bootstrap newcore'.
$ juju bootstrap newcore
Creating Juju controller "newcore" on newcore
Creating k8s resources for controller "controller-
Starting controller pod
Bootstrap agent now started
Contacting Juju controller at 10.152.183.204 to verify accessibility...
I can see that controller was created, but the address 10.152.183.204 is not pingable
If the k8s cluster creates cluster ip services, these may not be accessible external to the cluster, eg by the Juju client.
How the controller service is spun up can be configured
https:/ /discourse. juju.is/ t/new-features- and-changes- in-juju- 2-7/2268
Configuring the controller service when bootstrapping
When bootstrapping directly to a k8s cluster, Juju will create the front end service to the controller pod according to the type of the underlying cluster. For microk8s, a ClusterIP service is created; for Charmed Kubernetes on AWS or Azure, a LoadBalancer service is created etc.
You can override this behaviour, to choose a specific service type, and where necessary provide the external IP address(es) with which to configure the service. Here’s how you’d specify to use a k8s ExternalName service
$ juju bootstrap microk8s test service- type=external external- name=mydnsname external- ips=[10. 0.0.1,10. 0.0.2]
--config controller-
--config controller-
--config controller-
(where “mynamename” and the external ips are provided as dictated by the k8s set up being used).
Other options for service type are cluster and loadbalancer.
Maybe this information will help you get started.