当前位置: 首页 > news >正文

OPUS编解码器在audio DSP上的移植和应用浅

前言

在使用 kubectl get $KIND -o yaml 查看 k8s 资源时,输出结果中包含大量由集群自动生成的元数据(如 managedFields、resourceVersion、uid 等)。这些信息在实际复用 yaml 清单时需要手动清理,增加了额外的工作量。

使用 kubectl-neat 插件,可以自动移除这些由集群生成的冗余字段,仅保留有意义的内容,使 yaml 更加简洁,方便复用。

安装

插件方式安装

kubectl krew install neat

## 作为 kubectl 插件安装,使用方式为:

kubectl neat

二进制方式安装

## 版本选择:

## https://github.com/itaysk/kubectl-neat/releases

## 当前环境为 ubuntu 2404 LTS

wget https://github.com/itaysk/kubectl-neat/releases/download/v2.0.4/kubectl-neat_linux_amd64.tar.gz

tar xf kubectl-neat_linux_amd64.tar.gz

mv ./kubectl-neat /usr/local/bin/

## 创建别名(这里看个人习惯)

vim /root/.bashrc

alias kneat='kubectl-neat'

使用

本次使用二进制方式部署,实际上参数是相同的,没区别

root@network-demo:~# kubectl-neat help

Usage:

kubectl-neat [flags]

kubectl-neat [command]

## 示例是通过 kubectl plugin 方式安装,使用二进制安装改成 kubectl-neat 就好

Examples:

kubectl get pod mypod -o yaml | kubectl neat

kubectl get pod mypod -oyaml | kubectl neat -o json

kubectl neat -f - <./my-pod.json

kubectl neat -f ./my-pod.json

kubectl neat -f ./my-pod.json --output yaml

Available Commands:

## 自动补全命令用的

completion Generate the autocompletion script for the specified shell

get

help Help about any command

version Print kubectl-neat version

Flags:

-f, --file string file path to neat, or - to read from stdin (default "-")

-h, --help help for kubectl-neat

-o, --output string output format: yaml or json (default "yaml")

命令补全

简单来说就是按两下 tab 后自动补充没拼完的参数

?? 注:其实没啥用...他只能补全命令本身的参数,并不能补全 k8s 相关信息

root@network-demo:~# kubectl-neat completion --help

Generate the autocompletion script for kubectl-neat for the specified shell.

See each sub-command's help for details on how to use the generated script.

Usage:

kubectl-neat completion [command]

Available Commands:

bash Generate the autocompletion script for bash

fish Generate the autocompletion script for fish

powershell Generate the autocompletion script for powershell

zsh Generate the autocompletion script for zsh

Flags:

-h, --help help for completion

Global Flags:

-o, --output string output format: yaml or json (default "yaml")

## 当前环境使用 bash

root@network-demo:~# hostnamectl

Static hostname: network-demo

Icon name: computer-vm

Chassis: vm

Virtualization: kvm

Operating System: Ubuntu 24.04.3 LTS

Kernel: Linux 6.8.0-88-generic

Architecture: x86-64

## 添加命令补全

echo "source <(kneat completion bash)" >> ~/.bashrc && source ~/.bashrc

## 查看效果

## 上面说没啥用的地方就在这...实际上能用的参数只有 get(kubectl-neat 自己的参数)

## 当你补全 get 后就会发现他无法识别 k8s 资源

root@network-demo:~# kubectl-neat

completion (Generate the autocompletion script for the specified shell) help (Help about any command)

get version (Print kubectl-neat version)

使用方式

## 这里我直接将 kubectl get -o yaml 与 kubectl-neat get -o yaml 输出对比

kubectl-neat get -- pods -n deepflow deepflow-server-fc484c85-p67gl -o yaml > deepflow-kneat.yaml

kubectl get pods -n deepflow deepflow-server-fc484c85-p67gl -o yaml > deepflow-kubectl.yaml

## 通过 icdiff 输出两个文件的对比结果,这里为了方便大家看,只把删除的内容放上来了

root@network-demo:~# icdiff deepflow-kubectl.yaml deepflow-kneat.yaml

creationTimestamp: "2026-01-23T02:24:57Z"

generateName: deepflow-server-fc484c85-

generation: 1

ownerReferences:

- apiVersion: apps/v1

blockOwnerDeletion: true

controller: true

kind: ReplicaSet

name: deepflow-server-fc484c85

uid: 528ab77f-67ba-4099-8771-bfe06ca9ce2f

resourceVersion: "4864722"

uid: 0d5ff97b-9c48-4abf-be8b-d2b76f7a14d2

nodeAffinity: {}

apiVersion: v1

apiVersion: v1

apiVersion: v1

apiVersion: v1

apiVersion: v1

scheme: HTTP

successThreshold: 1

timeoutSeconds: 1

protocol: TCP

protocol: TCP

protocol: TCP

protocol: TCP

scheme: HTTP

periodSeconds: 10

successThreshold: 1

timeoutSeconds: 1

resources: {}

securityContext: {}

terminationMessagePath: /dev/termination-log

terminationMessagePolicy: File

dnsConfig: {}

dnsPolicy: ClusterFirst

enableServiceLinks: true

nodeName: network-demo

restartPolicy: Always

schedulerName: default-scheduler

securityContext: {}

serviceAccount: deepflow-server

terminationGracePeriodSeconds: 30

defaultMode: 420

defaultMode: 420

apiVersion: v1

status:

## 下面是所有 status 内容...毯以募铣

http://www.jsqmd.com/news/624960/

相关文章:

  • 后端开发GitHub高星开源项目精选:十大主流技术栈微服务框架与云原生平台应用案例汇总
  • 1mt5 外汇市场,研究交易策略,【核心都是数学公式,公式不一定通用】
  • FastbootEnhance终极指南:告别命令行,轻松管理安卓设备
  • 4.13 留痕功能的实现
  • 2025最权威的六大降重复率助手实际效果
  • 2025_NIPS_Can We Infer Confidential Properties of Training Data from LLMs?
  • MogFace-large效果展示:艺术化滤镜、水印覆盖图像中的人脸检测能力
  • 终极指南:北航毕业论文LaTeX模板的完整使用教程,快速搞定格式规范
  • mysql日志管理
  • 碳硅共生:从人机协作到文明共进化——AGI时代智能关系的范式重构与理论建构
  • 手把手教你用AndroidKiller和JADX搞定旧版捕鱼达人内购(附Smali修改实战)
  • Windows Server 2025下载 Windows Server 2022下载 Windows Server 2019下载 Windows Server 2016下载
  • 【AI Agent 从入门到精通】第一章:AI Agent 是什么?一文讲清楚核心概念与架构
  • 高级java每日一道面试题-2025年10月14日-团队协作篇[LangChain4j]-如何设计代码审查标准?
  • C语言函数笔记5:从基础使用到递归与作用域深度解析
  • Transformer模型实战:用Python预测锂电池寿命的保姆级教程(附数据集)
  • 【JavaEE】多线程02—线程安全
  • 从单体LLM API到生产级AI网格:一位CTO带队完成迁移的6周攻坚日志,含全部YAML配置模板
  • Phi-3-Mini-128K实际案例:为芯片设计团队提供Verilog代码规范检查建议
  • 从3月到毕业,大三/研二每个月该干什么?这份校招备战日历建议直接收藏
  • 从理论到实践:忆阻神经网络中的突触与神经元电路设计探析
  • 集成AI 的 Redis 客户端 Rudist发布新版了谔
  • ARMv8架构下Cache一致性:PoU和PoC到底有什么区别?
  • 仅限奇点大会注册开发者获取:LLM生产环境诊断工具包(含自动检测脚本+拓扑分析器+成本优化计算器)
  • 终极免费方案:3分钟搞定Blender到Unity的FBX模型完美导出
  • 从VMware虚拟机到OpenStack云:手把手教你搭建个人私有云实验平台
  • X-Anylabeling实战:从零部署到高效标注的完整指南
  • 比特币白皮书解读:一种点对点的电子现金系统
  • 华为网络设备高效巡检命令全解析(运维必备)
  • AutoJS后台保活实战:从原理到华为手机优化配置