安装



概述

K9s 可用于 Linux、macOS 和 Windows 平台。

  • 适用于 Linux、Windows 和 Mac 的二进制文件以 tarball 的形式在发布页面上提供。

  • MacOS

     # Via Homebrew
     brew install derailed/k9s/k9s
     # Via MacPort
     sudo port install k9s
    
  • Linux

     # Via LinuxBrew
     brew install derailed/k9s/k9s
     # Via PacMan
     pacman -S k9s
    
  • Windows

    # Via scoop
    scoop install k9s
    # Via chocolatey
    choco install k9s
    

从源代码构建

K9s 当前使用 Go v1.14 或更高版本。为了从源代码构建 K9s,您必须:

  1. 克隆仓库
  2. 构建并运行可执行文件

      make build && ./execs/k9s
    

运行前检查

  • K9s 使用 256 色终端模式。在 `Nix 系统上,请确保 TERM 设置正确。

      export TERM=xterm-256color
    
  • 为了执行资源编辑命令,请确保设置了 EDITOR 和/或 KUBE_EDITOR 环境变量。

      # Kubectl edit command will use this env var.
      export KUBE_EDITOR=my_fav_editor
    

 返回



© 2025 Imhotep Software LLC. 所有材料均根据 Apache v2.0 许可授权。