Add k8s version check to kustomize deployer
Run the same check as the kubectl deployer
@@ -26,6 +26,7 @@ import (
yaml "gopkg.in/yaml.v2"
"github.com/GoogleContainerTools/skaffold/pkg/skaffold/build"
+ "github.com/GoogleContainerTools/skaffold/pkg/skaffold/color"
"github.com/GoogleContainerTools/skaffold/pkg/skaffold/constants"
"github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/kubectl"
"github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest"
@@ -80,6 +81,11 @@ func (k *KustomizeDeployer) Labels() map[string]string {
// Deploy runs `kubectl apply` on the manifest generated by kustomize.
func (k *KustomizeDeployer) Deploy(ctx context.Context, out io.Writer, builds []build.Artifact) ([]Artifact, error) {
+ color.Default.Fprintln(out, "kubectl client version:", k.kubectl.Version())
+ if err := k.kubectl.CheckVersion(); err != nil {
+ color.Default.Fprintln(out, err)
+ }
+
manifests, err := k.readManifests(ctx)
if err != nil {
return nil, errors.Wrap(err, "reading manifests")
