Skip to content

kubent reported API_VERSION is incorrect #662

Open
@evanstucker-hates-2fa

Description

@evanstucker-hates-2fa

When I run kubent I see this:
(Redacting excess output - don't judge our geriatric cluster, haha.)

$ kubent
4:16PM INF >>> Kube No Trouble `kubent` <<<
4:16PM INF version 0.7.3 (git sha 57480c07b3f91238f12a35d0ec88d9368aae99aa)
4:16PM INF Initializing collectors and retrieving data
4:16PM INF Target K8s version is 1.24.17-eks-7f9249a
4:17PM INF Retrieved 317 resources from collector name=Cluster
4:17PM INF Retrieved 233 resources from collector name="Helm v3"
4:17PM INF Loaded ruleset name=custom.rego.tmpl
4:17PM INF Loaded ruleset name=deprecated-1-16.rego
4:17PM INF Loaded ruleset name=deprecated-1-22.rego
4:17PM INF Loaded ruleset name=deprecated-1-25.rego
4:17PM INF Loaded ruleset name=deprecated-1-26.rego
4:17PM INF Loaded ruleset name=deprecated-1-27.rego
4:17PM INF Loaded ruleset name=deprecated-1-29.rego
4:17PM INF Loaded ruleset name=deprecated-1-32.rego
4:17PM INF Loaded ruleset name=deprecated-future.rego
...REDACTED...
__________________________________________________________________________________________
>>> Deprecated APIs removed in 1.25 <<<
------------------------------------------------------------------------------------------
KIND                      NAMESPACE               NAME                                            API_VERSION           REPLACE_WITH (SINCE)
...REDACTED...
CronJob                   db                      psql-backup                                     batch/v1beta1         batch/v1 (1.21.0)
...REDACTED...

However, that CronJob is not version batch/v1beta1, it's batch/v1:

$ k get cronjob -n db psql-backup -o json | jq .apiVersion
"batch/v1"

The only place I see v1beta1 is in the metadata annotations "kubectl.kubernetes.io/last-applied-configuration".

Is kubent grepping through output or actually looking at the apiVersion field?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions