kubernetes: kubectl 1.8 cannot validate simple namespace yml
Is this a BUG REPORT or FEATURE REQUEST?:
/kind bug
What happened:
kubectl
1.8.0 fails to validate a simple namespace yml:
apiVersion: v1
kind: Namespace
metadata:
name: foo
Same problem if I use json (which is how I first noticed, it trying to restore from a get ns -ojson --export
)
What you expected to happen:
kubectl
to validate and pass it on to the cluster
How to reproduce it (as minimally and precisely as possible):
- Create
foo.yml
with the content above kubectl apply -f foo.yml
(orcreate
if you prefer) withkubectl
1.8.0 - it fails validationkubectl apply -f foo.yml
withkubectl
1.7.5 - it works
Anything else we need to know?:
Environment:
- Kubernetes version (use
kubectl version
):
Client Version: version.Info{Major:"1", Minor:"8", GitVersion:"v1.8.0", GitCommit:"6e937839ac04a38cac63e6a7a306c5d035fe7b0a", GitTreeState:"clean", BuildDate:"2017-09-28T22:57:57Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.0", GitCommit:"d3ada0119e776222f11ec7945e6d860061339aad", GitTreeState:"clean", BuildDate:"2017-07-26T00:12:31Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
For the working 1.7.5:
Client Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.5", GitCommit:"17d7182a7ccbb167074be7a87f0a68bd00d58d97", GitTreeState:"clean", BuildDate:"2017-08-31T09:14:02Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.0", GitCommit:"d3ada0119e776222f11ec7945e6d860061339aad", GitTreeState:"clean", BuildDate:"2017-07-26T00:12:31Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
- Cloud provider or hardware configuration**:
Running on minikube to replicate
- OS (e.g. from /etc/os-release):
From minikube:
$ cat /etc/os-release
NAME=Buildroot
VERSION=2017.02
ID=buildroot
VERSION_ID=2017.02
PRETTY_NAME="Buildroot 2017.02"
- Kernel (e.g.
uname -a
):
$ uname -a
Linux minikube 4.9.13 #1 SMP Tue Jul 18 22:17:02 UTC 2017 x86_64 GNU/Linux
- Install tools:
minikube
- Others:
Summary:
/tmp # cat foo.yml
apiVersion: v1
kind: Namespace
metadata:
name: foo
/tmp # kubectl175 apply -f foo.yml
namespace "foo" configured
/tmp # kubectl180 apply -f foo.yml
error: error validating "foo.yml": error validating data: unknown object type schema.GroupVersionKind{Group:"", Version:"v1", Kind:"Namespace"}; if you choose to ignore these errors, turn validation off with --validate=false
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 14
- Comments: 23 (14 by maintainers)
Commits related to this issue
- Pin Kubernetes version in end-to-end testing to avoid regression in v1.8 See https://github.com/kubernetes/kubernetes/issues/53309 — committed to honeycombio/honeycomb-kubernetes-agent by emfree 7 years ago
- Pin Kubernetes version in end-to-end testing to avoid regression in v1.8 See https://github.com/kubernetes/kubernetes/issues/53309 — committed to honeycombio/honeycomb-kubernetes-agent by emfree 7 years ago
- Pin Kubernetes version in end-to-end testing to avoid regression in v1.8 See https://github.com/kubernetes/kubernetes/issues/53309 — committed to honeycombio/honeycomb-kubernetes-agent by emfree 7 years ago
- Pin Kubernetes version in end-to-end testing to avoid regression in v1.8 See https://github.com/kubernetes/kubernetes/issues/53309 — committed to honeycombio/honeycomb-kubernetes-agent by emfree 7 years ago
- Pin Kubernetes version in end-to-end testing to avoid regression in v1.8 See https://github.com/kubernetes/kubernetes/issues/53309 — committed to honeycombio/honeycomb-kubernetes-agent by emfree 7 years ago
Downgrading
kubectl
tov1.7.8
worked for me.Check your version afterwards:
Same problem here. Versions are same as with @lordoffreaks
FYI, did look for an open similar bug, no luck.
Same problem here, it’s happening for all the entities … validation fails for
services
anddeployments
at leastsAnd all working fine in latest minikube version as well:
Basically yml/json validation in
kubectl
1.8.0 is broken completely. A test or two missed, I guess.Someone from the @kubernetes/sig-cli-bugs team can address?
I think it is asking for trouble. I don’t mind using it in minikube, but no way I am doing that with a more-important cluster.
In any case, this really shouldn’t fail.
I downloaded
kubectl
version v1.7.7 even that helps!