はじめに
k3dの環境を構築したところ私の環境ではエラーがでてしまい気になったのでまとめます
問題
k3dでクラスターを作成してkubectl get po
をしたところエラーがでました
E0406 10:16:14.156000 1794 memcache.go:287] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request
E0406 10:16:14.231443 1794 memcache.go:121] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request
E0406 10:16:14.233014 1794 memcache.go:121] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request
E0406 10:16:14.234844 1794 memcache.go:121] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request
解決方法
以下のコマンドで一度クラスターを削除して、再作成したところうまくいきました
$ k3d delete cluster
$ curl -sfL https://get.k3s.io |INSTALL_K3S_EXEC="--disable traefik --disable local-storage --node-name hkm.int.h.net --node-ip 192.168.151.10 server --node-taint CriticalAddonsOnly=true:NoExecute" sh -
$ k3d create cluster
おわりに
うまくいったのですが、構築した瞬間は同じエラーが出ていました
なぜか時間がたつと消えていたのでターミナルを新しくしてみるとよいかもしれないです
参考