EKS コントロールプレーンの API サーバーのログを眺めてみた

AWS
AWS
この記事は約6分で読めます。

EKS クラスターのコントロールプレーンのログ記録を行なったので、実際にどのようなログが出力されているかを眺めてみました。

Amazon EKS control plane logging - Amazon EKS
Learn how to configure logging for your Amazon EKS cluster.

API サーバーログ

EKS クラスターの API サーバーは、Kubernetes API を公開するコントロールプレーンのコンポーネントです。
ログには、API サーバー起動に使用された API サーバーフラグが含まれます。

最初のログです。

W0219 11:18:00.860236      10 feature_gate.go:237] Setting GA feature gate CSIServiceAccountToken=true. It will be removed in a future release.
W0219 11:18:00.861536      10 feature_gate.go:237] Setting GA feature gate TTLAfterFinished=true. It will be removed in a future release.
Flag --enable-logs-handler has been deprecated, This flag will be removed in v1.19
Flag --service-account-api-audiences has been deprecated, Use --api-audiences
Flag --logtostderr has been deprecated, will be removed in a future release, see https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/2845-deprecate-klog-specific-flags-in-k8s-components


feature gate (特定の機能を有効・無効にする機能)に GA を設定しているということでしょうか。
その後のログは、API サーバー起動時に使用されたフラグが続きます。

フラグが終わると、バージョンが表示されました。

I0219 11:18:00.864041      10 server.go:158] Version: v1.24.8-eks-ffeb93d

その後、設定やロードに関するログが続きます。

I0219 11:18:00.864059      10 server.go:160] "Golang settings" GOGC="" GOMAXPROCS="" GOTRACEBACK=""
I0219 11:18:00.869503      10 dynamic_serving_content.go:113] "Loaded a new cert/key pair" name="serving-cert::/etc/kubernetes/pki/apiserver.crt::/etc/kubernetes/pki/apiserver.key"
I0219 11:18:02.036215      10 dynamic_cafile_content.go:119] "Loaded a new CA Bundle and Verifier" name="client-ca-bundle::/etc/kubernetes/pki/internal-auth/ca.crt"
I0219 11:18:02.036336      10 dynamic_cafile_content.go:119] "Loaded a new CA Bundle and Verifier" name="request-header::/etc/kubernetes/pki/front-proxy-ca.crt"
I0219 11:18:02.042243      10 shared_informer.go:255] Waiting for caches to sync for node_authorizer
I0219 11:18:02.045250      10 audit.go:350] Using audit backend: ignoreErrors<log>
I0219 11:18:02.046577      10 plugins.go:158] Loaded 14 mutating admission controller(s) successfully in the following order: NamespaceLifecycle,LimitRanger,ServiceAccount,NodeRestriction,TaintNodesByCondition,PodSecurityPolicy,Priority,DefaultTolerationSeconds,ExtendedResourceToleration,DefaultStorageClass,StorageObjectInUseProtection,RuntimeClass,DefaultIngressClass,MutatingAdmissionWebhook.

同じようなログが続くので飛ばします。
クラスターを起動後の設定が終わったのか、その後は以下のようなログが定期的に出ていました。

I0219 11:23:23.287991      10 cacher.go:745] cacher (*coordination.Lease): 1 objects queued in incoming channel.

API サーバーは EKS が管理しているので、ログを確認すべきユースケースがどのようなときかわかりませんが、エラーが出力されていたらすぐに特定できそうです。
アドオンとかのバージョンが異なるために API サーバとうまく通信できない時などに見ると、エラーが表示されていたりするのでしょうか。

タイトルとURLをコピーしました