k8s list-events
List events
Description
List k8s events in given namespace
Synopsis
k8s list-events
[--site <site>]
[--cluster <cluster>]
[--namespace|-n <namespace>]
[--object_name <object_name>]
[--object_kind <object_kind>]
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
object_name
- (string)
name of the object i.e pod name etc
Example: --object_name "pod-1"
Default: _None_
Attributes: optional
object_kind
- (string)
kind of the object
Example: --object_kind "POD"
Default: _None_
Attributes: optional
Examples
Input:
Output:[
{
"name": "kafka1-7cb95d9db6-xdkx4.16a7c5487527f0b3",
"reason": "SandboxChanged",
"description": "Pod sandbox changed, it will be killed and re-created.",
"cluster": "minikube",
"namespace": "default",
"involved_object_name": "kafka1-7cb95d9db6-xdkx4",
"kind": 2
},
{
"name": "kafka1-7cb95d9db6-xdkx4.16a7c54d938a1fa0",
"reason": "Pulled",
"description": "Container image \"wurstmeister/kafka\" already present on machine",
"cluster": "minikube",
"namespace": "default",
"involved_object_name": "kafka1-7cb95d9db6-xdkx4",
"kind": 2
},
{
"name": "kafka1-7cb95d9db6-xdkx4.16a7c54f49eeea9b",
"reason": "Created",
"description": "Created container kafka1",
"cluster": "minikube",
"namespace": "default",
"involved_object_name": "kafka1-7cb95d9db6-xdkx4",
"kind": 2
},
{
"name": "kafka1-7cb95d9db6-xdkx4.16a7c551bae8fa9a",
"reason": "Started",
"description": "Started container kafka1",
"cluster": "minikube",
"namespace": "default",
"involved_object_name": "kafka1-7cb95d9db6-xdkx4",
"kind": 2
},
{
"name": "kafka1-7cb95d9db6-xdkx4.16a7c56325610ab2",
"reason": "BackOff",
"description": "Back-off restarting failed container",
"cluster": "minikube",
"namespace": "default",
"involved_object_name": "kafka1-7cb95d9db6-xdkx4",
"kind": 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 | "event" |
Object ID | object_kind + "/" + object_name |
Please see Access Control for details.