How can I get events messages from a pod, like this command using client-go Kubernetes API:
kubectl describe pod spark-t2f59 -n spark
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedScheduling 104s default-scheduler 0/19 nodes are available: 15 Insufficient cpu, 19 Insufficient memory.
Warning FailedScheduling 104s default-scheduler 0/19 nodes are available: 15 Insufficient cpu, 19 Insufficient memory.
Warning FailedScheduling 45s default-scheduler 0/20 nodes are available: 16 Insufficient cpu, 20 Insufficient memory.
Warning FailedScheduling 34s default-scheduler 0/20 nodes are available: 16 Insufficient cpu, 20 Insufficient memory.
Normal NotTriggerScaleUp 97s cluster-autoscaler pod didn't trigger scale-up (it wouldn't fit if a new node is added): 1 Insufficient memory, 1 max node group size reached
Is there a way to get the same output of events but using client-go instead of kubectl??