diff --git a/examples/kubectl-container/Makefile b/examples/kubectl-container/Makefile index 3383644f14c..e3b21a5b293 100644 --- a/examples/kubectl-container/Makefile +++ b/examples/kubectl-container/Makefile @@ -27,7 +27,7 @@ kubectl: cp ../../_output/local/bin/$(GOOS)/$(GOARCH)/kubectl . .tag: kubectl - ./kubectl version -c | grep -o 'GitVersion:"[^"]*"' | cut -f 2 -d '"' > .tag + ./kubectl version --client | grep -o 'GitVersion:"[^"]*"' | sed 's/[^"]*"\([^"+]*\).*/\1/' > .tag tag: .tag @echo "Suggest using TAG=$(shell cat .tag)"