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?

OKEのAPIサーバーにエラーで繋がらないとき

0
Last updated at Posted at 2025-07-03

はじめに

OKEの「クラスタへのアクセス」に沿ってkubectlのコンテキストを設定したあとに、以下のエラーが出た時の対処法

 % k get node
E0704 07:52:21.515161   11039 memcache.go:265] "Unhandled Error" err="couldn't get current server API group list: the server has asked for the client to provide credentials"
E0704 07:52:22.126459   11039 memcache.go:265] "Unhandled Error" err="couldn't get current server API group list: the server has asked for the client to provide credentials"
E0704 07:52:22.694498   11039 memcache.go:265] "Unhandled Error" err="couldn't get current server API group list: the server has asked for the client to provide credentials"
E0704 07:52:23.268497   11039 memcache.go:265] "Unhandled Error" err="couldn't get current server API group list: the server has asked for the client to provide credentials"
E0704 07:52:23.857705   11039 memcache.go:265] "Unhandled Error" err="couldn't get current server API group list: the server has asked for the client to provide credentials"
error: You must be logged in to the server (the server has asked for the client to provide credentials)

対処法

私の環境は.oci/configファイルに複数のプロファイルが設定されてるので、OKEがあるテナンシーのプロファイルを環境変数に設定する。

% export OCI_CLI_PROFILE=tenancy-oke
% k get node
NAME          STATUS   ROLES   AGE   VERSION
10.0.10.200   Ready    node    56d   v1.31.1

以降は確認してないが、configファイルが.oci/configではないならOCI_CLI_CONFIG_FILEを設定するなど、OCI CLIの環境変数がデフォルトとは違う場合は環境変数を設定する必要がある(と思う。)

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?