I recently upgraded kubernetes version to 1.25.11 and updated the api versions as the deprecated API migration doc (https://kubernetes.io/docs/reference/using-api/deprecation-guide/). The upgrade was successfully. Now I am try to deploy the recently developed features of my app, In CICD pipeline get below error Error: UPGRADE FAILED: [resource mapping not found for name: "abc-cron" namespace: "staging" from "": no matches for kind "CronJob" in version "batch/v1beta1" As for above shared doc I updated the version from batch/v1beta1 to batch/v1
yaml:
kind: CronJob
apiVersion: batch/v1
metadata:
name: abc-cron
namespace: staging
uid: ca924a0c-4696-401e-9224-9e92039aa089
resourceVersion: 79995787
generation: 2
creationTimestamp: 2023-01-12T13:54:31Z
labels:
app.kubernetes.io/managed-by: Helm
annotations:
meta.helm.sh/release-name: app-staging
meta.helm.sh/release-namespace: staging
managedFields:
- manager: helm
operation: Update
apiVersion: batch/v1
time: 2023-01-12T13:54:31Z
fieldsType: FieldsV1
fieldsV1:
f:metadata:
f:annotations:
.: {}
f:meta.helm.sh/release-name: {}
f:meta.helm.sh/release-namespace: {}
f:labels:
.: {}
f:app.kubernetes.io/managed-by: {}
f:spec:
f:concurrencyPolicy: {}
f:failedJobsHistoryLimit: {}
f:jobTemplate:
f:spec:
f:backoffLimit: {}
f:template:
f:spec:
f:containers:
k:{"name":"abc-cron"}:
.: {}
f:env:
.: {}
k:{"name":"ENVIRONMENT"}:
.: {}
f:name: {}
f:value: {}
f:image: {}
f:imagePullPolicy: {}
f:name: {}
f:resources: {}
f:terminationMessagePath: {}
f:terminationMessagePolicy: {}
f:dnsPolicy: {}
f:imagePullSecrets:
.: {}
k:{"name":"docker-secret"}: {}
f:restartPolicy: {}
f:schedulerName: {}
f:securityContext: {}
f:terminationGracePeriodSeconds: {}
f:schedule: {}
f:successfulJobsHistoryLimit: {}
- manager: Mozilla
operation: Update
apiVersion: batch/v1
time: 2023-01-12T13:57:21Z
fieldsType: FieldsV1
fieldsV1:
f:spec:
f:suspend: {}
spec:
schedule: 0 9 1,16 * *
concurrencyPolicy: Replace
suspend: true
jobTemplate:
metadata:
creationTimestamp: null
spec:
backoffLimit: 4
template:
metadata:
creationTimestamp: null
spec:
containers:
- name: abc-cron
image: msapp.azurecr.io/abccron:ms-staging
env:
- name: ENVIRONMENT
value: ms-staging
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
imagePullPolicy: Always
restartPolicy: Never
terminationGracePeriodSeconds: 30
dnsPolicy: ClusterFirst
securityContext: {}
imagePullSecrets:
- name: docker-secret
schedulerName: default-scheduler
successfulJobsHistoryLimit: 3
failedJobsHistoryLimit: 1
status: {}
I am new to kubernetes and was not able to resolve the issue. Please help me
Thanks in advance