Get cluster namespace Cronjob details

Get cluster namespace Cronjob details

get

Get detailed information for CronJob in the specified cluster and namespace.

Path parameters
clusterIdstringRequired
namespaceNamestringRequired
cronJobNamestringRequired
Responses
200
OK
*/*
get
GET /v1/clusters/{clusterId}/namespaces/{namespaceName}/cronjobs/{cronJobName} HTTP/1.1
Host: 
Accept: */*
200

OK

[
  {
    "activeJobCnt": 1,
    "creationTimestamp": "2023-06-14 09:30:39",
    "deployment": "{\"apiVersion\":\"batch/v1\",\"kind\":\"CronJob\"...",
    "deploymentYaml": "apiVersion: batch/v1\nkind: CronJob\nmetadata:\n...",
    "detail": {
      "activeJobs": [
        {
          "completionPodCnt": 0,
          "creationTimestamp": "2023-07-04 06:38:00",
          "deployment": "{\"apiVersion\":\"batch/v1\",\"kind\":\"Job\",\"metadata\"",
          "deploymentYaml": "apiVersion: batch/v1\nkind: Job\nmetadata:\n",
          "desiredPodCnt": 1,
          "detail": {
            "annotations": {
              "sidecar.istio.io/inject": "false"
            },
            "backoffLimit": 6,
            "completions": 1,
            "creationTime": "2023-07-04 06:38:00",
            "labels": {
              "app": "cronjob"
            },
            "name": "cronjob-28140878",
            "namespace": "cocktail-system",
            "ownerReferences": [
              {
                "apiVersion": "batch/v1",
                "blockOwnerDeletion": true,
                "controller": true,
                "kind": "CronJob",
                "name": "cronjob",
                "uid": "c86a8fcc-7ecc-4445-a72f-cb272b7074a9"
              }
            ],
            "parallelism": 1,
            "podTemplate": {
              "annotations": {
                "cocktail-deploy-datetime": "2023-06-14 01:21:02.598",
                "kubectl.kubernetes.io/restartedAt": "2023-06-14T01:28:04Z"
              },
              "labels": {
                "app": "cronjob",
                "controller-uid": "ba7b126d-b790-4152-a77e-b410da5f4fd7",
                "job-name": "cronjob-28140878"
              },
              "spec": {
                "conditions": [],
                "detail": {
                  "containers": [
                    {
                      "image": "nginx:latest",
                      "imagePullPolicy": "Always",
                      "name": "nginx",
                      "resources": {
                        "cpu": {
                          "limit": "200m",
                          "request": "100m"
                        },
                        "memory": {
                          "limit": "209715200",
                          "request": "104857600"
                        }
                      },
                      "restartCount": 0,
                      "volumeMounts": {
                        "a": "{\"mountPath\":\"/data\",\"name\":\"a\"}",
                        "b": "{\"mountPath\":\"/data2\",\"name\":\"b\"}",
                        "c": "{\"mountPath\":\"/data3\",\"name\":\"c\"}"
                      }
                    }
                  ],
                  "initContainers": [],
                  "restartPolicy": "OnFailure",
                  "terminationGracePeriodSeconds": 30
                },
                "podStatus": "Pending",
                "restartCnt": 0
              }
            },
            "selector": {
              "matchLabels": {
                "controller-uid": "ba7b126d-b790-4152-a77e-b410da5f4fd7"
              }
            },
            "status": {
              "Failed": 0,
              "Running": 1,
              "Succeeded": 0
            }
          },
          "images": [
            "nginx:latest"
          ],
          "labels": {
            "app": "cronjob"
          },
          "name": "cronjob-28140878",
          "namespace": "cocktail-system"
        }
      ],
      "annotations": {
        "acornsoft.io/workload-group-no": "53",
        "cocktail-deploy-datetime": "2023-06-14 09:30:39.002",
        "cocktail-user-description": "Lg=="
      },
      "backoffLimit": 3,
      "completions": 1,
      "concurrencyPolicy": "Allow",
      "creationTimestamp": "2023-06-14 09:30:39",
      "failedJobsHistoryLimit": 1,
      "labels": {
        "app": "cronjob"
      },
      "lastScheduleTime": "2023-07-04 06:38:00",
      "name": "cronjob",
      "namespace": "cocktail-system",
      "parallelism": 1,
      "podTemplate": {
        "annotations": {
          "cocktail-deploy-datetime": "2023-06-14 01:21:02.598",
          "kubectl.kubernetes.io/restartedAt": "2023-06-14T01:28:04Z"
        },
        "labels": {
          "app": "test2"
        },
        "spec": {
          "conditions": [],
          "detail": {
            "containers": [
              {
                "image": "nginx:latest",
                "imagePullPolicy": "Always",
                "name": "nginx",
                "resources": {
                  "cpu": {
                    "limit": "200m",
                    "request": "100m"
                  },
                  "memory": {
                    "limit": "209715200",
                    "request": "104857600"
                  }
                },
                "restartCount": 0,
                "volumeMounts": {
                  "a": "{\"mountPath\":\"/data\",\"name\":\"a\"}",
                  "b": "{\"mountPath\":\"/data2\",\"name\":\"b\"}",
                  "c": "{\"mountPath\":\"/data3\",\"name\":\"c\"}"
                }
              }
            ],
            "initContainers": [],
            "restartPolicy": "OnFailure",
            "terminationGracePeriodSeconds": 30
          },
          "podStatus": "Pending",
          "restartCnt": 0
        }
      },
      "schedule": "* * * * *",
      "successfulJobsHistoryLimit": 3,
      "suspend": false
    },
    "images": [
      "nginx:latest"
    ],
    "labels": {
      "app": "cronjob"
    },
    "lastScheduleTime": "2023-07-04 06:38:00",
    "name": "cronjob",
    "namespace": "cocktail-system",
    "schedule": "* * * * *",
    "suspend": false
  }
]

Was this helpful?