Skip to content

Support logs in namespace k8s.io #1844

Closed

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 stdout、stderr in logfile to os.stdout os.stderr

Additional context

No response

Activity

  1. AkihiroSuda commented on Jan 13, 2023

    @AkihiroSuda
    Member

    Thanks, left comments in zhaojizhuang@c8c2a66

  2. zhaojizhuang commented on Jan 13, 2023

    @zhaojizhuang
    ContributorAuthor

    @AkihiroSuda OK,Thanks, I will create a PR for it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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