"unsortable type" error when sorting events using "lastTimestamp" in OCP 4

Solution Verified - Updated -

Issue

  • Why this error is returned while sorting events by lastTimestamp?

    $ oc get events --sort-by="lastTimestamp" 
    F1020 11:07:09.932471    1755 sorter.go:354] Field {.lastTimestamp} in [][][]reflect.Value is an unsortable type: interface, err: unsortable type: <nil>
    
  • How is it possible to sort events by time in Red Hat OpenShift Container Platform?

Environment

  • Red Hat OpenShift Container Platform (RHOCP) 4.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content