kubernetes api_version_error ai_generated true

error: unable to recognize: no matches for kind "X" in version "v1alpha1"

ID: kubernetes/crd-version-not-served

Also available as: JSON · Markdown
88%Fix Rate
90%Confidence
50Evidence
2023-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
8 active

Root Cause

CRD API version deprecated or not served. Cluster upgraded and old API version removed.

generic

Workarounds

  1. 95% success Update the apiVersion in your manifests to the current served version
    # Old: apiVersion: extensions/v1beta1
    # New: apiVersion: apps/v1

    Sources: https://kubernetes.io/docs/reference/using-api/deprecation-policy/

  2. 88% success Use kubectl convert to migrate manifests: kubectl convert -f old.yaml --output-version apps/v1
    kubectl convert -f old.yaml --output-version apps/v1

    Sources: https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/

  3. 85% success Check deprecation notices: kubectl api-resources to see current API groups
    kubectl api-resources to see current API groups

    Sources: https://kubernetes.io/docs/reference/using-api/deprecation-policy/

Dead Ends

Common approaches that don't work:

  1. Downgrade the cluster 85% fail

    Dangerous and loses features from newer versions

  2. Force apply with --validate=false 80% fail

    Bypasses validation but API server still rejects the version

Error Chain

Frequently confused with: