microk8s: Installation timeout v1.19/Raspberry PI 4/Ubuntu 20.20 snapshot
Only timeouts are observed:
# snap install microk8s --classic
error: cannot perform the following tasks:
- Run configure hook of "microk8s" snap if present (run hook "configure":
-----
+ '[' '!' -e /var/snap/microk8s/1669/args/containerd ']'
+ grep -e '\-\-docker unix://${SNAP_DATA}/docker.sock' /var/snap/microk8s/1669/args/kubelet
++ produce_certs
++ export OPENSSL_CONF=/snap/microk8s/current/etc/ssl/openssl.cnf
++ OPENSSL_CONF=/snap/microk8s/current/etc/ssl/openssl.cnf
++ for key in serviceaccount.key ca.key server.key front-proxy-ca.key front-proxy-client.key
++ '[' -f /var/snap/microk8s/1669/certs/serviceaccount.key ']'
++ for key in serviceaccount.key ca.key server.key front-proxy-ca.key front-proxy-client.key
++ '[' -f /var/snap/microk8s/1669/certs/ca.key ']'
++ for key in serviceaccount.key ca.key server.key front-proxy-ca.key front-proxy-client.key
++ '[' -f /var/snap/microk8s/1669/certs/server.key ']'
++ for key in serviceaccount.key ca.key server.key front-proxy-ca.key front-proxy-client.key
++ '[' -f /var/snap/microk8s/1669/certs/front-proxy-ca.key ']'
++ for key in serviceaccount.key ca.key server.key front-proxy-ca.key front-proxy-client.key
++ '[' -f /var/snap/microk8s/1669/certs/front-proxy-client.key ']'
++ '[' -f /var/snap/microk8s/1669/certs/ca.crt ']'
++ '[' -f /var/snap/microk8s/1669/certs/front-proxy-ca.crt ']'
++ render_csr_conf
+++ get_ips
++++ /snap/microk8s/1669/bin/hostname -I
+++ local 'IP_ADDR=192.168.0.73 '
+++ [[ -z 192.168.0.73 ]]
+++ /snap/microk8s/1669/sbin/ifconfig cni0
+++ echo '192.168.0.73 '
++ local 'IP_ADDRESSES=192.168.0.73 '
++ cp /var/snap/microk8s/1669/certs/csr.conf.template /var/snap/microk8s/1669/certs/csr.conf.rendered
++ '[' '192.168.0.73 ' == 127.0.0.1 ']'
++ '[' '192.168.0.73 ' == none ']'
++ local ips= sep=
++ local -i i=3
+++ echo '192.168.0.73 '
++ for IP_ADDR in $(echo "$IP_ADDRESSES")
++ ips+='IP.3 = 192.168.0.73'
++ sep='\n'
++ /snap/microk8s/1669/bin/sed -i 's/#MOREIPS/IP.3 = 192.168.0.73/g' /var/snap/microk8s/1669/certs/csr.conf.rendered
++ '[' -f /var/snap/microk8s/1669/certs/csr.conf ']'
++ local force
++ /snap/microk8s/1669/usr/bin/cmp -s /var/snap/microk8s/1669/certs/csr.conf.rendered /var/snap/microk8s/1669/certs/csr.conf
++ force=false
++ false
++ '[' '!' -f /var/snap/microk8s/1669/certs/front-proxy-client.crt ']'
+++ /snap/microk8s/1669/usr/bin/openssl x509 -noout -issuer
++ '[' 'issuer= /CN=front-proxy-ca' == 'issuer=CN = 127.0.0.1' ']'
++ echo 0
+ '[' 0 == 1 ']'
+ '[' -e /var/snap/microk8s/1669/args/containerd-template.toml ']'
+ grep -e 'stream_server_address = ""' /var/snap/microk8s/1669/args/containerd-template.toml
+ grep -e '\-\-allow-privileged' /var/snap/microk8s/1669/args/kubelet
+ '[' -f /root/snap/microk8s/common/istio-auth.lock ']'
+ '[' -f /root/snap/microk8s/common/istio-auth.lock ']'
+ need_api_restart=false
+ '[' -f /var/snap/microk8s/1669/credentials/kubelet.config ']'
+ '[' -f /var/snap/microk8s/1669/credentials/proxy.config ']'
+ '[' -f /var/snap/microk8s/1669/credentials/scheduler.config ']'
+ '[' -f /var/snap/microk8s/1669/credentials/controller.config ']'
+ for dir in "${SNAP_DATA}/credentials/ ${SNAP_DATA}/certs/ ${SNAP_DATA}/args/ ${SNAP_DATA}/var/lock"
+ chmod -R ug+rwX /var/snap/microk8s/1669/credentials/ /var/snap/microk8s/1669/certs/ /var/snap/microk8s/1669/args/ /var/snap/microk8s/1669/var/lock
+ chmod -R o-rwX /var/snap/microk8s/1669/credentials/ /var/snap/microk8s/1669/certs/ /var/snap/microk8s/1669/args/ /var/snap/microk8s/1669/var/lock
+ getent group microk8s
+ getent group microk8s
+ chgrp microk8s -R /var/snap/microk8s/1669/credentials/ /var/snap/microk8s/1669/certs/ /var/snap/microk8s/1669/args/ /var/snap/microk8s/1669/var/lock/ /var/snap/microk8s/1669/var/kubernetes/backend/
+ '[' -e /var/snap/microk8s/1669/opt/cni/bin/flanneld ']'
+ '[' -f /var/snap/microk8s/1669/args/flanneld ']'
+ grep -e etcd.socket:2379 /var/snap/microk8s/1669/args/etcd
+ grep -e basic-auth-file /var/snap/microk8s/1669/args/kube-apiserver
+ grep '\-\-enable\-v2' /var/snap/microk8s/1669/args/etcd
--enable-v2=true
+ false
+ '[' -L /var/snap/microk8s/1669/bin/cilium ']'
+ '[' -e /var/snap/microk8s/1669/var/lock/clustered.lock ']'
+ '[' -e /var/snap/microk8s/1669/args/flannel-template.conflist ']'
+ grep -e cniVersion /var/snap/microk8s/1669/args/flannel-template.conflist
"cniVersion": "0.3.1",
+ '[' '!' -f /var/snap/microk8s/1669/args/cluster-agent ']'
+ grep -e '\-\-timeout' /var/snap/microk8s/1669/args/cluster-agent
--timeout 240
+ mkdir -p /var/snap/microk8s/1669/juju/share/juju /var/snap/microk8s/1669/juju-home
+ chmod -R ug+rwX /var/snap/microk8s/1669/juju /var/snap/microk8s/1669/juju-home
+ chmod -R o-rwX /var/snap/microk8s/1669/juju /var/snap/microk8s/1669/juju-home
+ getent group microk8s
+ chgrp microk8s -R /var/snap/microk8s/1669/juju /var/snap/microk8s/1669/juju-home
+ grep -e '\-\-ip-masq' /var/snap/microk8s/1669/args/flanneld
--ip-masq=true
+ grep -e '\-\-cluster-cidr=10.152.183.0/24' /var/snap/microk8s/1669/args/kube-proxy
+ '[' -e /var/snap/microk8s/1669/args/cni-network/cni.yaml ']'
+ '[' -e /var/snap/microk8s/1669/var/lock/ha-cluster ']'
+ echo 'Setting up the CNI'
Setting up the CNI
++ date +%s
+ start_timer=1603402337
+ timeout=120
+ KUBECTL='/snap/microk8s/1669/kubectl --kubeconfig=/var/snap/microk8s/1669/credentials/client.config'
+ sleep 5
++ date +%s
+ now=1603402461
+ [[ 1603402461 > 1603402457 ]]
+ break
+ /snap/microk8s/1669/kubectl --kubeconfig=/var/snap/microk8s/1669/credentials/client.config apply -f /var/snap/microk8s/1669/args/cni-network/cni.yaml
The connection to the server 127.0.0.1:16443 was refused - did you specify the right host or port?
The system was installed from a snapshot (20 October) and updated afterwards.
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.10
Release: 20.10
Codename: groovy
$ uname -a
Linux k8s3 5.8.0-1006-raspi #9-Ubuntu SMP PREEMPT Fri Oct 16 12:55:30 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux
microk8s inspect cannot run because the installation fails and ufw is by default inactive. While version 1.18 can be successfully installed, I am interested in features found in version 1.19.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 3
- Comments: 19 (2 by maintainers)
The installation finally works:
Afterwards, it takes around five minutes to reach the running state:
After a reboot, microk8s seems to reach that state in less than a minute.
I can confirm that installing Microk8s in old version and then refreshing to newest version does makes it seem to work (even though I do not know how to verify that it ends up in state equal to a fresh install of 1.19.)
Commands used:
sudo snap install microk8s --classic --channel=1.18/stable=> microk8s (1.18/stable) v1.18.9 from Canonical✓ installedthen:
sudo snap refresh microk8s --channel 1.19/stable=> microk8s (1.19/stable) v1.19.0 from Canonical✓ refreshedthen:
sudo microk8s.status=> microk8s is runningAlso see this behavior on Ubuntu Server 20.10
Now I can install 1.19/stable from
snap install microk8s --classic --channel=1.19/stableand it workThis just took me a hole day and made me play around with minikube instead 😅 Glad I found the issue now. Can confirm it’s failing in version 19. Installing version 18 is working. (raspberry pi 4b 8gb - Ubuntu Desktop 20.10 fresh install)
Same issue here… found a workarround though: Interestingly, installing 1.18 and then refreshing to 1.19 seems to work!
I have same issue too
but reinstall choice custom version 1.18 can success installed.