Skip to content

Support logs in namespace k8s.io #1844

@zhaojizhuang

Description

@zhaojizhuang

What is the problem you're trying to solve

Currently nerdctl logs do not support containers in namespace moby and k8s.io

We can supportnerdctl logs in namespace k8s.io( or container created via CRIPlugin)

Describe the solution you'd like

Refer to this commit zhaojizhuang@c8c2a66

  1. get LogPath from containerMetadataExtension(which only use in container created by CRI)
  2. add text logdriver
  3. tail LogPath,and redirect stdoutstderr in logfile to os.stdout os.stderr

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions