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

Seeing The resource "batch/v1/cronjobs" is not supported. error from portieris on Openshift 4.8 #350

Closed
wmlynch opened this issue Sep 23, 2021 · 4 comments · Fixed by #353
Assignees

Comments

@wmlynch
Copy link

wmlynch commented Sep 23, 2021

Portieris version: v0.11.0
Openshift version 4.8.11

Error:

I0923 16:40:33.380958       1 controller.go:64] Processing admission request for UPDATE on image-pruner
E0923 16:40:33.381031       1 podspec.go:245] Resource not supported: {Group:batch Version:v1 Resource:cronjobs}
E0923 16:40:33.381077       1 responder.go:87] The resource "batch/v1/cronjobs" is not supported. Make sure that you are using a supported kubectl version, and that you are using a supported Kubernetes workload type

In OCP 4.7 image-pruner is

- apiVersion: batch/v1beta1
  kind: CronJob

In OCP 4.8 image-pruner is

- apiVersion: batch/v1
  kind: CronJob
@rtheis
Copy link
Member

rtheis commented Sep 23, 2021

vagrant@verify-cluster:~/armada-ansible$ k api-versions | grep batch/v1
batch/v1
batch/v1beta1
vagrant@verify-cluster:~/armada-ansible$ k version
Client Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.17", GitCommit:"f3abc15296f3a3f54e4ee42e830c61047b13895f", GitTreeState:"clean", BuildDate:"2021-01-13T13:21:12Z", GoVersion:"go1.13.15", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"17+", GitVersion:"v1.17.1+5ef953f", GitCommit:"5ef953f", GitTreeState:"clean", BuildDate:"2021-01-26T19:19:18Z", GoVersion:"go1.13.15", Compiler:"gc", Platform:"linux/amd64"}
vagrant@verify-cluster:~/armada-ansible$ o version
Client Version: 4.4.3
Server Version: 4.4.33
Kubernetes Version: v1.17.1+5ef953f

@rtheis
Copy link
Member

rtheis commented Sep 23, 2021

API appears to have been available for a long time now, at least OCP 4.4.

@sjhx sjhx self-assigned this Sep 28, 2021
@sjhx
Copy link
Member

sjhx commented Sep 28, 2021

Will remedy this now, I wonder what is the best way to stay up to date with new types.

@rtheis
Copy link
Member

rtheis commented Sep 28, 2021

@sjhx Probably the easiest way to stay current on APIs is to run kubectl api-versions against a cluster running the latest Kubernetes version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants