Upgrade to OpenShift 4.12 / Administrator Acknowledgment

OpenShift Container Platform 4.12 uses Kubernetes 1.25, which removed a significant number of deprecated v1beta1 APIs. A manual acknowledgment must be provided before the cluster can be upgraded to 4.12.

More information can be found in access.redhat.com/articles/6955381.

Upgrade to 4.12

  1. Check requests to removed APIs

    kubectl get apirequestcounts \
      --as=cluster-admin \
      -o jsonpath='{range .items[?(@.status.removedInRelease!="")]}{.status.removedInRelease}{"\t"}{.metadata.name}{"\t"}{.status.requestCount}{"\n"}{end}'

    Should print a report like the sample below. The last column is requests in the last 24 hours.

    1.25    cronjobs.v1beta1.batch  0
    1.25    poddisruptionbudgets.v1beta1.policy     0
    1.25    podsecuritypolicies.v1beta1.policy      462

    If you see counts > 0 you can check from whom the API calls are originating.

    kubectl get apirequestcounts customresourcedefinitions.v1beta1.apiextensions.k8s.io \
      --as=cluster-admin \
      -o jsonpath='{range ..username}{$}{"\n"}{end}' \
      | sort | uniq

    Some services autodiscover supported APIs, notably kube-controller-manager (system:kube-controller-manager) and ArgoCD (system:serviceaccount:syn:argocd-application-controller). These services will show up as using deprecated APIs.

    More advanced query: Show only resources with create and update requests.

    kubectl --as=cluster-admin get apirequestcount -ojson | jq '
        .items[] |
            select(
                .status.removedInRelease == "1.25" and .status.requestCount > 0
            ) |
            {
                resource: .metadata.name,
                requests: (
                    reduce .status.last24h[] as $hour ({"requests": 0}; .requests += (
                        reduce $hour.byNode[]? as $node ({"requests": 0}; .requests += (
                            reduce $node.byUser[]? as $user ({"requests": 0}; .requests += (
                                reduce $user.byVerb[]? as $verb (0; . + (
                                    if $verb.verb == "watch" or $verb.verb == "list" or $verb.verb == "get" then
                                        0
                                    else
                                        $verb.requestCount
                                    end
                                ))
                            ))
                        ).requests)
                    ).requests)
                ).requests
            }
    '
  2. Provide the Acknowledgment

    kubectl patch cm admin-acks \
      --as=cluster-admin \
      -n openshift-config \
      --patch '{"data":{"ack-4.11-kube-1.25-api-removals-in-4.12":"true"}}' \
      --type=merge
  3. Upgrade the cluster

    Set the desired minor version in openshift_upgrade_controller.cluster_version.openshiftVersion.Minor. The ugprade controller will use this upgrade channel in the next maintenance window.