6

I attempted to migrate my cluster and I get the Migrate to updated APIs to upgrade to v1.22. error in GCP Control Panel: GCP Screenshot

It list that I have called the following APIs:

/apis/networking.k8s.io/v1beta1/ingresses
/apis/extensions/v1beta1/ingresses
/apis/networking.k8s.io/v1beta1/ingressclasses
/apis/admissionregistration.k8s.io/v1beta1/validatingwebhookconfigurations

But the last time I called them was 2 days ago which is when I started attempting to upgrade and I have removed references to them in my terraform scripts.

I have ran kubent and this is the output from it:

$ /usr/local/bin/kubent
11:03AM INF >>> Kube No Trouble `kubent` <<<
11:03AM INF version 0.5.1 (git sha )
11:03AM INF Initializing collectors and retrieving data
11:03AM INF Target K8s version is 1.22.8-gke.202
11:03AM INF Retrieved 161 resources from collector name=Cluster
11:03AM INF Retrieved 0 resources from collector name="Helm v2"
11:03AM INF Retrieved 19 resources from collector name="Helm v3"
11:03AM INF Loaded ruleset name=custom.rego.tmpl
11:03AM INF Loaded ruleset name=deprecated-1-16.rego
11:03AM INF Loaded ruleset name=deprecated-1-22.rego
11:03AM INF Loaded ruleset name=deprecated-1-25.rego
__________________________________________________________________________________________
>>> Deprecated APIs removed in 1.22 <<<
------------------------------------------------------------------------------------------
KIND                       NAMESPACE     NAME                                           API_VERSION                    REPLACE_WITH (SINCE)
CustomResourceDefinition   <undefined>   capacityrequests.internal.autoscaling.k8s.io   apiextensions.k8s.io/v1beta1   apiextensions.k8s.io/v1 (1.16.0)
CustomResourceDefinition   <undefined>   globalbgpconfigs.crd.projectcalico.org         apiextensions.k8s.io/v1beta1   apiextensions.k8s.io/v1 (1.16.0)
CustomResourceDefinition   <undefined>   globalfelixconfigs.crd.projectcalico.org       apiextensions.k8s.io/v1beta1   apiextensions.k8s.io/v1 (1.16.0)
CustomResourceDefinition   <undefined>   scalingpolicies.scalingpolicy.kope.io          apiextensions.k8s.io/v1beta1   apiextensions.k8s.io/v1 (1.16.0)
Ingress                    elastic       kibana-kibana                                  networking.k8s.io/v1beta1      networking.k8s.io/v1 (1.19.0)
__________________________________________________________________________________________
>>> Deprecated APIs removed in 1.25 <<<
------------------------------------------------------------------------------------------
KIND                  NAMESPACE     NAME                       API_VERSION      REPLACE_WITH (SINCE)
PodDisruptionBudget   elastic       elasticsearch-master-pdb   policy/v1beta1   policy/v1 (1.21.0)
PodSecurityPolicy     <undefined>   gce.gke-metrics-agent      policy/v1beta1   <removed> (1.21.0)

As far as I can tell those APIs aren't used anywhere in my code. The only reference to them that I can find is in a jar for the fabric8 dependency. They have kept both v1beta1 and the new v1 for backward compatibility.

Is it possible since that's in the jar for the dependency to be preventing me from upgrading, even tho I am not using it? If that's the case is there anything I can do to upgrade the version?

1 Answers1

5

I have the same issue with migration to 1.22.

I've taken a look from the object browser in GCP.

capacityrequests.internal.autoscaling.k8s.io contains metadata apiVersion for both v1beta1 and the new v1. I think this might be why Kubent marks this as deprecated.

However, in the GCP warning, this API is not mentioned, so I guess GCP does not count this.