0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

microk8sが再起動しなかったので対処した話 (小話)

Posted at

ついさっきまで動いていたクラスターを再起動しようとしたらなぜか起動しない
という怪奇現象におそわれた

microk8s.start
microk8s.status
microk8s is not running. Use microk8s.inspect for a deeper inspection.

詳しくみてみると

microk8s kubectl get job
E0303 18:23:45.450410   14519 memcache.go:238] couldn't get current server API group list: Get "https://xxx.xxx.xxx.xxx:16443/api?timeout=32s": x509: certificate has expired or is not yet valid: current time 2025-03-03T18:23:45+09:00 is after 2025-02-20T06:31:52Z
E0303 18:23:45.458548   14519 memcache.go:238] couldn't get current server API group list: Get "https://xxx.xxx.xxx.xxx:16443/api?timeout=32s": x509: certificate has expired or is not yet valid: current time 2025-03-03T18:23:45+09:00 is after 2025-02-20T06:31:52Z
E0303 18:23:45.465572   14519 memcache.go:238] couldn't get current server API group list: Get "https://xxx.xxx.xxx.xxx:16443/api?timeout=32s": x509: certificate has expired or is not yet valid: current time 2025-03-03T18:23:45+09:00 is after 2025-02-20T06:31:52Z
E0303 18:23:45.473846   14519 memcache.go:238] couldn't get current server API group list: Get "https://xxx.xxx.xxx.xxx:16443/api?timeout=32s": x509: certificate has expired or is not yet valid: current time 2025-03-03T18:23:45+09:00 is after 2025-02-20T06:31:52Z
E0303 18:23:45.481143   14519 memcache.go:238] couldn't get current server API group list: Get "https://xxx.xxx.xxx.xxx:16443/api?timeout=32s": x509: certificate has expired or is not yet valid: current time 2025-03-03T18:23:45+09:00 is after 2025-02-20T06:31:52Z
Unable to connect to the server: x509: certificate has expired or is not yet valid: current time 2025-03-03T18:23:45+09:00 is after 2025-02-20T06:31:52Z

となっていた
どうもこれは証明書の有効期限らしいがデフォルトで2yと微妙に気づきにくい時間に設定されていたので対処に時間がかかってしまった

以下のように更新したら治った

sudo microk8s refresh-certs -c
sudo microk8s refresh-certs -e ca.crt
sudo microk8s refresh-certs -e front-proxy-client.crt

microk8s kubectl get po -n kube-system

参考
Renew Certificate in MicroK8S Cluster

Kubernetesクラスターでkubectlが通らなくなった【証明書期限切れ】

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?