eksup icon indicating copy to clipboard operation
eksup copied to clipboard

Report on deprecated API usage

Open bryantbiggs opened this issue 2 years ago • 1 comments

Use case

Detecting and reporting on deprecated/removed Kubernetes API versions is one of the largest concerns of upgrading Kubernetes clusters. While users may be aware of what APIs are deprecated or removed, identifying if any of those APIs are in use in the cluster is a much more challenging task.

Solution/User Experience

Use the apiserve_requested_deprecated_apis metric to detect usage of deprecated APIs - https://kubernetes.io/blog/2020/09/03/warnings/ - https://github.com/kubernetes/enhancements/tree/master/keps/sig-api-machinery/1693-warnings - https://github.com/kube-rs/kube/issues/492 for implementation

Alternative solutions

  • For now, pluto or kubent are recommended to check for deprecated APIs
    • Add section on how those tools work, what to watch out for (asking the API Server is not trustworthy, scanning manifests directly is the most accurate)
    • https://github.com/clowdhaus/r8s#r8s

bryantbiggs avatar Feb 07 '23 00:02 bryantbiggs

In addition to the tools listed above, and the apiserve_requested_deprecated_apis metric, eksup should provide the ability to identify API calls made using a deprecated/removed API from the API server logs stored in CloudWatch

The results then would be composed of 3 parts

  1. Results from the last applied config
  2. Results from apiserve_requested_deprecated_apis metrics
  3. Results from API server cloudwatch logs (will have to determine how far back to search - 30 days, 60 days, configurable?)

bryantbiggs avatar Feb 28 '23 15:02 bryantbiggs