k8s list-cronjobs
Get k8s cronjob
Description
Get the kubernetes cronjobs that satisfies the provided arguments
Synopsis
Arguments
site
- (string)
Site where this command will be executed
Example: --site "site-1"
Default: input.site
Attributes: optional
cluster
- (string)
Cluster where this command will be executed
Example: --cluster "in-cluster"
Default: in-cluster
Attributes: optional
namespace
- (string)
Kubernetes namespace
Example: --namespace "namespace-1"
Default: default
Attributes: optional
selector
- (string)
Selector to select cronjobs
Example: "app=k8s,!tier"
Default: _None_
Attributes: optional
Examples
Input:
Output:[
{
"cluster": "in-cluster",
"namespace": "default",
"name": "hello",
"schedule": "*/1 * * * *",
"annotations": {
"autopilot.gke.io/resource-adjustment": "{\"input\":{\"containers\":[{\"name\":\"hello\"}]},\"output\":{\"containers\":[{\"limits\":{\"cpu\":\"500m\",\"ephemeral-storage\":\"1Gi\",\"memory\":\"2Gi\"},\"requests\":{\"cpu\":\"500m\",\"ephemeral-storage\":\"1Gi\",\"memory\":\"2Gi\"},\"name\":\"hello\"}]},\"modified\":true}"
},
"concurrency_policy": 2
}
]
Access Control
To use this command, you need access to the following:
Field | Value |
---|---|
Action | "read" |
Service Type | "k8s" |
Service Instance | cluster |
Namespace | namespace |
Object Type | "cronjob" |
Object ID |
Please see Access Control for details.