Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.9 bug] v1.List error: unable to recognize apps/v1, Kind=DaemonSet: no matches for apps/, Kind=DaemonSet #58179

Closed
resouer opened this issue Jan 12, 2018 · 4 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. milestone/incomplete-labels priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. sig/apps Categorizes an issue or PR as relevant to SIG Apps.

Comments

@resouer
Copy link
Contributor

resouer commented Jan 12, 2018

Is this a BUG REPORT or FEATURE REQUEST?:
/kind bug

What happened:

apiVersion: v1
kind: List
items:
  - apiVersion: v1
    kind: ServiceAccount
    ...
  - apiVersion: extensions/v1beta1
    # BUG(harry): can not use apps/v1 here since v1.List does not support apps/v1. It should be fixed in upstream.
    kind: DaemonSet

What you expected to happen:

Should be able to use - apiVersion: apps/v1 in v1.List object.

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

Create a v1.List in 1.9 cluster with DaemonSet

Anything else we need to know?:

Environment:

  • Kubernetes version (use kubectl version): Kubernetes 1.9.0
  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools: scripts
  • Others:
@resouer resouer added the sig/apps Categorizes an issue or PR as relevant to SIG Apps. label Jan 12, 2018
@resouer resouer added this to the v1.9 milestone Jan 12, 2018
@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels Jan 12, 2018
@resouer resouer removed this from the v1.9 milestone Jan 12, 2018
@kubernetes kubernetes deleted a comment from k8s-github-robot Jan 12, 2018
@liggitt
Copy link
Member

liggitt commented Jan 13, 2018

cannot recreate this:

list.yaml:

apiVersion: v1
kind: List
items:
- apiVersion: v1
  kind: ServiceAccount
  metadata:
    name: sa
- apiVersion: apps/v1
  kind: DaemonSet
  metadata:
    name: ds
  spec:
    selector:
      matchLabels:
        foo: bar
    template:
      metadata:
        name: ds-pod
        labels:
          foo: bar
      spec:
        containers:
        - name: c
          image: busybox
$ kubectl version -o json
{
  "clientVersion": {
    "major": "1",
    "minor": "9",
    "gitVersion": "v1.9.0",
    "gitCommit": "925c127ec6b946659ad0fd596fa959be43f0cc05",
    "gitTreeState": "clean",
    "buildDate": "2018-01-13T07:11:58Z",
    "goVersion": "go1.9.2",
    "compiler": "gc",
    "platform": "darwin/amd64"
  },
  "serverVersion": {
    "major": "1",
    "minor": "9",
    "gitVersion": "v1.9.0",
    "gitCommit": "925c127ec6b946659ad0fd596fa959be43f0cc05",
    "gitTreeState": "clean",
    "buildDate": "2018-01-13T07:11:58Z",
    "goVersion": "go1.9.2",
    "compiler": "gc",
    "platform": "darwin/amd64"
  }
}

$ kubectl create -f list.yaml --v=6
I0113 02:15:01.363925   99357 decoder.go:224] decoding stream as YAML
I0113 02:15:01.384853   99357 round_trippers.go:436] POST https://localhost:6443/api/v1/namespaces/default/serviceaccounts 201 Created in 16 milliseconds
serviceaccount "sa" created
I0113 02:15:01.412270   99357 round_trippers.go:436] POST https://localhost:6443/apis/apps/v1/namespaces/default/daemonsets 201 Created in 23 milliseconds
daemonset "ds" created

@resouer
Copy link
Contributor Author

resouer commented Jan 14, 2018

That's weird, I will test it on more clusters and feed back soon.

@liggitt
Copy link
Member

liggitt commented Jan 16, 2018

Closing since this isn't recreatable. Please reopen with more details if you can reproduce

/close

@chrissound
Copy link

chrissound commented Jun 4, 2018

I0604 10:47:38.019536   24351 loader.go:357] Config loaded from file /home/chris/.kube/config
I0604 10:47:38.110420   24351 round_trippers.go:436] GET https://35.189.227.220/swagger-2.0.0.pb-v1 304 Not Modified in 86 milliseconds
I0604 10:47:38.186463   24351 decoder.go:224] decoding stream as YAML
I0604 10:47:38.210341   24351 round_trippers.go:436] POST https://35.189.227.220/apis/apps/v1beta2/namespaces/kube-system/daemonsets 400 Bad Request in 16 milliseconds
I0604 10:47:38.211209   24351 helpers.go:201] server response object: [{
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {},
  "status": "Failure",
  "message": "error when creating \"redis.yaml\": DaemonSet in version \"v1\" cannot be handled as a DaemonSet: no kind \"DaemonSet\" is registered for version \"apps/v1\"",
  "reason": "BadRequest",
  "code": 400
}]
F0604 10:47:38.211261   24351 helpers.go:119] Error from server (BadRequest): error when creating "redis.yaml": DaemonSet in version "v1" cannot be handled as a DaemonSet: no kind "DaemonSet" is registered for version "apps/v1"

https://stackoverflow.com/questions/50678799/daemonset-in-version-v1-cannot-be-handled-as-a-daemonset-no-kind-daemonset

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. milestone/incomplete-labels priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. sig/apps Categorizes an issue or PR as relevant to SIG Apps.
Projects
None yet
Development

No branches or pull requests

5 participants