canonical/microk8s

Unable to Update to Microk8s v 1.32

Opened this issue · 4 comments

HeIp commented

Summary

I had just started using microk8s yesterday - latest version is MicroK8s v1.31.3 revision 7456
After seeing a whole issue on how there been issue for crashlooping, file configs, etcs detailed on #4361 I see that a lot would get resolved in v1.32+ however,
running command "sudo snap refresh microk8s " leads to snap saying the latest version is MicroK8s v1.31.3 revision 7456.

What Should Happen Instead?

I am expecting to update microk8s to 1.32+
to remediate the following issues :
image

Reproduction Steps

  1. sudo snap refresh microk8s
  2. reports you are on latest - snap "microk8s" has no updates available

Hey @HeIp,

snap refresh command without any specific channel specified would try to refresh to the latest revision in the channel the snap is currently tracking, which means you'd only get 1.31.x updates. You can see your tracking channel in snap list. Can you try sudo snap refresh microk8s --channel 1.32/stable to update to 1.32?

HeIp commented

sudo snap refresh microk8s --channel 1.32/stable
2024-12-20T22:59:40-05:00 INFO Waiting for "snap.microk8s.daemon-kubelite.service" to stop.
microk8s (1.32/stable) v1.32.0 from Canonical✓ refreshed
Seems it was updated
But is now unable to start ...?
image
admin@pc0:~$ microk8s kubectl get all --all-namespaces
E1220 23:02:58.009006 15989 memcache.go:265] "Unhandled Error" err="couldn't get current server API group list: Get "https://127.0.0.1:16443/api?timeout=32s\": net/http: TLS handshake timeout - error from a previous attempt: read tcp 127.0.0.1:32776->127.0.0.1:16443: read: connection reset by peer"
E1220 23:03:08.011069 15989 memcache.go:265] "Unhandled Error" err="couldn't get current server API group list: Get "https://127.0.0.1:16443/api?timeout=32s\": net/http: TLS handshake timeout"
E1220 23:03:10.383435 15989 memcache.go:265] "Unhandled Error" err="couldn't get current server API group list: Get "https://127.0.0.1:16443/api?timeout=32s\": dial tcp 127.0.0.1:16443: connect: connection refused - error from a previous attempt: read tcp 127.0.0.1:34282->127.0.0.1:16443: read: connection reset by peer"
E1220 23:03:10.385126 15989 memcache.go:265] "Unhandled Error" err="couldn't get current server API group list: Get "https://127.0.0.1:16443/api?timeout=32s\": dial tcp 127.0.0.1:16443: connect: connection refused"
E1220 23:03:10.386649 15989 memcache.go:265] "Unhandled Error" err="couldn't get current server API group list: Get "https://127.0.0.1:16443/api?timeout=32s\": dial tcp 127.0.0.1:16443: connect: connection refused"
The connection to the server 127.0.0.1:16443 was refused - did you specify the right host or port?

Hi @HeIp! After doing a snap refresh it might take some time (hopefully a couple of seconds) before your cluster is responsive again. That's because the processes are being restarted (that includes API server). I suspect the errors that you're seeing are probably because the API server is not yet fully restarted. Have you tried again after a while?

HeIp commented

Hey @HomayoonAlimohammadi , seems to be pretty consistent :

admin@pc0:~$ microk8s kubectl get all --all-namespaces
E1222 00:11:56.656958    6580 memcache.go:265] "Unhandled Error" err="couldn't get current server API group list: Get \"https://127.0.0.1:16443/api?timeout=32s\": dial tcp 127.0.0.1:16443: connect: connection refused - error from a previous attempt: read tcp 127.0.0.1:36362->127.0.0.1:16443: read: connection reset by peer"
E1222 00:11:56.659595    6580 memcache.go:265] "Unhandled Error" err="couldn't get current server API group list: Get \"https://127.0.0.1:16443/api?timeout=32s\": dial tcp 127.0.0.1:16443: connect: connection refused"
E1222 00:11:56.661253    6580 memcache.go:265] "Unhandled Error" err="couldn't get current server API group list: Get \"https://127.0.0.1:16443/api?timeout=32s\": dial tcp 127.0.0.1:16443: connect: connection refused"
E1222 00:11:56.662852    6580 memcache.go:265] "Unhandled Error" err="couldn't get current server API group list: Get \"https://127.0.0.1:16443/api?timeout=32s\": dial tcp 127.0.0.1:16443: connect: connection refused"
E1222 00:11:56.664418    6580 memcache.go:265] "Unhandled Error" err="couldn't get current server API group list: Get \"https://127.0.0.1:16443/api?timeout=32s\": dial tcp 127.0.0.1:16443: connect: connection refused"
The connection to the server 127.0.0.1:16443 was refused - did you specify the right host or port?
admin@pc0:~$ snap refresh
error: access denied (try with sudo)
admin@pc0:~$ sdu osnap refresh
Command 'sdu' not found, did you mean:
  command 'ssu' from deb unifrac-tools (1.4-3)
  command 'sdc' from deb hpsockd (0.17+nmu1)
  command 'sd' from deb sd (1.0.0-2)
  command 'gdu' from deb gdu (5.25.0-1ubuntu0.24.04.1)
  command 'su' from deb util-linux (2.39.3-9ubuntu6.1)
  command 'du' from deb coreutils (9.4-2ubuntu2)
  command 'xdu' from deb xdu (3.0-20)
  command 'sdf' from deb sdf (2.001+1-9)
  command 'sds' from deb simh (3.8.1-6.1)
  command 'mdu' from deb mtools (4.0.43-1)
Try: sudo apt install <deb name>
admin@pc0:~$ sudo snap refresh
All snaps up to date.
admin@pc0:~$ microk8s kubectl get all --all-namespaces
E1222 00:12:55.492430    7366 memcache.go:265] "Unhandled Error" err="couldn't get current server API group list: Get \"https://127.0.0.1:16443/api?timeout=32s\": net/http: TLS handshake timeout"
E1222 00:13:13.259125    7366 memcache.go:265] "Unhandled Error" err="couldn't get current server API group list: Get \"https://127.0.0.1:16443/api?timeout=32s\": net/http: TLS handshake timeout - error from a previous attempt: read tcp 127.0.0.1:39150->127.0.0.1:16443: read: connection reset by peer"
E1222 00:13:23.262886    7366 memcache.go:265] "Unhandled Error" err="couldn't get current server API group list: Get \"https://127.0.0.1:16443/api?timeout=32s\": net/http: TLS handshake timeout"
E1222 00:13:24.913705    7366 memcache.go:265] "Unhandled Error" err="couldn't get current server API group list: Get \"https://127.0.0.1:16443/api?timeout=32s\": dial tcp 127.0.0.1:16443: connect: connection refused - error from a previous attempt: read tcp 127.0.0.1:57266->127.0.0.1:16443: read: connection reset by peer"
E1222 00:13:24.915324    7366 memcache.go:265] "Unhandled Error" err="couldn't get current server API group list: Get \"https://127.0.0.1:16443/api?timeout=32s\": dial tcp 127.0.0.1:16443: connect: connection refused"
The connection to the server 127.0.0.1:16443 was refused - did you specify the right host or port?

The command microk8s status --wait-ready also seems to just hang