Kubernetes: Deployment API version apps/v1beta2 is being changed to extensions/v1beta1 on creation

Created on 27 Jan 2018  ·  3Comments  ·  Source: kubernetes/kubernetes

Is this a BUG REPORT or FEATURE REQUEST?:

/kind bug

What happened:

When I create an example Deployment found at kubernetes/website with api version apps/v1beta2, the api version I see when I perform kubectl get deploy nginx-deployment -o yaml is extensions/v1beta1.

What you expected to happen:

I expect the api version to be apps/v1beta2.

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

  • Use client version v1.9.1 and server version v1.8.4.
  • Create the example Nginx Deployment file:
    Bash kubectl create -f https://raw.githubusercontent.com/kubernetes/website/snapshot-final-v1.8/docs/tasks/run-application/deployment.yaml
  • Check that the api version is apps/v1beta2 (which it isn't):
    Bash kubectl get deploy nginx-deployment -o yaml | grep apiVersion

Anything else we need to know?:

Not that I can think of.

Environment:

  • Kubernetes version (use kubectl version):

Bash Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.1", GitCommit:"3a1c9449a956b6026f075fa3134ff92f7d55f812", GitTreeState:"clean", BuildDate:"2018-01-04T11:52:23Z", GoVersion:"go1.9.2", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"8", GitVersion:"v1.8.4", GitCommit:"9befc2b8928a9426501d3bf62f72849d5cbcd5a3", GitTreeState:"clean", BuildDate:"2017-11-20T05:17:43Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}

  • Cloud provider or hardware configuration:

    AWS, deployed via kops v1.8.0 (git-5099bc5)

  • OS (e.g. from /etc/os-release): ~

  • Kernel (e.g. uname -a): ~

  • Install tools:

    kops v1.8.0 (git-5099bc5)

  • Others: ~

kinbug needs-sig

Most helpful comment

That's confusing. I would think that it would return the version that I uploaded or the latest version of deployments the server is capable of returning.

Anyways, thanks!

All 3 comments

@sean-krail: There are no sig labels on this issue. Please add a sig label.

A sig label can be added by either:

  1. mentioning a sig: @kubernetes/sig-<group-name>-<group-suffix>
    e.g., @kubernetes/sig-contributor-experience-<group-suffix> to notify the contributor experience sig, OR

  2. specifying the label manually: /sig <group-name>
    e.g., /sig scalability to apply the sig/scalability label

Note: Method 1 will trigger an email to the group. See the group list.
The <group-suffix> in method 1 has to be replaced with one of these: _bugs, feature-requests, pr-reviews, test-failures, proposals_

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

kubectl get deployment without qualification gets the first version of deployments the server indicates it is capable of returning.

The deployment you created can be retrieved in any of the supported versions. To get a specific group or version, fully qualify your get request:

kubectl get deployment.apps …
kubectl get deployment.v1beta2.apps …

/close

That's confusing. I would think that it would return the version that I uploaded or the latest version of deployments the server is capable of returning.

Anyways, thanks!

Was this page helpful?
0 / 5 - 0 ratings