Issues with Accessing Kubernetes API v3 after Upgrade – Cannot Fetch OpenAPI

Hi everyone,

After upgrading my Kubernetes cluster to version 1.32, I’m running into an issue where I’m unable to fetch the OpenAPI v3 schema. The view.kubernetes.io/docs/concepts/overview/kubernetes-api/ mentions that v3 is enabled by default, but when I try to access the endpoint /openapi/v3, I’m getting a 404 error. Here’s the command I’m running:

curl -X GET https://<cluster-url>/openapi/v3

The error response is:

{
  "message": "Not Found",
  "status": 404
}

I’ve double-checked the cluster settings, and the Kubernetes API server seems to be running fine. I also confirmed that API v2 is accessible at /openapi/v2.

Could this be an issue with the API server configuration or something related to API versioning? Any help in troubleshooting this would be appreciated!

Thanks!

In Kubernetes 1.32, the OpenAPI v3 endpoint may require explicit enabling. Try these steps:

  1. Check API Server Flags – Ensure the API server is started with --feature-gates=OpenAPIV3=true.
  2. Verify API Discovery – Run kubectl get --raw / to confirm /openapi/v3 is listed.
  3. Check RBAC Permissions – Ensure your user has get permissions on openapi. Test with:
    kubectl auth can-i get openapi --as=<your-user>
    
  4. Restart API Server – If the feature was enabled post-upgrade, a restart may be needed.

If the issue persists, check Kubernetes changelog and known issues for 1.32.