対応策 for "no matches for kind 'CronJob' in version 'batch/v1beta1'" when Registering a Kubernetes CronJob
kubernetes
2023-09-28 00:31 (2 years ago)
In Kubernetes 1.25,
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: my-awesome-product-extreme-job
namespace: ytyng
spec:
...
When I applied this CronJob manifest, I encountered the following error:
resource mapping not found for name: "my-awesome-product-extreme-job" namespace: "ytyng" from "sync.cronjob.yml": no matches for kind "CronJob" in version "batch/v1beta1"
ensure CRDs are installed first
In Kubernetes 1.25, batch/v1beta1 is not supported, so you need to update it to batch/v1 to register it successfully.
apiVersion: batch/v1
kind: CronJob
metadata:
name: my-awesome-product-extreme-job
namespace: ytyng
spec:
...
Please rate this article
Current rating: 5.0 (1)
The author runs the application development company Cyberneura.
We look forward to discussing your development needs.
We look forward to discussing your development needs.