You can use the control plane logging feature for Amazon EKS clusters to view the API server flags that were enabled when a cluster was created. For more information, see Amazon EKS control plane logging. This topic shows you how to view the API server flags for an Amazon EKS cluster in the Amazon CloudWatch console.
When a cluster is first created, the initial API server logs include the flags that were used to start the API server. If you enable API server logs when you launch the cluster, or shortly thereafter, these logs are sent to CloudWatch Logs and you can view them there.
To view API server flags for a cluster
-
If you have not already done so, enable API server logs for your Amazon EKS cluster.
-
Open the Amazon EKS console at https://console.aws.amazon.com/eks/home#/clusters.
-
Choose the name of the cluster to display your cluster information.
-
Under Logging, choose Update.
-
For API server, make sure that the log type is Enabled.
-
Choose Update to finish.
-
-
In the Amazon EKS console, scroll down to the Logging section of the cluster detail page. Choose the link under CloudWatch to open the CloudWatch console page for your cluster's logs.
-
In the list of log streams, find the earliest version of the
kube-apiserver-example-ID-288ec988b77a59d70ec77
log stream. Use the Last Event Time column to determine the log stream ages. -
Scroll up to the earliest events (the beginning of the log stream). You should see the initial API server flags for the cluster.
Note
If you don't see the API server logs at the beginning of the log stream, then it is likely that the API server log file was rotated on the server before you enabled API server logging on the server. Any log files that are rotated before API server logging is enabled cannot be exported to CloudWatch.
However, you can create a new cluster with the same Kubernetes version and enable the API server logging when you create the cluster. Clusters with the same platform version have the same flags enabled, so your flags should match the new cluster's flags. When you finish viewing the flags for the new cluster in CloudWatch, you can delete the new cluster.