minikube: Kubectl 1.8 broken for minikube - OpenAPI swagger file doesn't include `x-kubernetes-group-version-kind`

Environment:

Minikube version (use minikube version): v0.22.2

  • OS (e.g. from /etc/os-release): Linux
  • VM Driver (e.g. cat ~/.minikube/machines/minikube/config.json | grep DriverName): VirtualBox
  • ISO version (e.g. cat ~/.minikube/machines/minikube/config.json | grep -i ISO or minikube ssh cat /etc/VERSION): v0.23.4
  • Install tools:
  • Others:

What happened: Swagger doesn’t have x-kubernetes-group-version-kind while it should.

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

minikube start
kubectl proxy &
curl 127.0.0.1:8001/swagger.json | less
# Look for v1.Service definition, it doesn't have `x-kubernetes-group-version-kind` field

Output of minikube logs (if applicable):

Anything else do we need to know:

@pwittrock @mbohlool

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 16 (12 by maintainers)

Commits related to this issue

Most upvoted comments

I’ve backported the fix to previous versions of localkube, and it should be fixed for the default version in the next release

Found the problem after a long debugging 😃 Short Answer: This is the fix: https://github.com/kubernetes/kubernetes/pull/53152 and you need to update your vendor folder after this gets into 1.7 You should not have any problem with 1.8 as this fix is already there.

Longer Answer: We do use full package name as the name of the OpenAPI definitions. The OpenAPI generator take the vendoring folder into account but (in 1.7 code) the extension in staging/src/k8s.io/apiserver/pkg/endpoints/openapi/openapi.go did not. We were OK in kubernetes at the time, but when we moved packages out and vendor some part of APIs in, that became a problem and we fixed it in 1.8. All you need to do is to backport this fix (that seems safe and should not affect kubernetes itself at all) to 1.7 branch and update your vendor folder.