Run a juju bootstrap microk8s mk8s --debug:
<cut>
10:12:54 DEBUG juju.kubernetes.provider configmap.go:84 updating configmap "controller-configmap"
10:12:54 DEBUG juju.kubernetes.provider bootstrap.go:577 creating controller statefulset:
&StatefulSet{ObjectMeta:{controller controller-mk8s 0 0001-01-01 00:00:00 +0000 UTC <nil> <nil> map[juju-app:controller] map[juju.io/controller:5ca86eab-7339-4cb2-8734-2fed8213b3fb] [] [] []},Spec:StatefulSetSpec{Replicas:*1,Selector:&v1.LabelSelector{MatchLabels:map[string]string{juju-app: controller,},MatchExpressions:[]LabelSelectorRequirement{},},Template:{{controller-0 controller-mk8s 0 0001-01-01 00:00:00 +0000 UTC <nil> <nil> map[juju-app:controller] map[juju.io/controller:5ca86eab-7339-4cb2-8734-2fed8213b3fb] [] [] []} {[{controller-server-pem {nil nil nil nil nil SecretVolumeSource{SecretName:controller-secret,Items:[]KeyToPath{KeyToPath{Key:server.pem,Path:template-server.pem,Mode:nil,},},DefaultMode:*256,Optional:nil,} nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil}} {controller-shared-secret {nil nil nil nil nil &SecretVolumeSource{SecretName:controller-secret,Items:[]KeyToPath{KeyToPath{Key:shared-secret,Path:shared-secret,Mode:nil,},},DefaultMode:*256,Optional:nil,} nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil}} {controller-agent-conf {nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil &ConfigMapVolumeSource{LocalObjectReference:LocalObjectReference{Name:controller-configmap,},Items:[]KeyToPath{KeyToPath{Key:agent.conf,Path:template-agent.conf,Mode:nil,},},DefaultMode:nil,Optional:nil,} nil nil nil nil nil nil nil nil nil}} {controller-bootstrap-params {nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil &ConfigMapVolumeSource{LocalObjectReference:LocalObjectReference{Name:controller-configmap,},Items:[]KeyToPath{KeyToPath{Key:bootstrap-params,Path:bootstrap-params,Mode:nil,},},DefaultMode:nil,Optional:nil,} nil nil nil nil nil nil nil nil nil}}] [] [{mongodb jujusolutions/juju-db:4.0 [mongod] [--dbpath=/var/lib/juju/db --sslPEMKeyFile=/var/lib/juju/server.pem --sslPEMKeyPassword=ignored --sslMode=requireSSL --port=37017 --journal --replSet=juju --quiet --oplogSize=1024 --ipv6 --auth --keyFile=/var/lib/juju/shared-secret --storageEngine=wiredTiger --bind_ip_all] [{mongodb 0 37017 TCP }] [] [] {map[memory:{{1610612736 0} {<nil>} BinarySI}] map[]} [{storage false /var/lib/juju <nil> } {storage false /var/lib/juju/db db <nil> } {controller-server-pem true /var/lib/juju/template-server.pem template-server.pem <nil> } {controller-shared-secret true /var/lib/juju/shared-secret shared-secret <nil> }] [] &Probe{Handler:Handler{Exec:&ExecAction{Command:[mongo --port=37017 --ssl --sslAllowInvalidHostnames --sslAllowInvalidCertificates --sslPEMKeyFile=/var/lib/juju/server.pem --eval db.adminCommand('ping')],},HTTPGet:nil,TCPSocket:nil,},InitialDelaySeconds:30,TimeoutSeconds:5,PeriodSeconds:10,SuccessThreshold:1,FailureThreshold:3,} &Probe{Handler:Handler{Exec:&ExecAction{Command:[mongo --port=37017 --ssl --sslAllowInvalidHostnames --sslAllowInvalidCertificates --sslPEMKeyFile=/var/lib/juju/server.pem --eval db.adminCommand('ping')],},HTTPGet:nil,TCPSocket:nil,},InitialDelaySeconds:5,TimeoutSeconds:1,PeriodSeconds:10,SuccessThreshold:1,FailureThreshold:3,} nil nil IfNotPresent nil false false false} {api-server jujusolutions/jujud-operator:2.8.1.3661 [/bin/sh] [-c export JUJU_DATA_DIR=/var/lib/juju
export JUJU_TOOLS_DIR=$JUJU_DATA_DIR/tools
mkdir -p $JUJU_TOOLS_DIR
cp /opt/jujud $JUJU_TOOLS_DIR/jujud
test -e $JUJU_DATA_DIR/agents/controller-0/agent.conf || $JUJU_TOOLS_DIR/jujud bootstrap-state $JUJU_DATA_DIR/bootstrap-params --data-dir $JUJU_DATA_DIR --debug --timeout 20m0s
$JUJU_TOOLS_DIR/jujud machine --data-dir $JUJU_DATA_DIR --controller-id 0 --log-to-stderr --debug
] /var/lib/juju [] [] [] {map[memory:{{1610612736 0} {<nil>} BinarySI}] map[]} [{storage false /var/lib/juju <nil> } {controller-agent-conf false /var/lib/juju/agents/controller-0/template-agent.conf template-agent.conf <nil> } {controller-server-pem true /var/lib/juju/template-server.pem template-server.pem <nil> } {controller-shared-secret true /var/lib/juju/shared-secret shared-secret <nil> } {controller-bootstrap-params true /var/lib/juju/bootstrap-params bootstrap-params <nil> }] [] nil nil nil nil IfNotPresent nil false false false}] [] Always <nil> <nil> map[] <nil> false false false <nil> nil [] nil [] [] <nil> nil [] <nil> <nil> <nil> map[] []}},VolumeClaimTemplates:[]PersistentVolumeClaim{{{ } {storage 0 0001-01-01 00:00:00 +0000 UTC <nil> <nil> map[juju-app:controller] map[juju.io/controller:5ca86eab-7339-4cb2-8734-2fed8213b3fb] [] [] []} {[ReadWriteOnce] nil {map[] map[storage:{{21474836480 0} {<nil>} 20Gi BinarySI}]} 0xc0000f7a90 <nil> nil} { [] map[] []}},},ServiceName:controller-service,PodManagementPolicy:,UpdateStrategy:StatefulSetUpdateStrategy{Type:,RollingUpdate:nil,},RevisionHistoryLimit:nil,},Status:StatefulSetStatus{ObservedGeneration:0,Replicas:0,ReadyReplicas:0,CurrentReplicas:0,UpdatedReplicas:0,CurrentRevision:,UpdateRevision:,CollisionCount:nil,Conditions:[]StatefulSetCondition{},},}
10:12:54 DEBUG juju.kubernetes.provider k8s.go:1983 selecting units "juju-app=controller" to watch
10:12:54 DEBUG juju.kubernetes.provider events.go:51 getting the latest event for "involvedObject.name=controller-0,involvedObject.kind=Pod"
10:12:55 DEBUG juju.kubernetes.provider events.go:51 getting the latest event for "involvedObject.name=controller-0,involvedObject.kind=Pod"
10:12:55 DEBUG juju.kubernetes.provider k8swatcher.go:112 fire notify watcher for controller
10:12:55 DEBUG juju.kubernetes.provider events.go:51 getting the latest event for "involvedObject.name=controller-0,involvedObject.kind=Pod"
10:12:55 DEBUG juju.kubernetes.provider k8swatcher.go:112 fire notify watcher for controller-0
10:12:57 DEBUG juju.kubernetes.provider k8swatcher.go:112 fire notify watcher for controller
10:12:57 DEBUG juju.kubernetes.provider events.go:51 getting the latest event for "involvedObject.name=controller-0,involvedObject.kind=Pod"
10:12:57 DEBUG juju.kubernetes.provider bootstrap.go:633 Successfully assigned controller-mk8s/controller-0 to node10
10:12:57 DEBUG juju.kubernetes.provider bootstrap.go:633 Pulled images
10:12:57 DEBUG juju.kubernetes.provider k8swatcher.go:112 fire notify watcher for controller-0
10:12:57 DEBUG juju.kubernetes.provider events.go:51 getting the latest event for "involvedObject.name=controller-0,involvedObject.kind=Pod"
10:12:58 DEBUG juju.kubernetes.provider k8swatcher.go:112 fire notify watcher for controller-0
10:12:58 DEBUG juju.kubernetes.provider events.go:51 getting the latest event for "involvedObject.name=controller-0,involvedObject.kind=Pod"
10:12:58 DEBUG juju.kubernetes.provider bootstrap.go:633 Created container mongodb
10:12:58 DEBUG juju.kubernetes.provider bootstrap.go:633 Started mongodb container
10:12:58 DEBUG juju.kubernetes.provider bootstrap.go:633 Downloading images
10:12:58 INFO cmd bootstrap.go:635 Downloading images
10:13:01 DEBUG juju.kubernetes.provider k8swatcher.go:112 fire notify watcher for controller-0
10:13:01 DEBUG juju.kubernetes.provider events.go:51 getting the latest event for "involvedObject.name=controller-0,involvedObject.kind=Pod"
Then, the following lines are repeated indefinitely:
10:13:02 DEBUG juju.kubernetes.provider events.go:51 getting the latest event for "involvedObject.name=controller-0,involvedObject.kind=Pod"
10:13:03 DEBUG juju.kubernetes.provider k8swatcher.go:112 fire notify watcher for controller
After some time, it's failing with the timeout and error message:
ERROR failed to bootstrap model: creating controller stack for controller: creating statefulset for controller: timed out waiting for controller pod: pending: -
The same command using the same microk8s cluster is bootstrapping succesffuly, when using 2.7/stable.
$ sudo snap list
Name Version Rev Tracking Publisher Notes
core 16-2.44.3 9066 latest/stable canonical✓ core
core18 20200427 1754 latest/stable canonical✓ base
juju 2.8.1+2.8-837de9a 12070 2.8/edge canonical✓ classic
microk8s v1.18.2 1378 latest/stable canonical✓ classic
There's some issues with the build process that creates the docker image for the juju operator which runs the controller. These are currently being addressed. Until then you could use 2.8/candidate snap instead - it's 2.8-rc1.