如何找到microk8s当前安装的频道

How to find the currently installed channel for microk8s

microk8s 已安装在 ubuntu 机器上。查找当前安装频道的命令行是什么?

你可以试试下面的,这会显示所有 versions/channels,在底部你可以看到版本,在 o/p 之间的某处,有一个 tracking 字段如下所示,它应该表示通道快照正在跟踪(你安装的)。

snap info microk8s

输出:

 snap-id:     xxxxxxxxxxxxxxxxxxxxxxxxxx
tracking:     1.19/edge
refresh-date: today at 17:49 IST
  1.16/beta:        v1.16.15 2020-09-04 (1671) 179MB classic
  1.16/edge:        v1.16.15 2020-09-02 (1671) 179MB classic
  1.15/stable:      v1.15.11 2020-03-27 (1301) 171MB classic
  1.15/candidate:   v1.15.11 2020-03-27 (1301) 171MB classic
  1.15/beta:        v1.15.11 2020-03-27 (1301) 171MB classic
  1.15/edge:        v1.15.11 2020-03-26 (1301) 171MB classic
  1.14/stable:      v1.14.10 2020-01-06 (1120) 217MB classic
  1.14/candidate:   ^                                
  1.14/beta:        ^                                
  1.14/edge:        v1.14.10 2020-03-26 (1303) 217MB classic
  1.13/stable:      v1.13.6  2019-06-06  (581) 237MB classic
  1.13/candidate:   ^                                
  1.13/beta:        ^                                
  1.13/edge:        ^                                
  1.12/stable:      v1.12.9  2019-06-06  (612) 259MB classic
  1.12/candidate:   ^                                
  1.12/beta:        ^                                
  1.12/edge:        ^                                
  1.11/stable:      v1.11.10 2019-05-10  (557) 258MB classic
  1.11/candidate:   ^                                
  1.11/beta:        ^                                
  1.11/edge:        ^                                
  1.10/stable:      v1.10.13 2019-04-22  (546) 222MB classic
  1.10/candidate:   ^                                
  1.10/beta:        ^                                
  1.10/edge:        ^                                
installed:          v1.20.5             (2094) 218MB classic

参考:https://microk8s.io/docs/setting-snap-channel