Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Skaffold and kubectl version

Hi there,

The kubectl version (v1.20.0) bundled in the skaffold container image (gcr.io/k8s-skaffold/skaffold:v1.37.2-lts) used by Cloud Deploy is very old, I'm deploying to GKE v1.22+ clusters.

I'm attempting to use skaffold's kubectl flags:

    deploy:
      kubectl:
        flags:
          apply:
            - --prune

I realise --prune is an alpha option, however it's failing due to version skew issues e.g.:

error: error retrieving RESTMappings to prune: invalid resource extensions/v1beta1, Kind=Ingress, Namespaced=true: no matches for kind "Ingress" in version "extensions/v1beta1"

 Is there some way to have Cloud Deploy run with a kubectl version that's newer or ideally matches the target GKE cluster?

Thanks in advance!

Solved Solved
0 3 736
1 ACCEPTED SOLUTION

Thank you for the inquiry! Skaffold version 1.39.x LTS will include an updated kubectl to v1.22.0. As part of Google Cloud Deploy's next Skaffold version upgrade, the kubectl version will be updated as well as.

View solution in original post

3 REPLIES 3