Skip to content

Trying to show deployment yaml using custom views.yaml crashes k9s #3718

@Reduxx

Description

@Reduxx




Describe the bug
Try to view deployment yaml crashes k9s while using custom views.yaml (see code below at additional information).

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'deployments'
  2. Press Y to view YAML
  3. Boom!! cannot deep copy int

Expected behavior
It seems to be the same issue as in #3620
But it applies to deployments instead of pods. The Pod version below works fine, doing the same with deployments it breaks.

Versions (please complete the following information):

  • OS: MacOS 26.1
  • K9s: 0.50.16
  • K8s: any

Additional context
Breaks deployment yaml view:

views:
  apps/v1/deployments:
    columns:
      - NAMESPACE
      - NAME
      - IMAGE:.spec.template.spec.containers[].image|split("/")|[.[-2] // empty, .[-1]]|join("/")|split(":")|.[0]|W
      - VERSION:.spec.template.spec.containers[].image|split("/").[-1]|split(":")|.[1]|W

Works just fine for pods

views:
  v1/pods:
    columns:
      - NAMESPACE
      - NAME
      - IMAGE:.spec.containers[].image|split("/")|[.[-2] // empty, .[-1]]|join("/")|split(":")|.[0]|W
      - VERSION:.spec.containers[].image|split("/").[-1]|split(":")|.[1]|W

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions