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

batch cronjobs , matches multiple kinds #61586

Closed
sekaiga opened this issue Mar 23, 2018 · 10 comments
Closed

batch cronjobs , matches multiple kinds #61586

sekaiga opened this issue Mar 23, 2018 · 10 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. sig/cli Categorizes an issue or PR as relevant to SIG CLI.

Comments

@sekaiga
Copy link

sekaiga commented Mar 23, 2018

this is a BUG REPORT:
/kind bug
/sig api-machinery
What happened:
kubectl get all -n kube-system
error: {batch cronjobs} matches multiple kinds [batch/v1beta1, Kind=CronJob batch/v2alpha1, Kind=CronJob]

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):
im not sure,
i start dashboard,heapster by k8s it happened.then i kubeadm reset.
i start dashboard,heapster by k8s again it happened again.then i kubeadm reset.
i only start dashboard,its ok. the next day it happened. i havent do anything.

Anything else we need to know?:

Environment:

  • Kubernetes version (use kubectl version):
    Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.0", GitCommit:"925c127ec6b946659ad0fd596fa959be43f0cc05", GitTreeState:"clean", BuildDate:"2017-12-15T21:07:38Z", GoVersion:"go1.9.2", Compiler:"gc", Platform:"linux/amd64"}
    The connection to the server localhost:8080 was refused - did you specify the right host or port?
  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):
    NAME="CentOS Linux"
    VERSION="7 (Core)"
    ID="centos"
    ID_LIKE="rhel fedora"
    VERSION_ID="7"
    PRETTY_NAME="CentOS Linux 7 (Core)"
    ANSI_COLOR="0;31"
    CPE_NAME="cpe:/o:centos:centos:7"
    HOME_URL="https://www.centos.org/"
    BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

googlecontainer/heapster v1.5.1 c41e77c31c91 6 weeks ago 75.3 MB
nfs:5000/tensorflow/tensorflow nightly-gpu be934a248847 7 weeks ago 2.95 GB
nfs:5000/tensorflow/tensorflow nightly 9124d6961a0e 2 months ago 1.25 GB
gcr.io/google_containers/kube-proxy-amd64 v1.9.0 f6f363e6e98e 3 months ago 109 MB
gcr.io/google_containers/kube-apiserver-amd64 v1.9.0 7bff5aa286d7 3 months ago 210 MB
gcr.io/google_containers/kube-controller-manager-amd64 v1.9.0 3bb172f9452c 3 months ago 138 MB
gcr.io/google_containers/kube-scheduler-amd64 v1.9.0 5ceb21996307 3 months ago 62.7 MB
gcr.io/google_containers/kubernetes-dashboard-amd64 v1.8.1 e94d2f21bc0c 3 months ago 121 MB
quay.io/coreos/flannel v0.9.1-amd64 2b736d06ca4c 4 months ago 51.3 MB
gcr.io/google_containers/k8s-dns-sidecar-amd64 1.14.7 db76ee297b85 5 months ago 42 MB
gcr.io/google_containers/k8s-dns-kube-dns-amd64 1.14.7 5d049a8c4eec 5 months ago 50.3 MB
gcr.io/google_containers/k8s-dns-dnsmasq-nanny-amd64 1.14.7 5feec37454f4 5 months ago 40.9 MB
gcr.io/google_containers/etcd-amd64 3.1.10 1406502a6459 6 months ago 193 MB
ibmcom/heapster v1.4.0 749531a6d2cf 8 months ago 73.4 MB
gcr.io/google_containers/pause-amd64 3.0 99e59f495ffa 22 months ago 747 kB
kubernetes/heapster latest d2d2bfdfb48f 2 years ago 34.5 MB
dockerinaction/hello_world latest a1a9a5ed65e9 2 years ago 2.43 MB
kubernetes/heapster_grafana latest b2951ae24ffe 3 years ago 250 MB
kubernetes/heapster_influxdb latest 10eaf557026e 3 years ago 275 MB

  • Others:
@k8s-ci-robot k8s-ci-robot added needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. kind/bug Categorizes issue or PR as related to a bug. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Mar 23, 2018
@lavalamp
Copy link
Member

/remove-sig api-machinery
/sig cli

@k8s-ci-robot k8s-ci-robot added sig/cli Categorizes an issue or PR as relevant to SIG CLI. and removed sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. labels Mar 26, 2018
@sekaiga
Copy link
Author

sekaiga commented Mar 27, 2018

i found the reason.
the KUBECONFIG=/etc/kubernetes/admin.conf in the ~/.bash_profile had been removed.
add this config back,it works.
i don't know why it had been removed.
i think the error message is not very clearly.

@simbo1905
Copy link

simbo1905 commented Jun 15, 2018

I have this problem.

$ oc get cronjob s3-mysql-backup
error: {  cronjob} matches multiple kinds [batch/v1beta1, Kind=CronJob batch/v2alpha1, Kind=CronJob]

I am on:

$ oc version
oc v3.6.173.0.49
kubernetes v1.6.1+5115d708d7
features: Basic-Auth

Server https://api.pro-eu-west-1.openshift.com:443
openshift v3.9.14
kubernetes v1.9.1+a0ce1bc657

I have recently removed my local ~/.kube/config to test running scripts as different uses. I am not sure that caused the problem but it seems suspicious give what @sekaiga says. I am not a cluster admin.

Is there a workaround to this? I now have an orphaned cronjob that I cannot address that is running happily and working but I would really like to be able to manage it if necessary.

@kusha
Copy link

kusha commented Jul 23, 2018

@simbo1905
Hi, I had the same problem. Upgrade to origins-client v3.9.0 solved the issue for me.

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 21, 2018
@f-z
Copy link

f-z commented Nov 19, 2018

I had the same cronjob matches multiple kinds error message and turns out it was just the authentication that had expired.

Reauthenticated by issuing new certs for the cluster (as a .yaml file in the .kube/configs/ folder) and that resolved it.

@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Dec 19, 2018
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@k8s-ci-robot
Copy link
Contributor

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

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.

@Neferpitooou
Copy link

I got this error!

root@ubuntu-xenial:~# kubectl get all -n --all-namespaces
error: {batch cronjobs} matches multiple kinds [batch/v1beta1, Kind=CronJob batch/v2alpha1, Kind=CronJob]

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. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. sig/cli Categorizes an issue or PR as relevant to SIG CLI.
Projects
None yet
Development

No branches or pull requests

8 participants