English 中文(简体)
Kubernetes v1.25.11, resource not found for name: "abc" namespace: "staging" from "": no matches for kind "CronJob" in version "batch/v1beta1"
原标题:

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

问题回答

暂无回答




相关问题
HTTP call from Celery worker

I am running a Flask-Celery server in docker desktop Kubernetes. It uses a Redis Result Backend. I want to use a Celery Task to make an HTTP call to a program that might take a while. This program ...

Why my website cookies are not being set on my browser?

Hello I am developing a web app, with a microservices architecture. I am using golang (Fiber) on the backend and Next.js on the frontend. When I send a request from restaurant.quiqr.co/signin to api....

我如何终止Kubernetes的名称空间?

我正试图终止Kubernetes的名称空间。 过去,我uc切地遵循了在库韦涅斯这里发现的在终止地位方面摇摇摇欲坠的空地。

helm with if condition and its scope for the value set

I would like to overwrite the user template with .Values.userTemplate if it exist. But I always get $user as undefined when the .Vaues.userTemplate exist. If i remove if condition and use {{- $user := ...

热门标签